Luke Vanderfluit wrote:
Hi.
I'm a great fan of vim and this is the best list!
I'm programming java and use konqueror as an explorer. I have set konqueror to
open java files with gvim. That's cool.
Now I want to set the size of the window that gvim starts in.
The default seems to be 80X25.
How can I change that.
Can I pass some args to gvim on invocation?
Thanks.
Kind regards.
Luke Vanderfluit
see
:help 'lines'
:help 'columns'
If you try to set these options to higher values than fit onscreen, Vim will
adjust them down until they do. This means that:
a) ":set lines=9999 columns=9999" will maximize gvim;
b) since different fonts can have different sizes, you should set 'guifont'
first, and 'lines' and 'columns' afterwards.
Note 1: Some console terminals can have their lines x columns geometry
changed; others not, but I suppose you wouldn't want to set the same values in
gvim and in console vim. You can either:
1) set 'lines' and 'columns' in your gvimrc, so console Vim won't see those
lines;
2) bracket them by if has("gui_running") ... endif so that console Vim won't
execute them;
or even:
3)
if has("gui_running")
" settings for gvim
elseif &term =~ 'xterm' || term =~ '^vt\d\d\d'
" settings for xterm and vtnnn
elseif &term == 'win32'
" settings for the Dos Box in Windows
" else do nothing
endif
Note 2: If you set those options in a vimrc, gvim will "remember" them until
it displays the GUI.
Best regards,
Tony.