Configure vim-go

main
Buddy Sandidge 9 years ago
parent 9ff8a9253b
commit 167102bee4

@ -1,6 +1,21 @@
set noexpandtab " noexpandtab keeps tabs set noexpandtab " noexpandtab keeps tabs
set shiftwidth=4 " unify set shiftwidth=4 " unify
set softtabstop=4 " Pressing backspace works like tabs set softtabstop=4 " Pressing backspace works like tabs
set tabstop=4 set tabstop=4
" use goimports for formatting
let g:go_fmt_command = "goimports"
" turn highlighting on
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_structs = 1
let g:go_highlight_operators = 1
let g:go_highlight_build_constraints = 1
let g:syntastic_go_checkers = ['go', 'golint', 'errcheck']
" Open go doc in vertical window, horizontal, or tab
au Filetype go nnoremap <leader>v :vsp <CR>:exe "GoDef" <CR>
au Filetype go nnoremap <leader>s :sp <CR>:exe "GoDef"<CR>
au Filetype go nnoremap <leader>t :tab split <CR>:exe "GoDef"<CR>

@ -157,8 +157,6 @@ set completeopt=menu,longest,preview " improve the way autocomplete works
autocmd WinEnter * call s:CloseIfOnlyNerdTreeLeft() autocmd WinEnter * call s:CloseIfOnlyNerdTreeLeft()
autocmd FileType go autocmd BufWritePre <buffer> Fmt
augroup jade augroup jade
au! BufRead,BufNewFile *.jade set syntax=jade au! BufRead,BufNewFile *.jade set syntax=jade
augroup END augroup END

Loading…
Cancel
Save