Merge pull request #4 from kcotugno/clear-syntasitc-list-on-toggle

Reset/Check Syntasitc on toggle if need
This commit is contained in:
Kevin Cotugno 2020-10-29 19:14:59 -07:00 committed by GitHub
commit b1c9ea5964
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -234,7 +234,18 @@ let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
nnoremap <leader>y :SyntasticToggleMode<CR>
function ToggleSyntastic()
if !exists('b:syntastic_mode') || b:syntastic_mode == 'active'
let b:syntastic_mode = 'passive'
exec 'SyntasticReset'
else
let b:syntastic_mode = 'active'
exec 'SyntasticCheck'
end
endfunction
nnoremap <leader>y :call ToggleSyntastic()<CR>
" Tagbar
let g:tagbar_type_go = {