aboutsummaryrefslogtreecommitdiff
path: root/vim/bundles.vim
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <msabate@suse.com>2015-10-08 09:22:16 +0200
committerMiquel Sabaté Solà <msabate@suse.com>2015-10-08 09:22:16 +0200
commitca8e70082e52048f807f63c18d32fd1a9dc3f8dc (patch)
treeb2432b8ce85a54834c5ebb43363a0e3b1c631b50 /vim/bundles.vim
parent3bed9d79439022560df6d65f74b27e3235cd7bba (diff)
downloaddotfiles-ca8e70082e52048f807f63c18d32fd1a9dc3f8dc.tar.gz
dotfiles-ca8e70082e52048f807f63c18d32fd1a9dc3f8dc.zip
vim: call golint on save if the executable exists
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
Diffstat (limited to 'vim/bundles.vim')
-rw-r--r--vim/bundles.vim6
1 files changed, 5 insertions, 1 deletions
diff --git a/vim/bundles.vim b/vim/bundles.vim
index a95ad48..05c9a78 100644
--- a/vim/bundles.vim
+++ b/vim/bundles.vim
@@ -1,4 +1,3 @@
-
" Vundle setup
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
@@ -25,3 +24,8 @@ let g:ctrlp_match_window = 'max:40'
" Tell vim-go to use goimports on save.
let g:go_fmt_command = "goimports"
+" Execute go-lint on save.
+if isdirectory($GOPATH."/src/github.com/golang/lint/misc/vim")
+ set rtp+=$GOPATH/src/github.com/golang/lint/misc/vim
+ autocmd BufWritePost,FileWritePost *.go execute 'Lint' | cwindow
+endif