Browse Source

Add go specific mappings and settings

coc
Schneider 8 years ago
parent
commit
6767281490
  1. 10
      vim/ftplugin/go.vim
  2. 10
      vimrc.symlink

10
vim/ftplugin/go.vim

@ -0,0 +1,10 @@
let g:syntastic_go_checkers = ['go', 'golint', 'govet']
let g:go_fmt_command = "goimports"
au FileType go nmap <F5> <Plug>(go-run)
au FileType go nmap <leader>gi <Plug>(go-imports)
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>gd <Plug>(go-doc)
au FileType go nmap <Leader>ml <Plug>(go-metalinter)

10
vimrc.symlink

@ -34,6 +34,7 @@ Plug 'bling/vim-airline'
Plug 'tpope/vim-ragtag'
Plug 'surround.vim'
Plug 'tpope/vim-repeat'
Plug 'vim-syntastic/syntastic'
" html / templates
Plug 'mattn/emmet-vim', { 'for': 'html' } " emmet support for vim - easily create markdup wth CSS-like syntax
@ -110,6 +111,15 @@ let NERDTreeShowHidden=1
let g:airline_powerline_fonts = 1
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_aggregate_errors = 1
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
" M A P P I N G S
let mapleader = ","
" CtrlP for Tags

Loading…
Cancel
Save