diff options
author | Cody Hiar <codyfh@gmail.com> | 2017-02-22 09:29:01 -0700 |
---|---|---|
committer | Cody Hiar <codyfh@gmail.com> | 2017-02-22 09:29:01 -0700 |
commit | af98fd089b65f3c432320d2fb8dbcd1288bb2561 (patch) | |
tree | 82a21d3c40ce3c4e7783eb9aec0fa72b108d6a79 | |
parent | e533ee467848aa3d204df5ecd8ea616ceb68ddc6 (diff) |
Adding back in the syntastic options, shouldn't have been missed
-rw-r--r-- | plugin/vim-options.vim | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/plugin/vim-options.vim b/plugin/vim-options.vim index 43244f9..a9b23ce 100644 --- a/plugin/vim-options.vim +++ b/plugin/vim-options.vim @@ -251,6 +251,37 @@ endif "----------------------------------------------------------------------------------------------------------------------- +" Syntastic +"----------------------------------------------------------------------------------------------------------------------- +if !empty(glob(EditorDir.'plugged/syntastic/plugin/syntastic.vim')) + let g:syntastic_php_checkers = ['php', 'phpcs'] + let g:syntastic_php_phpcs_args = "--standard=".$HOME."/PEARish.xml,PSR2,Symfony2" + 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 = 1 + let g:syntastic_aggregate_errors = 1 + let g:syntastic_mode_map = { 'mode': 'active' } + 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 +"----------------------------------------------------------------------------------------------------------------------- + + + +"----------------------------------------------------------------------------------------------------------------------- " Taboo "----------------------------------------------------------------------------------------------------------------------- if !empty(glob(EditorDir.'plugged/taboo.vim/plugin/taboo.vim')) |