You are not logged in.

#1 2009-02-13 09:46:13

mentat
Member
From: France
Registered: 2009-01-13
Posts: 138
Website

[SOLVED] xmonad - howto fix gvim border width ?

Hi all,
I use xmonad, GTK theme with gvim and have always a kind of borders.
It's on the bottom and right (seem like the scrollbars places) and appear in all modes (tabs, full ...).

screenshot2009021310264ni1.th.png

Set my guiopt :

set guioptions=aiAc

Sometimes the bottom border's size is more great.

screenshot2009021310352ls7.th.png

does anybody know how to fix this ?
Can we start gvim without GTK support (X11 only) ?

Many Thx.

Last edited by mentat (2009-02-18 14:41:44)

Offline

#2 2009-02-13 16:43:35

N30N
Member
Registered: 2007-04-08
Posts: 273

Re: [SOLVED] xmonad - howto fix gvim border width ?

mentat wrote:

Can we start gvim without GTK support (X11 only) ?

The whole point of GVIM is to add GTK support. It sounds like your after the standard VIM.

Offline

#3 2009-02-13 17:59:52

OpenBSD
Member
Registered: 2009-02-04
Posts: 43

Re: [SOLVED] xmonad - howto fix gvim border width ?

mentat wrote:

Can we start gvim without GTK support (X11 only) ?

Many Thx.

vim big_smile

Offline

#4 2009-02-13 23:15:04

mentat
Member
From: France
Registered: 2009-01-13
Posts: 138
Website

Re: [SOLVED] xmonad - howto fix gvim border width ?

Ouch !
Thanks to remember me ...
I don't know why think of G(raphical)vim instead GTK

I always use vim but for some colorschemes and a more good window refresh
management I would like to use gvim.

Of course without this damn borders.

Offline

#5 2009-02-14 18:44:01

vogt
Member
From: Toronto, Canada
Registered: 2006-11-25
Posts: 389

Re: [SOLVED] xmonad - howto fix gvim border width ?

gvim appears to give size hints, so by respecting those hints with this extension, you will see your background instead of the gtk padding, which might be more pleasant.

Offline

#6 2009-02-14 18:58:55

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: [SOLVED] xmonad - howto fix gvim border width ?

mentat wrote:

I always use vim but for some colorschemes and a more good window refresh management I would like to use gvim.

urxvt has excellent refresh capabilities that works perfectly with Vim. Although, some keyboard commands don't work by default. Ctrl+{Home, End, Left, Right} come to mind.

Offline

#7 2009-02-16 11:39:58

mentat
Member
From: France
Registered: 2009-01-13
Posts: 138
Website

Re: [SOLVED] xmonad - howto fix gvim border width ?

@vogt
Thanks to point me this extension, I just make the modification and the visual is much much better.
Not on the top because a gap appear and replace the solid border and a fine one is always on the bottom. Do you have this bottom border too ?
Now it's more please to use thanks again. 

Hope xmonad contrib gurus or Bram Moolenaar (did he know it ?) can fix this one day .

@skottish  thank for the tip, sure I'll test soon urxvt  to replace my xterm ...

Offline

#8 2009-02-18 18:37:47

vogt
Member
From: Toronto, Canada
Registered: 2006-11-25
Posts: 389

Re: [SOLVED] xmonad - howto fix gvim border width ?

mentat wrote:

Hope xmonad contrib gurus or Bram Moolenaar (did he know it ?) can fix this one day .

I think that the current behavior is reasonable: what else could be done to fill that tiny bit of space that is too small to fit another row of text? (Other than the current gtk padding that is shown)

If you set the gtk theme color to the same one as the text background (or the other way around) it might not look as bad. However, that might look a bit weird elsewhere.

Other applications (even rxvt-unicode) all do the same thing: set size hints, and have a small border padding when they aren't given exactly the size they want. Gvim does this well, but urxvt occasionally leaves some text in that border area after a resize. But overall, these applications behave well when tiled without respecting size hints, unlike say xmms.

EDIT: In that worst case, it does look like gvim could add another couple rows of text. Perhaps it could be fixed by the rarely-used keybinding:
> mod-n Resize viewed windows to the correct size

Last edited by vogt (2009-02-18 18:42:32)

Offline

#9 2010-07-04 02:17:06

cmlr
Member
From: Rochester, NY, USA
Registered: 2007-04-18
Posts: 99

Re: [SOLVED] xmonad - howto fix gvim border width ?

After suffering with this problem for some time, I found the following solution, which I've described in the [wiki]Xmonad[/wiki] Wiki entry.

1.  Set up Xmonad.Layout.LayoutHints

2.  Install xdotool from community.

3.  Start gvim this way:

, ((modm,  xK_v ), spawn "gvim; xdotool key Super+n")

xdotool simulates keypress events.  There are several programs which do this.

Last edited by cmlr (2010-07-04 02:23:04)

Offline

#10 2010-07-04 06:34:50

pseup
Member
Registered: 2008-06-06
Posts: 103

Re: [SOLVED] xmonad - howto fix gvim border width ?

I'm not a fan of the hinted layout, so I use this little hack to change the bg color of the offending widget so it's just not as noticeable.

In my ~/.gtkrc-2.0 file:

style "vimfix" {
  bg[NORMAL] = "#242424" # this matches my gvim theme 'Normal' bg color.
}
widget "vim-main-window.*GtkForm" style "vimfix"

Edit: Oh I just noticed this was a necro'd post. Oh well.

Last edited by pseup (2010-07-04 06:38:28)

Offline

Board footer

Powered by FluxBB