From 295f7a5d29cf7159bb402144cd4d382bdeeaa57b Mon Sep 17 00:00:00 2001 From: Martin Grenfell Date: Tue, 29 Nov 2011 08:38:28 +0000 Subject: [PATCH] shift the :command definitions to a common place - to be tidy Previously they were with their associated functions, but better to have them all in one place. --- plugin/syntastic.vim | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim index e51a872d..5a9ee9bf 100644 --- a/plugin/syntastic.vim +++ b/plugin/syntastic.vim @@ -51,9 +51,11 @@ if !exists("g:syntastic_mode_map") let g:syntastic_mode_map = { 'mode': 'active', 'active_filetypes': [], 'passive_filetypes': [] } endif +command! -nargs=0 SyntasticToggleMode call s:ToggleMode() +command SyntasticCheck -nargs=0 call s:UpdateErrors(0) redraw! +command Errors call s:ShowLocList() "refresh and redraw all the error info for this buf when saving or reading -command SyntasticCheck -nargs=0 call s:UpdateErrors(0) redraw! autocmd bufreadpost,bufwritepost * call s:UpdateErrors(1) function! s:UpdateErrors(auto_invoked) if &buftype == 'quickfix' @@ -112,8 +114,6 @@ function! s:CacheErrors() endif endfunction -command! -nargs=0 SyntasticToggleMode call s:ToggleMode() - "toggle the g:syntastic_mode_map['mode'] function! s:ToggleMode() if g:syntastic_mode_map['mode'] == "active" @@ -245,8 +245,6 @@ function! s:ShowLocList() endif endfunction -command Errors call s:ShowLocList() - "return a string representing the state of buffer according to "g:syntastic_stl_format "