I have been having a font rendering problem with GVim on Ubuntu for quite a while. I frequently notice the problem when switching between tabs. After I switch between tabs, sometimes lines will not be rendered. If I hit ctrl+l, the content in the tab will be redrawn and the missing lines are rendered correctly. I guess I could write a function in my .vimrc to automatically run ctrl+l after I switch tabs, but I feel that I would only be avoiding a problem rather than fixing the underlying issue.
set guifont=Inconsolata\ 12
I have been having the problem for a long time with different versions of Ubuntu and different gui fonts set. I'd love to hear any ideas anyone has that might help me fix this problem.
These are the functions I use for switching 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><C-S-PageUp> :execute TabRight()<CR>
map <silent><C-S-PageDown> :execute TabLeft()<CR>
I have seen font rendering glitches on Ubuntu. My workaround has been to use 'textmode' style tabheadings, see guioptions.
Here is my preferred setting:
:se guioptions=agim
Note that
To just change the tab heading style, try, e.g.
:se guioptions-=e
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With