diff options
Diffstat (limited to 'plugin/vim-options.vim')
-rw-r--r-- | plugin/vim-options.vim | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/plugin/vim-options.vim b/plugin/vim-options.vim index 73c590b..39fd706 100644 --- a/plugin/vim-options.vim +++ b/plugin/vim-options.vim @@ -235,7 +235,7 @@ endif " Argwrap "----------------------------------------------------------------------------------------------------------------------- if !empty(glob($EditorDir.'plugged/vim-argwrap/plugin/argwrap.vim')) - nnoremap <silent> <leader>a :ArgWrap<CR> + nnoremap <silent> <leader>w :ArgWrap<CR> endif "----------------------------------------------------------------------------------------------------------------------- @@ -322,6 +322,44 @@ endif "----------------------------------------------------------------------------------------------------------------------- +" Syntastic +"----------------------------------------------------------------------------------------------------------------------- +if !empty(glob($EditorDir.'plugged/syntastic/plugin/syntastic.vim')) + let g:syntastic_php_checkers = ['php', 'phpcs'] + let g:syntastic_javascript_checkers = ['eslint'] + let g:syntastic_python_checkers = ['pyton3', 'flake8', 'mypy'] + let g:syntastic_scss_checkers = ['sass_lint'] + let g:syntastic_php_phpcs_args = "--standard=/root/PEARish.xml,PSR2,Symfony2" + let g:syntastic_always_populate_loc_list = 1 + let g:syntastic_auto_loc_list = 0 + let g:syntastic_check_on_wq = 1 + let g:syntastic_check_on_open = 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 + let g:syntastic_check_on_wq = 0 + let g:syntastic_check_on_open = 0 + else + let g:syntastic_check_on_wq = 1 + let g:syntastic_check_on_open = 1 + endif + endfunction + nnoremap <leader>a :call ToggleSyntasticMode()<CR> +endif +"----------------------------------------------------------------------------------------------------------------------- + + + +"----------------------------------------------------------------------------------------------------------------------- " Taboo "----------------------------------------------------------------------------------------------------------------------- if !empty(glob($EditorDir.'plugged/taboo.vim/plugin/taboo.vim')) |