Vim Tips Wiki
Register
(Remove html character entities)
No edit summary
Line 54: Line 54:
   
 
==Comments==
 
==Comments==
  +
  +
  +
[http://www.vipsexshop.com.br Sex Shop]
  +
[http://www.requintesexshop.com.br Sex Shop]
  +
[http://www.sexshop.com.vc Sex Shop]
  +
[http://www.belasexshop.com.br Sex Shop]
  +
[http://www.belasexshop.com Sex Shop]
  +
[http://blog.vipsexshop.com.br Dicas de Sexo]
  +
[http://www.viplingerie.com.br Lingerie]
  +
[http://www.vipcalcinhas.com.br Calcinhas]
  +
[http://www.uniformesbr.com Uniformes Profissionais]
  +
[http://www.uniformesbr.com Uniformes]

Revision as of 13:07, 8 November 2011

Tip 607 Printable Monobook Previous Next

created November 19, 2003 · complexity basic · author drchip · version 5.7


I like to have gvim open atop the current xterm I'm using, rather like a vim console would. Here's some Korn shell script for setting up a function "gv" which queries X for the current window's geometry and adjusts the window for the current fontsize, borders, and menu region.

Admittedly the adjustments for that vary with border sizes, etc, so you'll likely need to adjust x,y,w,h in the Adjustments section.

To start gvim, type:

gv files options etc
# gv: gvim covers starting console window
function gv
{
if [[ "${WINDOWID}" = "" ]]; then
 return
fi
xwi=$(xwininfo -id $WINDOWID)
xyposn=${xwi##*Corners: }
xyposn=${xyposn%% -*}
wh=${xwi##*geometry }
wh=${wh%%[-+]*}

integer x y w h
x=${xyposn%+[0-9]*}
y=${xyposn##*+}
w=${wh%x*}
hh=${wh#*x}
h=${hh%%[-+]*}

# Adjustments: account for window borders, menus, fontsizes
# Adjust for RH8 Linux: courier-12-r
h=h-4
x=x-4
y=y-18

# execute gvim with geometry
gvim -geometry "${w}x${h}+${x}+${y}" "$@"
}

Comments

Sex Shop Sex Shop Sex Shop Sex Shop Sex Shop Dicas de Sexo Lingerie Calcinhas Uniformes Profissionais Uniformes