Guim text fades

I have been having trouble displaying fonts from GVim on Ubuntu for quite some time. I often notice a problem when switching between tabs. After switching between tabs, sometimes the lines will not be displayed. If I press ctrl + l, the contents on the tab will be redrawn and the missing lines will be displayed correctly. I think I could write a function in my .vimrc to automatically run ctrl + l after switching tabs, but I feel like I am only avoiding the problem and not fixing the main problem.

  • Ubuntu 11.10
  • Gvim 7.3
  • .vimrc: set guifont=Inconsolata\ 12

I had a problem for a long time with different versions of Ubuntu and different gui sets. I would love to hear any ideas that can help me solve this problem.

These are the functions that I use to switch tabs:

 function TabLeft() let tab_number = tabpagenr() - 1 if tab_number == 0 execute "tabm" tabpagenr('$') - 1 else execute "tabm" tab_number - 1 endif endfunction function TabRight() let tab_number = tabpagenr() - 1 let last_tab_number = tabpagenr('$') - 1 if tab_number == last_tab_number execute "tabm" 0 else execute "tabm" tab_number + 1 endif endfunction map <silent><CS-PageUp> :execute TabRight()<CR> map <silent><CS-PageDown> :execute TabLeft()<CR> 
+7
source share
2 answers

I have seen font mapping errors on Ubuntu. My workaround was to use textmode style tabs, see Guioptions.

Here is my preferred option:

 :se guioptions=agim 

note that

  • Perhaps I imagine things, but it seems to look more impressive.
  • This leads to an increase in screen real estate for editing.
  • The above settings also delete all scrollbars (who needs scrollbars?)

To just change the style of the tab title, try for example.

 :se guioptions-=e 
+5
source

I have never seen :execute used to call a function (I think this is a version of Vim eval() from other scripting languages). Try changing :execute TabRight()<CR> to :call TabRight()<CR> and see if that helps.

0
source

All Articles