Created
February 17, 2017 17:14
-
-
Save jgworks/16ac999ac066248bddd27fb63ca24fc6 to your computer and use it in GitHub Desktop.
vim-go shortcuts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
command! W w | |
command! Q q | |
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:go_fmt_command = "goimports" | |
let g:go_metalinter_enabled = 1 | |
"au FileType go nmap <Leader>r <Plug>(go-run) | |
"au FileType go nmap <Leader>b <Plug>(go-build) | |
"au FileType go nmap <Leader>t <Plug>(go-test) | |
"au FileType go nmap <Leader>c <Plug>(go-coverage) | |
au FileType go nmap <Leader>dg <Plug>(go-def) | |
au FileType go nmap <Leader>ds <Plug>(go-def-split) | |
au FileType go nmap <Leader>dv <Plug>(go-def-vertical) | |
au FileType go nmap <Leader>dt <Plug>(go-def-tab) | |
au FileType go nmap <Leader>gd <Plug>(go-doc) | |
au FileType go nmap <Leader>gv <Plug>(go-doc-vertical) | |
au FileType go nmap <Leader>s <Plug>(go-implements) | |
au FileType go nmap <Leader>i <Plug>(go-info) | |
au FileType go nmap <Leader>e <Plug>(go-rename) | |
au FileType go nmap <Leader>gr <Plug>(go-referrers) | |
au FileType go nmap <Leader>gc <Plug>(go-callers) | |
au FileType go nmap <Leader>ge <Plug>(go-callees) | |
map <C-n> :NERDTreeToggle<CR> | |
"How can I close vim if the only window left open is a NERDTree? | |
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment