aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2022-03-07 19:12:49 +0100
committerTeddy Wing2022-03-07 22:25:13 +0100
commit0450b1ab669afb0869ded1cb892f5ad44ecec029 (patch)
tree6b992b798b7e702eae718e66edd27393111ed648
parentf3f6bfb3b7a4e894b5c2321fb87cfd1a5b4c24b1 (diff)
downloaddotvim-0450b1ab669afb0869ded1cb892f5ad44ecec029.tar.bz2
ftplugin/go.vim: Add 'formatoptions' for comment leaders
-rw-r--r--ftplugin/go.vim4
1 files changed, 4 insertions, 0 deletions
diff --git a/ftplugin/go.vim b/ftplugin/go.vim
index a606635..cdad2d5 100644
--- a/ftplugin/go.vim
+++ b/ftplugin/go.vim
@@ -25,6 +25,10 @@ nnoremap <buffer> cdf :!go fmt %<cr>
setlocal commentstring=//\ %s
+" Continue comments on <Enter> and `o` `O`.
+setlocal formatoptions+=or
+
+
" Add a trailing comma when expanding elements to multiple lines
let b:argwrap_tail_comma = 1