]> Sergey Matveev's repositories - dotfiles.git/blobdiff - vim/.vim/ftplugin/go/fmt.vim
Vim scripts refactoring
[dotfiles.git] / vim / .vim / ftplugin / go / fmt.vim
index 49d20dca637cd9bb0ddacf7ca43a8e48e74ea581..9ed68ad6c401c3a65895925924562adb448db55c 100644 (file)
@@ -30,9 +30,7 @@ if !exists("g:go_fmt_commands")
     let g:go_fmt_commands = 1
 endif
 
-if !exists("g:gofmt_command")
-    let g:gofmt_command = "goimports"
-endif
+let g:gofmt_command = get(g:, "gofmt_command", "goimports")
 
 if g:go_fmt_commands
     command! -buffer Fmt call s:GoFormat()