2

From my .vimrc: match ErrorMsg '\%>80v.\+'

And a screenshot: enter image description here

I have tried a minimal vimrc and it still doesn't work in the left splits.

5

Recent Vim versions have the 'colorcolumn' option. It provides the following benefits:

  • You can just globally :set it; no :autocmd is needed.
  • You get to keep the :match highlighting for something else.
  • Yeah I'm aware of this setting, I'm just not a fan of having a huge line in my buffers. – Spencer Wood Mar 18 '15 at 19:50
4

From :help :match:

Define a pattern to highlight in the current window

This is fixed by making the original command into an autocommand:

autocmd WinEnter * match ErrorMsg '\%>80v.\+'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.