gvim start with alternate size (than 80X25)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

gvim start with alternate size (than 80X25)

luke-44
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
--
............._..
.|  .| |.|/.|_ .
.|__.|_|.|\.|_ .
:61 421 276 282:
Reply | Threaded
Open this post in threaded view
|

Re: gvim start with alternate size (than 80X25)

A.J.Mechelynck
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.
Reply | Threaded
Open this post in threaded view
|

Re: gvim start with alternate size (than 80X25)

luke-44
Hi Tony.

Thanks for your reply.

13Oct2006 @ 04:23 A.J.Mechelynck thusly spake

> 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.
I used the 'if has("gui_running")' to set the guifont. I found this in a reply of yours to a list. So thanks for that too.
Excellent help.

Kind regards.
Luke.

--
............._..
.|  .| |.|/.|_ .
.|__.|_|.|\.|_ .
:61 421 276 282: