Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Strange Vim inner borders

Tags:

I'm using gVIM with Windows 8, and since first time I opened it theres always those strange borders at right and bottom sides:

normal window [full size image] gVIM borders

fullscreen [full size image] - even bigger borders, look at the green dotted area at right and bottom gVIM borders - fullscreen

restored

gVIM borders - restored

Im using

set guioptions-=m set guioptions-=t set guioptions-=T set guioptions-=r set guioptions-=L 

so no scrollbars and menus.

Any idea of how to remove those borders as in the left side?


Additional information: Tested in Windows XP with 1280x1024 in a 17" display. And Windows 8 with 1920x1080 in a 21"5, same problem.

like image 613
Yuri Ghensev Avatar asked Feb 13 '12 18:02

Yuri Ghensev


2 Answers

I was able to fix this in Ubuntu 13.04 by creating ~/.gtkrc-2.0 with the following contents:

style "vimfix" {   bg[NORMAL] = "#242424" # this matches my gvim theme 'Normal' bg color. } widget "vim-main-window.*GtkForm" style "vimfix" 
like image 55
Cory Klein Avatar answered Oct 01 '22 18:10

Cory Klein


An old question, I know. I don't have a permanent solution, but I have figured out a good workaround:

  1. Switch to an old-style Windows theme, one you can modify color-by-color. On my system, I have 'high-contrast black', which has the "right" settings without modification. Regardless, any old-style theme will work.
  2. Those gVim "margins" pick up the color of the '3D Objects' parameter of the old-style theme. Set this parameter to whatever color you want the margins to be--I choose black.
  3. Start gVim
  4. Switch back to your usual Windows theme.

The margins will still be there, but they'll be black (or whatever color you choose), so they'll not only be less noticeable, they'll also let your eyes adjust to using gVim in a dark room with a dark, low-contrast theme. Of course, you'll have to do this every time you start gVim.

like image 31
Shay Avatar answered Oct 01 '22 20:10

Shay