From aa67390bd66a11e064a50d88456ae87691026fcb Mon Sep 17 00:00:00 2001 From: Martin Grenfell Date: Wed, 30 Nov 2011 19:56:27 +0000 Subject: [PATCH] make syntastic more active by default Enable more of the features by default while avoiding some of the more intrusive ones. Update the doc to reflect this. --- doc/syntastic.txt | 22 ++++++++++++++++++---- plugin/syntastic.vim | 6 +++--- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/doc/syntastic.txt b/doc/syntastic.txt index 61a250e2..7d8a03b3 100644 --- a/doc/syntastic.txt +++ b/doc/syntastic.txt @@ -142,28 +142,36 @@ current filetype is set to passive. See |'syntastic_mode_map'| for more info. 4. Options *syntastic-options* *'syntastic_enable_signs'* -Use this option to tell syntastic to use the |:sign| interface to mark syntax -errors: > +Default: 1 +Use this option to tell syntastic whether to use the |:sign| interface to mark +syntax errors: > let g:syntastic_enable_signs=1 < *'syntastic_enable_balloons'* -Use this option to tell syntastic to error messages in balloons when the mouse -is hovered over erroneous lines: > +Default: 1 +Use this option to tell syntastic whether to error messages in balloons when +the mouse is hovered over erroneous lines: > let g:syntastic_enable_balloons = 1 < Note that vim must be compiled with |+balloon_eval|. *'syntastic_auto_jump'* +Default: 0 Enable this option if you want the cursor to jump to the first detected error when saving or opening a file: > let g:syntastic_auto_jump=1 < *'syntastic_auto_loc_list'* +Default: 2 Use this option to tell syntastic to automatically open and/or close the |location-list| (see |syntastic-error-window|). +When set to 0 the error window will not be opened or closed automatically. > + let g:syntastic_auto_loc_list=0 +< + When set to 1 the error window will be automatically opened when errors are detected, and closed when none are detected. > let g:syntastic_auto_loc_list=1 @@ -174,6 +182,9 @@ detected, but not opened automatically. > < *'syntastic_mode_map'* +Default: { "mode": "active", + "active_filetypes": [], + "passive_filetypes": [] } Use this option to fine tune when automatic syntax checking is done (or not done). @@ -199,6 +210,9 @@ automatic checks are not done for any filetypes in the At runtime, the |:SyntasticToggleMode| command can be used to switch between active and passive mode. +If any of "mode", "active_filetypes", or "passive_filetypes" are not specified +then they will default to their default value as above. + *'syntastic_quiet_warnings'* Use this option if you only care about syntax errors, not warnings. When set, diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim index 476a3830..372d9879 100644 --- a/plugin/syntastic.vim +++ b/plugin/syntastic.vim @@ -24,15 +24,15 @@ if !s:running_windows endif if !exists("g:syntastic_enable_signs") || !has('signs') - let g:syntastic_enable_signs = 0 + let g:syntastic_enable_signs = 1 endif if !exists("g:syntastic_enable_balloons") || !has('balloon_eval') - let g:syntastic_enable_balloons = 0 + let g:syntastic_enable_balloons = 1 endif if !exists("g:syntastic_auto_loc_list") - let g:syntastic_auto_loc_list = 0 + let g:syntastic_auto_loc_list = 2 endif if !exists("g:syntastic_auto_jump")