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.
This commit is contained in:
Martin Grenfell 2011-11-29 08:38:28 +00:00
parent 47147aad17
commit 295f7a5d29

View File

@ -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) <bar> 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) <bar> 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
"