Sunday, August 2, 2020

Re: gvim: how remove menu and toolbar, but keep original geometry

Thank you Alessandro Antonelli and Benjamin Esham, but I find that the problem is with :set lines. For any value below 42, I get the number of lines I ask for, but for 42 or more I only get 41 lines.
With the mouse, I can drag the window to 43 lines, but the emergence of the task bar prevents any further enlargement.

Normally, I run vim in an xterm with -geom 80x59, and altering my .vimrc to include set lines=45 instantly resizes the xterm window to 45 lines, but this does not transfer to gvim when I start it, it has only 41. In gvim I can set the number of lines below 42, but not above it.


On Sun, Aug 2, 2020 at 7:00 AM Benjamin Esham <usenet@esham.io> wrote:
Graham Lawrence wrote:

> I start gvim with this entry in .bashrc
>
> alias G='gvim -fg white -bg black -geom 80x45 '
> and have in .vimrc
> set guioptions=aeik
>
> which works as expected and gives me a gvim that looks like vim in a tty,
> except that the 3 lines lost by removing the menu and toolbar are gone, and
> the remaining geometry is 80x42.
>
> Making the initial geometry 80x48 to compensate does not work as this asks
> for a window taller than the screen, and apparently is just ignored. How
> can I get rid of the menu and toolbar and also maximize the window height?

You should be able to resize the window after setting 'guioptions' with

    set guioptions=aeik
    set lines=45

There is a corresponding 'columns' option too, so you might be able to put

    set columns=80 lines=45

in your vimrc after setting 'guioptions' and then you wouldn't need the
"-geom" flag in your alias anymore. (If you want different window sizes in
different situations, though, maybe this wouldn't make sense.)

HTH,

Benjamin

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/kdd5ci1a.2k7a88%40bdesham.net.


--
Graham Lawrence

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CA%2BE5mK74%3DORQNez%2BCuS2EwVYVTsphJUFoyDe9z0zCYava3tJ%2Bw%40mail.gmail.com.

No comments: