@ -36,6 +36,7 @@ CONTENTS *syntastic-contents*
5.2.Choosing the executable................|syntastic-config-exec|
5.2.Choosing the executable................|syntastic-config-exec|
5.3.Configuring specific checkers..........|syntastic-config-makeprg|
5.3.Configuring specific checkers..........|syntastic-config-makeprg|
5.4.Sorting errors.........................|syntastic-config-sort|
5.4.Sorting errors.........................|syntastic-config-sort|
5.5.Debugging..............................|syntastic-config-debug|
6.Notes........................................|syntastic-notes|
6.Notes........................................|syntastic-notes|
6.1.Handling of composite filetypes........|syntastic-composite|
6.1.Handling of composite filetypes........|syntastic-composite|
6.2.Editing files over network.............|syntastic-netrw|
6.2.Editing files over network.............|syntastic-netrw|
@ -46,14 +47,15 @@ CONTENTS *syntastic-contents*
7.2.Eclim..................................|syntastic-eclim|
7.2.Eclim..................................|syntastic-eclim|
7.3.The fish shell.........................|syntastic-fish|
7.3.The fish shell.........................|syntastic-fish|
7.4.The fizsh shell........................|syntastic-fizsh|
7.4.The fizsh shell........................|syntastic-fizsh|
7.5.powerline..............................|syntastic-powerline|
7.5.flagship...............................|syntastic-flagship|
7.6.The PowerShell shell...................|syntastic-powershell|
7.6.powerline..............................|syntastic-powerline|
7.7.python-mode............................|syntastic-pymode|
7.7.The PowerShell shell...................|syntastic-powershell|
7.8.vim-auto-save..........................|syntastic-vim-auto-save|
7.8.python-mode............................|syntastic-pymode|
7.9.vim-go.................................|syntastic-vim-go|
7.9.vim-auto-save..........................|syntastic-vim-auto-save|
7.10.vim-virtualenv........................|syntastic-vim-virtualenv|
7.10.vim-go................................|syntastic-vim-go|
7.11.YouCompleteMe.........................|syntastic-ycm|
7.11.vim-virtualenv........................|syntastic-vim-virtualenv|
7.12.The zsh shell and rvm.................|syntastic-zsh|
7.12.YouCompleteMe.........................|syntastic-ycm|
7.13.The zsh shell and MacVim..............|syntastic-zsh|
8.About........................................|syntastic-about|
8.About........................................|syntastic-about|
9.License......................................|syntastic-license|
9.License......................................|syntastic-license|
@ -85,7 +87,7 @@ checker integrations, see the guide on the GitHub wiki:
1.1. Quick start *syntastic-quickstart*
1.1. Quick start *syntastic-quickstart*
Syntastic comes preconfigured with a default list of enabled checkers per
Syntastic comes preconfigured with a default list of enabled checkers per
filetype. This list is kept reasonably short to prevent slowing down Vim or
| filetype| . This list is kept reasonably short to prevent slowing down Vim or
trying to use conflicting checkers.
trying to use conflicting checkers.
You can see the list of checkers available for the current filetype with the
You can see the list of checkers available for the current filetype with the
@ -109,10 +111,10 @@ these commands, or perhaps install a plugin such as Tim Pope's 'unimpaired'
------------------------------------------------------------------------------
------------------------------------------------------------------------------
1.2. Recommended settings *syntastic-recommended*
1.2. Recommended settings *syntastic-recommended*
Syntastic has a large number of options that can be configured, and th e
Syntastic has numerous options that can be configured, and the defaults ar e
defaults are not particularly well suitable for new users. It is recommended
not particularly well suitable for new users. It is recommended that you start
that you start by adding the following lines to your vimrc, and return to them
by adding the following lines to your vimrc, and return to them later as
later as needed: >
needed: >
set statusline+=%#warningmsg#
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
set statusline+=%*
@ -157,16 +159,21 @@ Something like this could be more useful: >
When syntax errors are detected a flag will be shown. The content of the flag
When syntax errors are detected a flag will be shown. The content of the flag
is derived from the |syntastic_stl_format| option.
is derived from the |syntastic_stl_format| option.
Please note that these settings might conflict with other Vim plugins that
change the way statusline works. Refer to these plugins' documentation for
possible solutions. See also |syntastic-powerline| below if you're using the
"powerline" Vim plugin (https://github.com/powerline/powerline).
------------------------------------------------------------------------------
------------------------------------------------------------------------------
2.2. Error signs *syntastic-error-signs*
2.2. Error signs *syntastic-error-signs*
Syntastic uses the |:sign| commands to mark lines with errors and warnings in
Syntastic uses the |:sign| commands (provided that the |+signs| feature is
the sign column. To enable this feature, use the |'syntastic_enable_signs'|
compiled in) to mark lines with errors and warnings in the sign column. To
option.
enable this feature, use the |'syntastic_enable_signs'| option.
Signs are colored using the Error and Todo syntax highlight groups by default.
Signs are colored using the Error and Todo syntax highlight groups by default
If you wish to customize the colors for the signs, you can use the following
(see |group-name|). If you wish to customize the colors for the signs, you
groups:
can use the following groups:
SyntasticErrorSign - For syntax errors, links to 'error' by default
SyntasticErrorSign - For syntax errors, links to 'error' by default
SyntasticWarningSign - For syntax warnings, links to 'todo' by default
SyntasticWarningSign - For syntax warnings, links to 'todo' by default
SyntasticStyleErrorSign - For style errors, links to 'SyntasticErrorSign'
SyntasticStyleErrorSign - For style errors, links to 'SyntasticErrorSign'
@ -193,17 +200,13 @@ Example: >
You can use the |:Errors| command to display the errors for the current buffer
You can use the |:Errors| command to display the errors for the current buffer
in the |location-list|.
in the |location-list|.
Note that when you use |:Errors| the current location list is overwritten with
Syntastic's own location list. The location list is also overwritten when
|syntastic_auto_jump| is non-zero and the cursor has to jump to an issue.
By default syntastic doesn't fill the |location-list| with the errors found by
By default syntastic doesn't fill the |location-list| with the errors found by
the checkers, in order to reduce clashes with other plugins. Consequently, if
the checkers, in order to reduce clashes with other plugins. Consequently, if
you run |:lopen| or |:lwindow| rather than |:Errors| to open the error window you
you run |:lopen| or |:lwindow| rather than |:Errors| to open the error window
wouldn't see syntastic's list of errors. If you insist on using |:lopen| or
you wouldn't see syntastic's list of errors. If you insist on using |:lopen|
|:lwindow| you should either run |:SyntasticSetLoclist| after running the checks,
or |:lwindow| you should either run |:SyntasticSetLoclist| after running the
or set |syntastic_always_populate_loc_list| which tells syntastic to update the
checks, or set |syntastic_always_populate_loc_list| which tells syntastic to
|location-list| automatically.
update the |location-list| automatically.
------------------------------------------------------------------------------
------------------------------------------------------------------------------
2.4. Error highlighting *syntastic-highlighting*
2.4. Error highlighting *syntastic-highlighting*
@ -250,7 +253,8 @@ You can selectively disable some of the errors found by checkers either
using |'syntastic_quiet_messages'|, or by specifying a list of patterns in
using |'syntastic_quiet_messages'|, or by specifying a list of patterns in
|'syntastic_ignore_files'|.
|'syntastic_ignore_files'|.
See also: |'syntastic_<filetype>_<checker>_quiet_messages'|.
See also: |'syntastic_<filetype>_<checker>_quiet_messages'| and
|'b:syntastic_skip_checks'|.
==============================================================================
==============================================================================
3. Commands *syntastic-commands*
3. Commands *syntastic-commands*
@ -272,15 +276,15 @@ for more info.
Manually cause a syntax check to be done. By default the checkers in the
Manually cause a syntax check to be done. By default the checkers in the
|'g:syntastic_<filetype>_checkers'| or |'b:syntastic_checkers'| lists are run,
|'g:syntastic_<filetype>_checkers'| or |'b:syntastic_checkers'| lists are run,
cf. |syntastic-filetype-checkers|. If |syntastic_aggregate_errors| is unset
cf. |syntastic-filetype-checkers|. If |' syntastic_aggregate_errors' | is unset
(which is the default), checking stops the first time a checker reports any
(which is the default), checking stops the first time a checker reports any
errors; if |syntastic_aggregate_errors| is set, all checkers that apply are run
errors; if |' syntastic_aggregate_errors' | is set, all checkers that apply are
in turn, and all errors found are aggregated in a single list.
run in turn, and all errors found are aggregated in a single list.
The command may be followed by a (space separated) list of checkers. In this
The command may be followed by a (space separated) list of checkers. In this
case |'g:syntastic_<filetype>_checkers'| and |'b:syntastic_checkers'| are
case |'g:syntastic_<filetype>_checkers'| and |'b:syntastic_checkers'| are
ignored, and the checkers named by the command's arguments are run instead, in
ignored, and the checkers named by the command's arguments are run instead, in
the order specified. The rules of |syntastic_aggregate_errors | still apply.
the order specified. The set by |'syntastic_aggregate_errors' | still apply.
Example: >
Example: >
:SyntasticCheck flake8 pylint
:SyntasticCheck flake8 pylint
@ -300,24 +304,23 @@ Resets the list of errors and turns off all error notifiers.
If |'syntastic_always_populate_loc_list'| is not set, the |location-list| is
If |'syntastic_always_populate_loc_list'| is not set, the |location-list| is
not filled in automatically with the list of errors detected by the checkers.
not filled in automatically with the list of errors detected by the checkers.
This is useful if you run syntastic along with other plugins that use location
This is useful if you run syntastic along with other plugins that use location
lists. The |:SyntasticSetLoclist| command allows you to stick the errors into
lists. The |:SyntasticSetLoclist| command allows you to stick the errors into
the location list explicitly.
the location list explicitly.
==============================================================================
==============================================================================
4. Global Options *syntastic-global-options*
4. Global Options *syntastic-global-options*
*'syntastic_check_on_open'*
*'syntastic_check_on_open'*
Default: 0
Default: 0
If enabled, syntastic will do syntax checks when buffers are first loaded a s
If this variable is enabled, syntastic in active mode will run syntax check s
well as on saving >
when buffers are first loaded, as well as on saving: >
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_open = 1
<
<
*'syntastic_check_on_wq'*
*'syntastic_check_on_wq'*
Default: 1
Default: 1
Normally syntastic runs syntax checks whenever buffers are written to disk.
In active mode syntax checks are normally run whenever buffers are written to
If you want to skip these checks when you issue |:wq|, |:x|, and |:ZZ|, set this
disk, even when the writes happen just before quitting Vim. If you want to
variable to 0. >
skip checks when you issue |:wq|, |:x|, and |:ZZ|, set this variable to 0: >
let g:syntastic_check_on_wq = 0
let g:syntastic_check_on_wq = 0
<
<
*'syntastic_aggregate_errors'*
*'syntastic_aggregate_errors'*
@ -331,36 +334,37 @@ time a checker finds any errors. >
*'syntastic_id_checkers'*
*'syntastic_id_checkers'*
Default: 1
Default: 1
When results from multiple checkers are aggregated in a single error list
When results from multiple checkers are aggregated in a single error list
(that is either when |syntastic_aggregate_errors| is enabled, or when checking
(that is either when |'syntastic_aggregate_errors'| is enabled, or when
a file with a composite filetype), it might not be immediately obvious which
checking a file with a composite filetype), it might not be immediately
checker has produced a given error message. This variable instructs syntastic
obvious which checker has produced a given error message. This variable
to label error messages with the names of the checkers that created them. >
instructs syntastic to label error messages with the names of the checkers
that created them. >
let g:syntastic_id_checkers = 0
let g:syntastic_id_checkers = 0
<
<
*'syntastic_sort_aggregated_errors'*
*'syntastic_sort_aggregated_errors'*
Default: 1
Default: 1
By default, when results from multiple checkers are aggregated in a single
By default, when results from multiple checkers are aggregated in a single
error list (that is either when |syntastic_aggregate_errors| is enabled, or
error list (that is either when |' syntastic_aggregate_errors' | is enabled,
when checking a file with a composite filetype), errors are grouped by file,
or when checking a file with a composite filetype), errors are grouped by
then sorted by line number, then grouped by type (namely errors take precedence
file, then sorted by line number, then grouped by type (namely errors take
over warnings), then they are sorted by column number. If you want to leave
precedence over warnings), then they are sorted by column number. If you want
messages grouped by checker output, set this variable to 0. >
to leave messages grouped by checker output, set this variable to 0: >
let g:syntastic_sort_aggregated_errors = 0
let g:syntastic_sort_aggregated_errors = 0
<
<
*'syntastic_echo_current_error'*
*'syntastic_echo_current_error'*
Default: 1
Default: 1
If enabled, syntastic will echo current error to the command window. If
If enabled, syntastic will echo current error to the command window. If
multiple errors are found on the same line, |syntastic_cursor_columns| is used
multiple errors are found on the same line, |' syntastic_cursor_columns' | is
to decide which one is shown. >
used to decide which one is shown. >
let g:syntastic_echo_current_error = 1
let g:syntastic_echo_current_error = 1
<
<
*'syntastic_cursor_columns'*
*'syntastic_cursor_columns'*
Default: 1
Default: 1
This option controls which errors are echoed to the command window if
This option controls which errors are echoed to the command window if
|syntastic_echo_current_error| is set and multiple errors are found on the same
|' syntastic_echo_current_error' | is set and multiple errors are found on the
line. When the option is enabled, the first error corresponding to the current
same line. When the option is enabled, the first error corresponding to the
column is show. Otherwise, the first error on the current line is echoed,
current column is shown . Otherwise, the first error on the current line is
regardless of the cursor position on the current line.
echoed, regardless of the cursor position on the current line.
When dealing with very large lists of errors, disabling this option can speed
When dealing with very large lists of errors, disabling this option can speed
up navigation significantly: >
up navigation significantly: >
@ -401,10 +405,17 @@ errors (where possible). Highlighting can be turned off with the following >
<
<
*'syntastic_always_populate_loc_list'*
*'syntastic_always_populate_loc_list'*
Default: 0
Default: 0
Enable this option to tell syntastic to always stick any detected errors into
By default syntastic doesn't fill the |location-list| with the errors found
the |location-list|: >
by the checkers, in order to reduce clashes with other plugins. Enable this
option to tell syntastic to always stick any detected errors into the
|location-list|: >
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_always_populate_loc_list = 1
<
<
Please note that if |'syntastic_auto_jump'| is set to a non-zero value the
location list is overwritten with Syntastic's own list when taking a jump,
regardless of the value of |'syntastic_always_populate_loc_list'|. The
location list is also overwritten when running the |:Errors| command.
*'syntastic_auto_jump'*
*'syntastic_auto_jump'*
Default: 0
Default: 0
Enable this option if you want the cursor to jump to the first detected issue
Enable this option if you want the cursor to jump to the first detected issue
@ -425,12 +436,17 @@ When set to 3 the cursor will jump to the first error detected, if any. If
all issues detected are warnings, the cursor won't jump. >
all issues detected are warnings, the cursor won't jump. >
let g:syntastic_auto_jump = 3
let g:syntastic_auto_jump = 3
<
<
Please note that in either situation taking the jump also has the side effect
of the location list being overwritten with Syntastic's own location list,
regardless of the value of |'syntastic_always_populate_loc_list'|.
*'syntastic_auto_loc_list'*
*'syntastic_auto_loc_list'*
Default: 2
Default: 2
Use this option to tell syntastic to automatically open and/or close the
Use this option to tell syntastic to automatically open and/or close the
|location-list| (see |syntastic-error-window|).
|location-list| (see |syntastic-error-window|).
When set to 0 the error window will not be opened or closed automatically. >
When set to 0 the error window will be neither opened nor closed
automatically. >
let g:syntastic_auto_loc_list = 0
let g:syntastic_auto_loc_list = 0
<
<
When set to 1 the error window will be automatically opened when errors are
When set to 1 the error window will be automatically opened when errors are
@ -440,6 +456,10 @@ detected, and closed when none are detected. >
When set to 2 the error window will be automatically closed when no errors are
When set to 2 the error window will be automatically closed when no errors are
detected, but not opened automatically. >
detected, but not opened automatically. >
let g:syntastic_auto_loc_list = 2
let g:syntastic_auto_loc_list = 2
<
When set to 3 the error window will be automatically opened when errors are
detected, but not closed automatically. >
let g:syntastic_auto_loc_list = 3
<
<
*'syntastic_loc_list_height'*
*'syntastic_loc_list_height'*
Default: 10
Default: 10
@ -451,8 +471,8 @@ opens. >
Default: []
Default: []
Use this option to specify files that syntastic should never check. It's a
Use this option to specify files that syntastic should never check. It's a
list of |regular-expression| patterns. The full paths of files (see |::p|) are
list of |regular-expression| patterns. The full paths of files (see |::p|) are
matched against these patterns, and the matches are case sensitive. Use |\c|
matched against these patterns, and the matches are case- sensitive. Use |\c|
to specify case insensitive patterns. Example: >
to specify case- insensitive patterns. Example: >
let g:syntastic_ignore_files = ['\m^/usr/include/', '\m\c\.h$']
let g:syntastic_ignore_files = ['\m^/usr/include/', '\m\c\.h$']
<
<
*'syntastic_filetype_map'*
*'syntastic_filetype_map'*
@ -461,7 +481,7 @@ Use this option to map non-standard filetypes to standard ones. Corresponding
checkers are mapped accordingly, which allows syntastic to check files with
checkers are mapped accordingly, which allows syntastic to check files with
non-standard filetypes: >
non-standard filetypes: >
let g:syntastic_filetype_map = {
let g:syntastic_filetype_map = {
\ "latex": "tex",
\ "p lain tex": "tex",
\ "gentoo-metadata": "xml" }
\ "gentoo-metadata": "xml" }
<
<
Composite filetypes can also be mapped to simple types, which disables the
Composite filetypes can also be mapped to simple types, which disables the
@ -527,10 +547,10 @@ overriding filters, cf. |filter-overrides|).
"level" - takes one of two values, "warnings" or "errors"
"level" - takes one of two values, "warnings" or "errors"
"type" - can be either "syntax" or "style"
"type" - can be either "syntax" or "style"
"regex" - is matched against the messages' text as a case insensitive
"regex" - each item in list is matched against the messages' text as a
|regular-expression|
case-insensitive |regular-expression|
"file" - is matched against the filenames the messages refer to, as a
"file" - each item in list is matched against the filenames the messages
case sensitive |regular-expression|.
refer to, as a case- sensitive |regular-expression|.
If a key is prefixed by an exclamation mark "!", the corresponding filter is
If a key is prefixed by an exclamation mark "!", the corresponding filter is
negated (i.e. the above example silences all messages that are NOT errors).
negated (i.e. the above example silences all messages that are NOT errors).
@ -564,12 +584,25 @@ ones produced by "pylint": >
Default: [Syntax: line:%F (%t)]
Default: [Syntax: line:%F (%t)]
Use this option to control what the syntastic statusline text contains. Several
Use this option to control what the syntastic statusline text contains. Several
magic flags are available to insert information:
magic flags are available to insert information:
%e - number of errors
%e - number of errors
%w - number of warnings
%w - number of warnings
%t - total number of warnings and errors
%t - total number of warnings and errors
%ne - filename of file containing first error
%nw - filename of file containing first warning
%N - filename of file containing first warning or error
%pe - filename with path of file containing first error
%pw - filename with path of file containing first warning
%P - filename with path of file containing first warning or error
%fe - line number of first error
%fe - line number of first error
%fw - line number of first warning
%fw - line number of first warning
%F - line number of first warning or error
%F - line number of first warning or error
These flags accept width and alignment controls similar to the ones used by
|'statusline'| flags:
%-0{minwid}.{maxwid}{flag}
All fields except {flag} are optional. A single percent sign can be given as
"%%".
Several additional flags are available to hide text under certain conditions:
Several additional flags are available to hide text under certain conditions:
%E{...} - hide the text in the brackets unless there are errors
%E{...} - hide the text in the brackets unless there are errors
@ -611,7 +644,6 @@ The above variable can be used to disable exit code checks in syntastic.
*'syntastic_shell'*
*'syntastic_shell'*
Default: Vim's 'shell'
Default: Vim's 'shell'
This is the (full path to) the shell syntastic will use to run the checkers.
This is the (full path to) the shell syntastic will use to run the checkers.
On UNIX and Mac OS-X this shell must accept Bourne-compatible syntax for
On UNIX and Mac OS-X this shell must accept Bourne-compatible syntax for
file "stdout" and "stderr" redirections ">file" and "2>file". Examples of
file "stdout" and "stderr" redirections ">file" and "2>file". Examples of
@ -623,6 +655,13 @@ operations. It must take care to initialize all environment variables needed
by the checkers you're using. Example: >
by the checkers you're using. Example: >
let g:syntastic_shell = "/bin/sh"
let g:syntastic_shell = "/bin/sh"
<
<
*'syntastic_nested_autocommands'*
Default: 0
Controls whether syntastic's autocommands |BufReadPost| and |BufWritePost|
are called from other |BufReadPost| and |BufWritePost| autocommands (see
|autocmd-nested|). This is known to trigger interoperability problems with
other plugins, so only enable it if you actually need that functionality.
*'syntastic_debug'*
*'syntastic_debug'*
Default: 0
Default: 0
Set this to the sum of one or more of the following flags to enable
Set this to the sum of one or more of the following flags to enable
@ -779,7 +818,26 @@ this variable, that takes precedence over it in the buffers where it is
defined.
defined.
For aggregated lists (see |syntastic-aggregating-errors|) these variables are
For aggregated lists (see |syntastic-aggregating-errors|) these variables are
ignored if |syntastic_sort_aggregated_errors| is set (which is the default).
ignored if |'syntastic_sort_aggregated_errors'| is set (which is the default).
------------------------------------------------------------------------------
5.5 Debugging *syntastic-config-debug*
Syntastic can log a trace of its working to Vim's |message-history|. To verify
the command line constructed by syntastic to run a checker, set the variable
|'syntastic_debug'| to a non-zero value, run the checker, then run |:mes| to
display the messages, and look for "makeprg" in the output.
From a user's perspective, the useful values for |'syntastic_debug'| are 1, 3,
and 33:
1 - logs syntastic's workflow
3 - logs workflow, checker's output, and |location-list| manipulations
33 - logs workflow and checker-specific details (such as version checks).
Debug logs can be saved to a file; see |'syntastic_debug_file'| for details.
Setting |'syntastic_debug'| to 0 turns off logging.
==============================================================================
==============================================================================
6. Notes *syntastic-notes*
6. Notes *syntastic-notes*
@ -791,7 +849,7 @@ Some Vim plugins use composite filetypes, such as "django.python" or
"handlebars.html". Normally, syntastic deals with this situation by splitting
"handlebars.html". Normally, syntastic deals with this situation by splitting
the filetype in its simple components, and calling all checkers that apply.
the filetype in its simple components, and calling all checkers that apply.
If this behaviour is not desirable, you can disable it by mapping the
If this behaviour is not desirable, you can disable it by mapping the
composite filetypes to a simple ones using |syntastic_filetype_map|, e.g.: >
composite filetypes to simple ones using |' syntastic_filetype_map' |, e.g.: >
let g:syntastic_filetype_map = { "handlebars.html": "handlebars" }
let g:syntastic_filetype_map = { "handlebars.html": "handlebars" }
<
<
------------------------------------------------------------------------------
------------------------------------------------------------------------------
@ -808,7 +866,7 @@ checkers, without any translation or conversion.
The 'shellslash' option is relevant only on Windows systems. This option
The 'shellslash' option is relevant only on Windows systems. This option
determines (among other things) the rules for quoting command lines, and there
determines (among other things) the rules for quoting command lines, and there
is no easy way for syntastic to make sure its state is appropriate for your
is no easy way for syntastic to make sure its state is appropriate for your
shell. It should be turned off if your 'shell' (or |g:syntastic_shell |) is
shell. It should be turned off if your 'shell' (or |'syntastic_shell' |) is
"cmd.exe", and on for shells that expect an UNIX-like syntax, such as Cygwin's
"cmd.exe", and on for shells that expect an UNIX-like syntax, such as Cygwin's
"sh". Most checkers will stop working if 'shellslash' is set to the wrong
"sh". Most checkers will stop working if 'shellslash' is set to the wrong
value.
value.
@ -831,7 +889,7 @@ quickfix windows.
The "csh" and "tcsh" shells are mostly compatible with syntastic. However,
The "csh" and "tcsh" shells are mostly compatible with syntastic. However,
some checkers assume Bourne shell syntax for redirecting "stderr". For this
some checkers assume Bourne shell syntax for redirecting "stderr". For this
reason, you should point |g:syntastic_shell | to a Bourne-compatible shell,
reason, you should point |'syntastic_shell' | to a Bourne-compatible shell,
such as "zsh", "bash", "ksh", or even the original Bourne "sh": >
such as "zsh", "bash", "ksh", or even the original Bourne "sh": >
let g:syntastic_shell = "/bin/sh"
let g:syntastic_shell = "/bin/sh"
<
<
@ -853,7 +911,7 @@ details.
At the time of this writing the "fish" shell (see http://fishshell.com/)
At the time of this writing the "fish" shell (see http://fishshell.com/)
doesn't support the standard UNIX syntax for file redirections, and thus it
doesn't support the standard UNIX syntax for file redirections, and thus it
can't be used together with syntastic. You can however set |g:syntastic_shell |
can't be used together with syntastic. You can however set |'syntastic_shell' |
to a more traditional shell, such as "zsh", "bash", "ksh", or even the
to a more traditional shell, such as "zsh", "bash", "ksh", or even the
original Bourne "sh": >
original Bourne "sh": >
let g:syntastic_shell = "/bin/sh"
let g:syntastic_shell = "/bin/sh"
@ -872,7 +930,17 @@ interactive features of "fizsh". Using a more traditional shell such as "zsh",
let g:syntastic_shell = "/bin/sh"
let g:syntastic_shell = "/bin/sh"
<
<
------------------------------------------------------------------------------
------------------------------------------------------------------------------
7.5. powerline *syntastic-powerline*
7.5 flagship *syntastic-flagship*
The "flagship" Vim plugin (https://github.com/tpope/vim-flagship) has its
own mechanism of showing flags on the |'statusline'|. To allow "flagship"
to manage syntastic's statusline flag add the following |autocommand| to
your vimrc, rather than explicitly adding the flag to your |'statusline'| as
described in the |syntastic-statusline-flag| section above: >
autocmd User Flags call Hoist("window", "SyntasticStatuslineFlag")
<
------------------------------------------------------------------------------
7.6. powerline *syntastic-powerline*
The "powerline" Vim plugin (https://github.com/powerline/powerline) comes
The "powerline" Vim plugin (https://github.com/powerline/powerline) comes
packaged with a syntastic segment. To customize this segment create a file
packaged with a syntastic segment. To customize this segment create a file
@ -889,7 +957,7 @@ packaged with a syntastic segment. To customize this segment create a file
}
}
<
<
------------------------------------------------------------------------------
------------------------------------------------------------------------------
7.6 . The PowerShell shell *syntastic-powershell*
7.7 . The PowerShell shell *syntastic-powershell*
At the time of this writing, syntastic is not compatible with using "Windows
At the time of this writing, syntastic is not compatible with using "Windows
PowerShell" (http://technet.microsoft.com/en-us/library/bb978526.aspx) as Vim's
PowerShell" (http://technet.microsoft.com/en-us/library/bb978526.aspx) as Vim's
@ -898,38 +966,36 @@ Vim's 'shell' to a more traditional program, such as "cmd.exe": >
set shell=cmd.exe
set shell=cmd.exe
<
<
------------------------------------------------------------------------------
------------------------------------------------------------------------------
7.7 python-mode *syntastic-pymode*
7.8 python-mode *syntastic-pymode*
Syntastic can be used along with the "python-mode" Vim plugin (see
Syntastic can be used along with the "python-mode" Vim plugin (see
https://github.com/klen/python-mode). However, they both run syntax checks by
https://github.com/klen/python-mode). However, they both run syntax checks by
default when you save buffers to disk, and this is probably not what you want.
default when you save buffers to disk, and this is probably not what you want.
To avoid both plugins opening error windows, you can either set passive mode
To avoid both plugins opening error windows, you can either set passive mode
for python in syntastic (see |syntastic_mode_map|), or disable lint checks in
for python in syntastic (see |' syntastic_mode_map' |), or disable lint checks in
"python-mode", by setting |pymode_lint_write| to 0. E.g.: >
"python-mode", by setting |pymode_lint_on_ write| to 0. E.g.: >
let g:pymode_lint_write = 0
let g:pymode_lint_on_ write = 0
<
<
------------------------------------------------------------------------------
------------------------------------------------------------------------------
7.8 . vim-auto-save *syntastic-vim-auto-save*
7.9 . vim-auto-save *syntastic-vim-auto-save*
Syntastic can be used together with the "vim-auto-save" Vim plugin (see
Syntastic can be used together with the "vim-auto-save" Vim plugin (see
https://github.com/907th/vim-auto-save). However, syntastic checks in active
https://github.com/907th/vim-auto-save). However, syntastic checks in active
mode only work with "vim-auto-save" version 0.1.7 or later.
mode only work with "vim-auto-save" version 0.1.7 or later.
------------------------------------------------------------------------------
------------------------------------------------------------------------------
7.9. vim-go *syntastic-vim-go*
7.10. vim-go *syntastic-vim-go*
The "vim-go" Vim plugin (https://github.com/fatih/vim-go) uses |quickfix|
Syntastic can be used along with the "vim-go" Vim plugin (see
lists, and thus doesn't conflict with syntastic (which uses |location-list|
https://github.com/fatih/vim-go). However, both "vim-go" and syntastic run
lists). However, both "vim-go" and syntastic run syntax checks by default
syntax checks by default when you save buffers to disk. To avoid conflicts,
when you save buffers to disk, and this can have confusing results. To
you have to either set passive mode in syntastic for the go filetype (see
avoid both plugins opening error windows, you can either set passive
|syntastic_mode_map|), or prevent "vim-go" from showing a quickfix window when
mode for go in syntastic (see |syntastic_mode_map|), or prevent "vim-go"
|g:go_fmt_command| fails, by setting |g:go_fmt_fail_silently| to 1. E.g.: >
from showing a quickfix window when |g:go_fmt_command| fails, by setting
|g:go_fmt_fail_silently| to 1. E.g.: >
let g:go_fmt_fail_silently = 1
let g:go_fmt_fail_silently = 1
<
<
------------------------------------------------------------------------------
------------------------------------------------------------------------------
7.10 . vim-virtualenv *syntastic-vim-virtualenv*
7.11 . vim-virtualenv *syntastic-vim-virtualenv*
At the time of this writing, syntastic can't run checkers installed
At the time of this writing, syntastic can't run checkers installed
in Python virtual environments activated by "vim-virtualenv" (see
in Python virtual environments activated by "vim-virtualenv" (see
@ -937,26 +1003,27 @@ https://github.com/jmcantrell/vim-virtualenv). This is a limitation of
"vim-virtualenv".
"vim-virtualenv".
------------------------------------------------------------------------------
------------------------------------------------------------------------------
7.11 YouCompleteMe *syntastic-ycm*
7.12 YouCompleteMe *syntastic-ycm*
Syntastic can be used together with the "YouCompleteMe" Vim plugin (see
Syntastic can be used together with the "YouCompleteMe" Vim plugin (see
http://valloric.github.io/YouCompleteMe/). However, by default "YouCompleteMe"
http://valloric.github.io/YouCompleteMe/). However, by default "YouCompleteMe"
disables syntastic's checkers for the "c", "cpp", "objc", and "objcpp"
disables syntastic's checkers for the "c", "cpp", "objc", and "objcpp"
filetypes, in order to allow its own checkers to run. If you want to use YCM's
filetypes, in order to allow its own checkers to run. If you want to use YCM's
identifier completer but still run syntastic's checkers for those filetypes you
identifier completer but still run syntastic's checkers for those filetypes you
have to set |ycm_show_diagnostics_ui| to 0. E.g.: >
have to set |g: ycm_show_diagnostics_ui| to 0. E.g.: >
let g:ycm_show_diagnostics_ui = 0
let g:ycm_show_diagnostics_ui = 0
<
<
------------------------------------------------------------------------------
------------------------------------------------------------------------------
7.12 The zsh shell and rvm *syntastic-zsh*
7.13 The zsh shell and MacVim *syntastic-zsh*
If you're running MacVim together with the "zsh" shell (http://www.zsh.org/)
If you're running MacVim together with the "zsh" shell (http://www.zsh.org/)
and "rvm" (https://rvm.io/), you need to be aware that MacVim does not source
you need to be aware that MacVim does not source your .zshrc file, but will
the .zshrc file, but will source a .zshenv file. Consequently you have to
source a .zshenv file. Consequently you have to move any setup steps relevant
either source the "rvm" scripts from within .zshenv, or just set your shell to
to the checkers you're using from .zshrc to .zshenv, otherwise your checkers
"sh": >
will misbehave when run by syntastic. This is particularly important for
let g:syntastic_shell = "/bin/sh"
programs such as "rvm" (https://rvm.io/) or "rbenv" (http://rbenv.org/), that
<
rely on setting environment variables.
==============================================================================
==============================================================================
8. About *syntastic-about*
8. About *syntastic-about*