Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim often needs Redraw after Splitting

after months of tweaking my vimrc file and installing plugins, I have this little bug which is very painful:

When I'm closing a split (looks like this only appears on vertical ones) the remaining buffer often needs a redraw, because the text is completly screwed up (lines are gone, remaining text from the closed buffer etc)

This can easily been fixed by pressing CTRL-L, but it's really annoying to press CTRL-L each time when I open and close my nerdtree explorer.

Does anyone ran into same/similar problems and/or knows a solution? I was not able to burn down this behaviour to a single line in my vimrc nor to a particular plugin...

Thanks in advance!

like image 553
Daniel Torres Avatar asked May 12 '11 11:05

Daniel Torres


2 Answers

I had a similar problem in the past.

I used guioptions-=r and guioptions-=l which remove the left and right scroll bars ant this works just fine, but there are two more options for splits: guioptions-=L and guioptions-=R.

Those remove the scroll bars from split views, too. If you just set lr but not LR, vim will always append the left (or right) scroll bar when using NERDTree and other splits and this causes vim to display screwed up text...

Hope that helps!

like image 102
Daniel Torres Avatar answered Oct 19 '22 20:10

Daniel Torres


Try to reproduce with disabled syntax coloring. Do this:

:syn off

If it's gone try to tune up your syntax coloring setting. You can tune the way Vim tries to colorize text.

like image 24
lzap Avatar answered Oct 19 '22 20:10

lzap