Reputation: 2811
syntax on/off affects all buffers.
To set buffer specific syntax highlighting,
:syntax manual
:set syntax=ON/OFF
Before writing a adhoc script that does tracking active buffer and applying syntax=ON only on it, I thought it is better to ask here if there is already a vimcommand doing that.
Upvotes: 1
Views: 144
Reputation: 195079
dirty and quick
use autocmd, when BufEnter
, setlocal syntax=on
; when BufLeave
setlocal syntax=off.
Note, You should use setlocal
, not set
Upvotes: 3