From 44364dae906b050a0400a37a9d60ffb2c5a83045 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Wed, 8 May 2019 16:10:23 +0200 Subject: vimrc: Add basic 'vim-go' settings 'vim-go' displays this error message when running older versions of Vim: vim-go requires Vim 7.4.2009 or Neovim 0.3.1, but you're using an older version. Please update your Vim for the best vim-go experience. If you really want to continue you can set this to make the error go away: let g:go_version_warning = 0 Note that some features may error out or behave incorrectly. Please do not report bugs unless you're using Vim 7.4.2009 or newer or Neovim 0.3.1.O If I'm running a version of Vim that would cause the error message to display, I'm probably not editing Go code, so it doesn't matter. In this case, the error message just interferes with normal operations. Use `goimports` instead of `go fmt` for on-save formatting. --- vimrc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'vimrc') diff --git a/vimrc b/vimrc index 3bc26cf..d7c1fd3 100644 --- a/vimrc +++ b/vimrc @@ -405,6 +405,11 @@ " folders from Pick at a project level. " * Tell Gundo to use Python 3 if Vim is compiled with `+python3`. " +" 2019.05.08: +" * Hide error message that Vim-Go displays when using a version of Vim +" older than 7.4.2009. +" * Format Go code with `goimports`. +" " Pathogen @@ -622,6 +627,11 @@ nnoremap 🕳 :call RunCurrentSpecFile() \| call system("date '+%FT%T%z: e' >> ~ nnoremap ⛳ :call RunNearestSpec() \| call system("date '+%FT%T%z: E' >> ~/.vim/spec-stats.log") +" Go +let g:go_version_warning = 0 +let g:go_fmt_command = 'goimports' + + " Whitespace method chain nnoremap sm :call whitespace_method_chain#SplitMethodChainToMultipleLines() -- cgit v1.2.3