Closed househead closed 2 years ago
You could try setting an autocmd
:
autocmd BufRead * if &readonly | let b:syntastic_mode = 'passive' | endif
(not tested). But this only makes sense for checkers that check a single file.
On a side note: syntastic is dead, you might consider switching to ALE which takes advantage of Vim 8 features and is actively maintained.
Thank you, @lcd047 this meets my need well.
I'll have a look at ALE when I get a little more time! All the best.
I would ideally like to disable syntax checking when a file is opened read-only. Is this possible?