I am trying to customize vim highlighting by placing additional instructions into local config $project/.lvimrc
, which is managed by the https://github.com/embear/vim-localvimrc plugin.
Unfortunately, it seems that commands like
syntax match Operator "\<MYOP\>"
located in .lvimrc
are ignored silently by vim. Typing the command in the command line works as expected. Other commands from .lvimrc
also work. So what may stop vim from interpreting local highlighting correctly?
That was because https://github.com/embear/vim-localvimrc plugin launches local files in a sandbox by default. Syntax commands are not allowed in a sandbox (at least in my setup), so the exception was raised. For some reason, Vim handles such exceptions silently.
In my case, the following modifications formed a solution:
let g:localvimrc_sandbox = 0
to master .vimrc fileset conceallevel=2
to the localvimrc