I have recently recompiled vim, and ever since, when I have a big file, the scrolling gets slow. cursorline
seems to be the problem; it doesn't matter if I use any of my plugins, if I have cursorline
on, then the redrawing (and thus, the scrolling) gets slower, and the syntax highlight, while on its own inoffensive, when combined with cursorline
makes the redrawing process very slow. Pretty much all of the solutions I have seen to this problem include either removing the syntax highlight or the cursorline
; however, I was wondering if it would be possible to solve this some way. I have also already tried using set lazyredraw
, set ttyfast
, set foldmethod=manual
and set synmaxcol=128
, with no better results. Does anybody have more ideas?
As @Christian Brabandt pointed out in the comment this is a known issue and there might not be a lot of solutions, for now, to make cursorline
work properly.
However, you can use different workarounds:
In this answer @Carpetsmoker suggest a mapping which will set
cursorline
andcursorcolumn
for a fraction of a second. This is pretty useful to easily locate your cursor.I also created gutterline.vim which is a plugin which simply adds a sign in the gutter where your cursor is it was meant to be as simple as possible and the result is something like this:
g:GutterLineSign
to▸
instead of>
, and addedset updatetime=500
to my.vimrc
. – dccsillag Feb 13 '18 at 23:19