In my vimrc I have this line :
call matchadd('ColorColumn', '\%81v', 100)
It colors the 81th column in a subtle grey background so I can track my line length :
(see the l
and the f
)
I found out that when editing a large file, this function causes Vim to be very slow.
One of the file I am currently working on is a jsp
file with a lot of mistakes in the indentation/syntax.
I also tried with a custom vimrc :
.vimrc-test
call matchadd('ColorColumn', '\%81v', 100)
And launching vim with vim -u .vimrc-test -N my-file.jsp
it reproduce the same.
I am on MacVim 7.4.383 on Yosemity.
Do you know anything related to this issue ?
:h colorcolumn
, this is a standard option for vim. The help states "Will make screen redrawing slower.", so you won't probably get around that, but maybe the internal implementation is atleast faster then your version.set cc=+1
and aset textwidth=80
I get the 81th column colored with no performance issue, so I'll stick to that for the moment, thanks for the advice