diff options
author | Teddy Wing | 2020-05-28 20:01:25 +0200 |
---|---|---|
committer | Teddy Wing | 2020-06-01 15:51:13 +0200 |
commit | 692ec322601cdc6ca8b241bb0ba5ad69a62a57ec (patch) | |
tree | 567da44568f7ed7fe901ae66087f929051256bb3 | |
parent | 55ad3d9a7c196d07c6bdd3c6239a298bb4566bc9 (diff) | |
download | dotvim-692ec322601cdc6ca8b241bb0ba5ad69a62a57ec.tar.bz2 |
ftplugin/go.vim: Turn on `b:argwrap_tail_comma`
This adds a trailing comma when using ArgWrap. Go requires trailing
commas, otherwise it reports compilation errors.
-rw-r--r-- | ftplugin/go.vim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ftplugin/go.vim b/ftplugin/go.vim index 7ce72a7..1fdc154 100644 --- a/ftplugin/go.vim +++ b/ftplugin/go.vim @@ -25,6 +25,10 @@ nnoremap <buffer> cdf :!go fmt %<cr> setlocal commentstring=//\ %s +" Add a trailing comma when expanding elements to multiple lines +let b:argwrap_tail_comma = 1 + + nmap <buffer> Zr :GoRun .<CR> nmap <buffer> Zb <Plug>(go-build) nmap <buffer> Zc <Plug>(go-test-compile) |