How to configure syntax for vim?

So, I git cloned the ~/.vim/bundle repository and installed the pathogen. I can be sure that the pathogen works great, as my other plugins in the kit all work fine. After some time, it seems that the syntax should work outside the field for c code. I also checked that I have all the executables specified in syntastic/syntax_checkers/c/ .

Here is part of my .vimrc file:

 " syntastic let g:syntastic_auto_loc_list=1 let g:syntastic_disabled_filetypes=['html'] let g:syntastic_enable_signs=1 

When I open the * .c file and do :SyntasticCheck , nothing happens. There are no errors in which the complaint command was not found, so the syntax is loaded. However, even if the * .c file that is currently open contains an error syntax error, the syntax does not show anything.

This is the first time I'm using syntax, so I really don't know how to call it correctly.

I also tried :SyntasticCheck [c] and received the following error message:

 Error detected while processing function <SNR>_22_UpdateErrors..<SNR>22_CacheErrors: line 16: E121: Undefined variable: checkers E15: Invalid expression: checkers 

Can someone tell me what I did wrong and how to call the syntax? Thanks!

+8
source share
4 answers

I really don't understand the reason, but when I installed the YouCompleteMe plugin for vim again with ./install.sh --clang-completer . Syntastic works like a charm.

+3
source

Try adding this to your vimrc:

 let g:syntastic_check_on_open=1 let g:syntastic_enable_signs=1 

(This is taken directly from my vimrc , which has some other Syntastic settings if you want.)

+8
source

I did two things, and then Syntastic started behaving as expected with JS and ESlint files. I can’t say which one did the trick:

1- In the project directory eslint --init .

2- Launched vim, opening the file without the -S flag.

Before that, nothing worked out quietly, without errors and without diagnostics. This is how ESlint behaves when there is no configuration file.

0
source

Installing clang and / or ctags packages fixed this for me

-one
source

All Articles