Skip to content

Instantly share code, notes, and snippets.

@dictav
Created February 7, 2017 04:10
Show Gist options
  • Save dictav/3e67ceda8f39c19609e366190913e06c to your computer and use it in GitHub Desktop.
Save dictav/3e67ceda8f39c19609e366190913e06c to your computer and use it in GitHub Desktop.
vimrc to format go file.
let g:go_fmt_commands = 0 "disable builtin :Fmt
Plug 'haya14busa/vim-gofmt', { 'for': ['go'] }
let g:gofmt_formatters = [
\ { 'cmd': 'goimports', 'args': ['-w'] },
\ { 'cmd': 'gotypeconv', 'args': ['-w'] },
\ ]
Plug 'fatih/vim-go', { 'for': ['go'] }
let g:go_fmt_command = 'gofmtrlx'
let g:go_metalinter_autosave = 1 "enable auto :GoMetaLinter on save
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment