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

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

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

porphyry5
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?



--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CA%2BE5mK6p0x%2Bxwy%3DnofU6O-_S5X5f1X7dKnt9Dd%3DfjcU4uWqEcw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

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

porphyry5
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 <[hidden email]> 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 [hidden email].
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CA%2BE5mK74%3DORQNez%2BCuS2EwVYVTsphJUFoyDe9z0zCYava3tJ%2Bw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

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

trialero
In reply to this post by porphyry5
> which works as expected and gives me a gvim that looks like vim in a tty,

Just for my curiosity, why don't you use vim in a plain console or plain
terminal window? Is there any advantage in using gvim this way instead
of a plain vim session?

//meine

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200802214006.GA16626%40trackstand.
Reply | Threaded
Open this post in threaded view
|

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

Benjamin Esham-2
meine wrote:

> Graham Lawrence wrote:
>
>> which works as expected and gives me a gvim that looks like vim in a tty,
>
> Just for my curiosity, why don't you use vim in a plain console or plain
> terminal window? Is there any advantage in using gvim this way instead
> of a plain vim session?

Mouse support, maybe? Gvim may also offer a larger color palette, depending
on your terminal.

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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/kddn8ku2.fs8ssd%40bdesham.net.
Reply | Threaded
Open this post in threaded view
|

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

porphyry5
I do use vim in a terminal, xterm, and find it very satisfactory, with 59 lines of text in view. But that was on Arch Linux, a distro that has many fine features, but whose excruciating install process puts it firmly among the hair-shirt trinity of Linux distros, Arch, Gentoo and Linux from Scratch.
On Lubuntu, I use the same setup, but the ubuntus, and as far as I can determine every other distro except Arch, lack a small font package that enables xterm to show the full range of the utf-8 character set. Without it xterm issues the following complaint whenever it starts with vim:

xterm: cannot load font "-Misc-Fixed-bold-R-*-*-13-120-75-75-C-60-ISO8859-1"
xterm: cannot load font "-Misc-Fixed-medium-R-*-*-13-120-75-75-C-120-ISO10646-1"
xterm: cannot load font "-Misc-Fixed-bold-R-*-*-13-120-75-75-C-120-ISO10646-1"
xterm: cannot load font "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1"

and will show essentially only the keyboard characters, all others as blanks.

Gvim doesn't have that problem, but, being a hard-core keyboard user I don't wish to be lured into unnatural practices with rodents and (oh horrors!) menus.

I guess what I have to do is compile vim for myself.

On Sun, Aug 2, 2020 at 3:17 PM Benjamin Esham <[hidden email]> wrote:
meine wrote:

> Graham Lawrence wrote:
>
>> which works as expected and gives me a gvim that looks like vim in a tty,
>
> Just for my curiosity, why don't you use vim in a plain console or plain
> terminal window? Is there any advantage in using gvim this way instead
> of a plain vim session?

Mouse support, maybe? Gvim may also offer a larger color palette, depending
on your terminal.

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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/kddn8ku2.fs8ssd%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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CA%2BE5mK7jco%3D_HX37TEJQZOgV7AtmxPuu5Uv0vN8MhcMOW%2BPKFA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

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

trialero
On Mon, Aug 03, 2020 at 12:05:34PM -0700, Graham Lawrence wrote:
> xterm: cannot load font

TNX for your explanations Benjamin, Graham! Never really realized the
sometimes limited fonts and colours in a basic terminal window. Indeed
my tty CLI only has 16 colours and gvim probably has the entire palette.
The less colours and frills the better for me, keeps me concentrated on
writing.

Since I use the Danish/German accented characters only as html coded in
my text documents, getting them on screen isn't an issue for me (have to
try the LaTeX ligatures etc for that and see how it works).

//meine

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200803195831.GA36905%40trackstand.
Reply | Threaded
Open this post in threaded view
|

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

John Little-4
In reply to this post by porphyry5

> except that the 3 lines lost by removing the menu and toolbar are gone, and the remaining geometry is 80x42.

On my KDE I get the behaviour you want.  What's your DE? 

Also, in case there's something in your set up, f.ex. something in the .vimrc which triggers the GUI to start before the setting of guioptions, try

    gvim --clean --cmd 'set go=aeik' -geom 80x80

If that works, you could move stuff around in the .vimrc and .gvimrc to find the cause.  Or, maybe put the set go in the alias.  I get your issue if I use :set lines= after gvim starts.

In KDE, I can force the size of gvim window, and make it larger than the screen, but having forced the size, it can't be changed subsequently.

Regards, and HTH, John Little

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/3cfd005f-a85e-4a67-8446-26af18a2b44do%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

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

porphyry5
Thanks for your help, John, but no luck, I get the same behavior. My DE is called LXDE, I believe, with Openbox the WM.
I was thinking maybe Lubuntu's gvim is compiled to have no more than 42 lines, in which case I'll just live with it, keep using vim in xterm and only use gvim when I need to be able to see the full utf-8 character set.

On Mon, Aug 3, 2020 at 3:35 PM John Little <[hidden email]> wrote:

> except that the 3 lines lost by removing the menu and toolbar are gone, and the remaining geometry is 80x42.

On my KDE I get the behaviour you want.  What's your DE? 

Also, in case there's something in your set up, f.ex. something in the .vimrc which triggers the GUI to start before the setting of guioptions, try

    gvim --clean --cmd 'set go=aeik' -geom 80x80

If that works, you could move stuff around in the .vimrc and .gvimrc to find the cause.  Or, maybe put the set go in the alias.  I get your issue if I use :set lines= after gvim starts.

In KDE, I can force the size of gvim window, and make it larger than the screen, but having forced the size, it can't be changed subsequently.

Regards, and HTH, John Little

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/3cfd005f-a85e-4a67-8446-26af18a2b44do%40googlegroups.com.


--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CA%2BE5mK6S6FzWqhUs%3D209pEQoB1ayTBOcYf7GKdF4S00%3Dv%3Dv0eg%40mail.gmail.com.