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:
parent
47147aad17
commit
295f7a5d29
@ -51,9 +51,11 @@ if !exists("g:syntastic_mode_map")
|
|||||||
let g:syntastic_mode_map = { 'mode': 'active', 'active_filetypes': [], 'passive_filetypes': [] }
|
let g:syntastic_mode_map = { 'mode': 'active', 'active_filetypes': [], 'passive_filetypes': [] }
|
||||||
endif
|
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
|
"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)
|
autocmd bufreadpost,bufwritepost * call s:UpdateErrors(1)
|
||||||
function! s:UpdateErrors(auto_invoked)
|
function! s:UpdateErrors(auto_invoked)
|
||||||
if &buftype == 'quickfix'
|
if &buftype == 'quickfix'
|
||||||
@ -112,8 +114,6 @@ function! s:CacheErrors()
|
|||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
command! -nargs=0 SyntasticToggleMode call s:ToggleMode()
|
|
||||||
|
|
||||||
"toggle the g:syntastic_mode_map['mode']
|
"toggle the g:syntastic_mode_map['mode']
|
||||||
function! s:ToggleMode()
|
function! s:ToggleMode()
|
||||||
if g:syntastic_mode_map['mode'] == "active"
|
if g:syntastic_mode_map['mode'] == "active"
|
||||||
@ -245,8 +245,6 @@ function! s:ShowLocList()
|
|||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
command Errors call s:ShowLocList()
|
|
||||||
|
|
||||||
"return a string representing the state of buffer according to
|
"return a string representing the state of buffer according to
|
||||||
"g:syntastic_stl_format
|
"g:syntastic_stl_format
|
||||||
"
|
"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user