I would like to set a different highlighting for windows EOL characters.
I have tried several approaches and some of them worked when I did
: so $MYVIMRC, which is pretty strange, because after I closed and reopened a file these effects were gone.
call matchadd("NewLineWin", "\r\n") call matchadd("NewLineWin", "\r\(\n\)\@=") call matchadd("NewLineWin", "\r(?=\n)")
And none of these worked after reopening the file.
There is no error in the highlight setting, because, if I change the matchadd call to this
call matchadd("NewLineWin", "\r") everything works normally. But I doubt that this is an acceptable approach, since Windows EOL are
\r\n and not simply
\r. Besides, I'm wondering what is wrong with my regex.
Could anyone help me with this, please?