13 votes

How to auto fix common linting errors reported via syntastic?

As mentioned in the comments be aware of the consequences this modification has to you work environment (know exactly which eslint rules you use to "fix" things). To answer your question: adding the ...
JepZ's user avatar
  • 231
12 votes
Accepted

How to make Syntastic include sourced files for Bash syntax (as `shellcheck -x` does)?

As noted, the FAQ says: 4.5. Q. How can I pass additional arguments to a checker? A. In most cases a command line is constructed using an internal function named makeprgBuild(), which ...
muru's user avatar
  • 24.9k
11 votes
Accepted

How do I wrap the location-list by default (without turning on wrap for files)?

You can indeed use an autocommand: augroup MyStuff autocmd! autocmd FileType qf setlocal wrap augroup END This will affect the quickfix window, too, but I presume that would be desirable. You ...
Rich's user avatar
  • 32k
7 votes

How to auto fix common linting errors reported via syntastic?

The solution given in Jepz's answer didn't completely work for me. eslint was correctly called with the --fix option. However, maybe it's because of internals that have changed, but it seems like ...
Jerska's user avatar
  • 171
7 votes
Accepted

How to switch between syntastic error window and editor window

To switch between two windows see :h window-move-cursor. Here you'll use Ctrl-wj and Ctrl-wk, since the windows are horizontally split. Now to use :lnext and :lprev more easily you could use a ...
statox's user avatar
  • 49.9k
6 votes
Accepted

Stop some messages from syntastic

Yes, syntastic can filter out certain messages. Read :help 'syntastic_quiet_messages' for details. All you have to do is fill this dictionary in your vimrc with a regex like this: let g:...
Philipp Moers's user avatar
6 votes
Accepted

NASM and Syntastic: instruction not supported in 16-bit mode

This is the default in NASM, try using the BITS directive by putting BITS 64; at the top of the .asm file.
Evan Carroll's user avatar
  • 1,314
4 votes
Accepted

How do I configure syntastic to use Python3 in Ubuntu?

Using Ubuntu, I couldn't figure out what was calling python or to change the default environment for all instances of syntastic. That would have been desirable. Instead what I did was install flake8, ...
Evan Carroll's user avatar
  • 1,314
3 votes

How to make Syntastic include sourced files for Bash syntax (as `shellcheck -x` does)?

In case anyone is still looking for information on this, there are a few ways to resolve this issue. You can: set the path to the file with a -P|--source-path= quiet the message with a disable ...
Alissa H's user avatar
  • 131
3 votes

How to set a local variable for a plugin in a BufNewFile autocmd

Despite you can use autocmds to set the 'filetype', it is better to create a ~/.vim/filetype.vim, as mentioned in :help 43.2 and explained in Vim FAQ 26.8: A better alternative to the above ...
mMontu's user avatar
  • 6,640
2 votes

Can I force python-mode's (or syntastic's) error flags over the line number columns?

You can achieve this by adding set signcolumn=number to your .vimrc. Showing signs in the number column was added in v8.1.1564.
James Constable's user avatar
2 votes
Accepted

How to highlight in location list error for current line

Also answered here I just created this for my :Man viewer. It tracks the current item in the 'locationlist' window when navigating: function! s:visibleLoc() return len(filter(getwininfo(), {i,v -&...
TheMadsen's user avatar
  • 136
2 votes

Change color of signs in SignColumn/Gutter

Note: Written before OP added the relatively important detail that the signs are generated by Syntastic. Ergo, a general tossing of things against the wall to see what sticks rather than a quick ...
B Layer's user avatar
  • 19.8k
2 votes

vimrc if syntastic use

The has() always checks for features compiled into Vim (e.g. mostly what you can see in the output of :version with either a + or - prepended). It won't work to test for loaded plugins. What would ...
Christian Brabandt's user avatar
2 votes
Accepted

Temporarily Disable/Reenable YouCompleteMe Plugin

After you toggle the value of g:ycm_show_diagnostics_ui, run :YcmRestartServer and then reload the file with :e.
apollo's user avatar
  • 158
1 vote
Accepted

Add flake8 ignore comment automatically from syntastic location list

I guess one answer would be a mapping to (untested) $yi[<CR>A # noqa: <esc>p (I think $yi[<CR>put =' # noqa: '.@@<CR>J is equivalent.) You would want to map this in the ...
D. Ben Knoble's user avatar
  • 26.2k
1 vote

Vim opens another file instead of source (Syntastic?)

The flag let g:syntastic_auto_jump = 1 jumps to the first error as soon as :w is commanded, automatically. In case a header contains an error it will jump there immediately. Therefore, if the header ...
spaceKelan's user avatar
1 vote
Accepted

Change color of signs in SignColumn/Gutter

From the docs (:help syntastic-error-signs): Signs are colored using the Error and Todo syntax highlight groups by default (see |group-name|). If you wish to customize the colors for the signs, you ...
D. Ben Knoble's user avatar
  • 26.2k
1 vote
Accepted

What does this code snippet mean for Syntastic

That sets the mode of checking. From the syntastic docs: When set to "passive" syntastic only checks when the user calls :SyntasticCheck. So, instead of automatically running (say, when you save ...
muru's user avatar
  • 24.9k
1 vote

Indentation command `gg=G` for 'compressed' HTML doesn't unfold tags

A full vimscript solution could be to put each tag on its own line with a substitution and then rely on the built-in formatter: :%s/></>\r</g Gives: <html> <body> <h1>...
statox's user avatar
  • 49.9k
1 vote
Accepted

Open and Close Syntastic window with one mapping

You could use something like this: function! ToggleSyntastic() for i in range(1, winnr('$')) let bnum = winbufnr(i) if getbufvar(bnum, '&buftype') == 'quickfix' ...
statox's user avatar
  • 49.9k
1 vote

Temporarily Disable/Reenable YouCompleteMe Plugin

Here's my toggle for turning off diagnostics and the completion menu: "Toggle YouCompleteMe on and off with F3 function Toggle_ycm() if g:ycm_show_diagnostics_ui == 0 let g:...
Jeff_V's user avatar
  • 21
1 vote

SyntasticCheck C++ header

But this is still stupid and annoying. Or maybe that's just me. I had not noticed there's separate but similar options for C and C++. let g:syntastic_cpp_check_header Does the trick.
goldilocks's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible