diff --git a/cli/vim/init.vim b/cli/vim/init.vim index 26433fc..20c681e 100644 --- a/cli/vim/init.vim +++ b/cli/vim/init.vim @@ -347,3 +347,7 @@ autocmd BufEnter,BufRead commitmsg.md :set colorcolumn=100 " nerdtree nnoremap t :NERDTreeToggle + +" go organize import on save +command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport') +autocmd BufWritePre *.go :OR