From 6767281490b0c7c3b5404ad9a9ceca1ef8be371e Mon Sep 17 00:00:00 2001 From: Marcel Schneider Date: Thu, 5 Jan 2017 00:45:39 +0100 Subject: [PATCH] Add go specific mappings and settings --- vim/ftplugin/go.vim | 10 ++++++++++ vimrc.symlink | 10 ++++++++++ 2 files changed, 20 insertions(+) create mode 100644 vim/ftplugin/go.vim diff --git a/vim/ftplugin/go.vim b/vim/ftplugin/go.vim new file mode 100644 index 0000000..4b6d30e --- /dev/null +++ b/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 (go-run) +au FileType go nmap gi (go-imports) +au FileType go nmap b (go-build) +au FileType go nmap t (go-test) +au FileType go nmap c (go-coverage) +au FileType go nmap gd (go-doc) +au FileType go nmap ml (go-metalinter) diff --git a/vimrc.symlink b/vimrc.symlink index c313403..8e46584 100644 --- a/vimrc.symlink +++ b/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