diff options
author | Cody Hiar <codyfh@gmail.com> | 2016-11-21 17:23:26 -0700 |
---|---|---|
committer | Cody Hiar <codyfh@gmail.com> | 2016-11-21 17:23:26 -0700 |
commit | 3dda6bbacbbf8239b2dfaef80b64b88eb9d22614 (patch) | |
tree | 3369ff004d67e5cc4d7ebf502c2743aa9335183d /plugin/vim-options.vim | |
parent | b797a8af0109d80ca8141c9c90139d078e64c185 (diff) |
Changing Syntastic to be off by default but easily invokeable by <leader>s
Diffstat (limited to 'plugin/vim-options.vim')
-rw-r--r-- | plugin/vim-options.vim | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/plugin/vim-options.vim b/plugin/vim-options.vim index 28cd9e1..34b3877 100644 --- a/plugin/vim-options.vim +++ b/plugin/vim-options.vim @@ -447,9 +447,23 @@ if !empty(glob(EditorDir.'/plugged/syntastic/plugin/syntastic.vim')) let g:syntastic_javascript_checkers = ['eslint'] let g:syntastic_always_populate_loc_list = 1 let g:syntastic_auto_loc_list = 0 - let g:syntastic_check_on_open = 1 - let g:syntastic_check_on_wq = 0 + let g:syntastic_check_on_open = 0 + let g:syntastic_check_on_wq = 1 let g:syntastic_aggregate_errors = 1 + let g:syntastic_mode_map = { 'mode': 'passive' } + function! ToggleSyntasticMode() +python << EOF +import vim +import ast +value = dict(vim.eval('g:syntastic_mode_map')) +vim.command('let l:syntastic_current_mode = \''+value['mode']+'\'') +EOF + SyntasticToggleMode + if l:syntastic_current_mode == 'passive' + SyntasticCheck + endif + endfunction + nnoremap <leader>s :call ToggleSyntasticMode()<CR> endif "----------------------------------------------------------------------------------------------------------------------- |