From 692ec322601cdc6ca8b241bb0ba5ad69a62a57ec Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Thu, 28 May 2020 20:01:25 +0200 Subject: 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. --- ftplugin/go.vim | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ftplugin') 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 cdf :!go fmt % setlocal commentstring=//\ %s +" Add a trailing comma when expanding elements to multiple lines +let b:argwrap_tail_comma = 1 + + nmap Zr :GoRun . nmap Zb (go-build) nmap Zc (go-test-compile) -- cgit v1.2.3