From a73f28a91f6b573e515877faeffd508448bbb126 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Tue, 20 Feb 2018 08:53:09 -0800 Subject: [vim] Add again vim configuration. Will do another try with vim and a few plugins. --- vim/ftplugin/gitcommit.vim | 2 ++ vim/ftplugin/go.vim | 21 +++++++++++++++++++++ vim/ftplugin/markdown.vim | 2 ++ 3 files changed, 25 insertions(+) create mode 100644 vim/ftplugin/gitcommit.vim create mode 100644 vim/ftplugin/go.vim create mode 100644 vim/ftplugin/markdown.vim (limited to 'vim/ftplugin') diff --git a/vim/ftplugin/gitcommit.vim b/vim/ftplugin/gitcommit.vim new file mode 100644 index 0000000..30d26b2 --- /dev/null +++ b/vim/ftplugin/gitcommit.vim @@ -0,0 +1,2 @@ +au FileType gitcommit setlocal spell +au FileType gitcommit setlocal textwidth=80 diff --git a/vim/ftplugin/go.vim b/vim/ftplugin/go.vim new file mode 100644 index 0000000..e3c5765 --- /dev/null +++ b/vim/ftplugin/go.vim @@ -0,0 +1,21 @@ +" Run goimports when running gofmt +let g:go_fmt_command = "goimports" + +" Show the progress when running :GoCoverage +let g:go_echo_command_info = 1 + +" Show type information +let g:go_auto_type_info = 1 + +" Highlight variable uses +let g:go_auto_sameids = 1 + +" Add the failing test name to the output of :GoTest +let g:go_test_show_name = 1 + +" gometalinter configuration +let g:go_metalinter_command = "" +let g:go_metalinter_deadline = "5s" + +" Set whether the JSON tags should be snakecase or camelcase. +let g:go_addtags_transform = "snakecase" diff --git a/vim/ftplugin/markdown.vim b/vim/ftplugin/markdown.vim new file mode 100644 index 0000000..c0d6d93 --- /dev/null +++ b/vim/ftplugin/markdown.vim @@ -0,0 +1,2 @@ +au FileType markdown setlocal spell +au FileType markdown set syntax=markdown -- cgit 1.4.1