Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Windows gVIM remove print icon in the header

13 views
Skip to first unread message

Heron

unread,
Oct 25, 2022, 10:00:24 AM10/25/22
to
Windows 11 gVIM 8.2 has the following icon order in its graphical header.
1. Folder
2. Save
3. Save twice (that's what it looks like)
4. Print
5. Undo
6. Redo
7. Cut
etc

What I want to do is REMOVE that "Print" gVIM icon because it's too close
to the redundant save icons and I never print from gVIM anyway but I save a
lot (both save icons seem to be doing the exact same thing it seems).

I keep accidentally having to cancel a print which I never want to do from
gVIM so that's why I just want to remove the print icon from the gVIM GUI.

Can it be done?

Ken Blake

unread,
Oct 25, 2022, 10:46:28 AM10/25/22
to
On Tue, 25 Oct 2022 09:00:19 -0500, Heron <McKe...@ipanywhere.com>
wrote:
I know nothing about gVIM but in many programs, icons can be
rearranged. Have you looked to see if it can be done there?

Heron

unread,
Oct 25, 2022, 11:49:59 AM10/25/22
to
On 10/25/2022 9:46 AM, Ken Blake wrote:
> I know nothing about gVIM but in many programs, icons can be
> rearranged. Have you looked to see if it can be done there?

Only someone who is an expert in vim will know the answer according
to some of the helpful people I had asked on the Windows 10 newsgroup.

On Mon, 24 Oct 2022 20:35:52 -0700,
In article <news:MPG.3dc0f970d...@news.individual.net>,
Stan Brown wrote:
> You're better advised to post this query in comp.editors.
> There's a low-volume but active Vim community there.

There's a method shown to *add* menu icons to the gVIM GUI banner.
But no known method yet shown for Windows to *remove* menu icons.

...winston

unread,
Oct 25, 2022, 11:54:44 AM10/25/22
to
Not sure how many gVIM users exist in this group, but you may get more
mileage in the VIM community since your question is more aligned with
VIM code than what can be done in Windows while using VIM.
https://www.vim.org/community.php


--
...w¡ñ§±¤ñ

Kenny McCormack

unread,
Oct 25, 2022, 12:47:07 PM10/25/22
to
In article <tj90s3$22d2g$1...@dont-email.me>,
...winston <winst...@gmail.com> wrote:
...
>Not sure how many gVIM users exist in this group, but you may get more
>mileage in the VIM community since your question is more aligned with
>VIM code than what can be done in Windows while using VIM.
>https://www.vim.org/community.php

A few comments - the first few are "meta", the last addresses OP and his
specific problem.

1) I think this (I am reading this in comp.editors) is as good a place as
any on Usenet to ask VIM questions. It is certainly my "go to" place.
It ain't great, but it will do.

2) In the past, I have received advice similar to yours - to the effect
that "this isn't the place; Usenet is dead, etc, etc" and "You should join
the mailing lists on the VIM site". I have done so, and I'm not impressed.
I think I actually get better responsiveness here than there. They tend to
be a bit snooty over there.

3) Re: OP's issue. It can't be that hard. It has to be in some config
file somewhere. I did a little poking around on a Windows GVIM 7.4 install
and found a file called "menu.vim". I think this sets up the menu bar.
Find this file in your installation and look for lines that contain the
word "print" (in any capitalization) and you should figure out what to
remove. Look for lines that contain "tmenu" - which seems to be the
command to add something to the "toolbar" (i.e., menu).

If you comment out (or delete) the line that adds "Print" to the toolbar,
you should be good to go (but I have not tested this).

--
The randomly chosen signature file that would have appeared here is more than 4
lines long. As such, it violates one or more Usenet RFCs. In order to remain
in compliance with said RFCs, the actual sig can be found at the following URL:
http://user.xmission.com/~gazelle/Sigs/LadyChatterley

Adam Sampson

unread,
Oct 25, 2022, 1:30:04 PM10/25/22
to
Heron <McKe...@ipanywhere.com> writes:

> [...] so that's why I just want to remove the print icon from the gVIM
> GUI. Can it be done?

Yep -- the toolbar in VIM is represented as a menu, so you can remove
the print icon for all modes with the command:

:aunmenu ToolBar.Print

Add that to your .vimrc and you should be good to go. As Kenny says, the
default toolbar is defined along with all the other menus in menu.vim in
the VIM runtime directory; reading that file plus ":help menu" should
allow you to do any further tweaking you like.

--
Adam Sampson <a...@offog.org> <http://offog.org/>

...winston

unread,
Oct 25, 2022, 3:27:52 PM10/25/22
to
Kenny McCormack wrote:
> In article <tj90s3$22d2g$1...@dont-email.me>,
> ...winston <winst...@gmail.com> wrote:
> ...
>> Not sure how many gVIM users exist in this group, but you may get more
>> mileage in the VIM community since your question is more aligned with
>> VIM code than what can be done in Windows while using VIM.
>> https://www.vim.org/community.php
>
> A few comments - the first few are "meta", the last addresses OP and his
> specific problem.
>
> 1) I think this (I am reading this in comp.editors) is as good a place as
> any on Usenet to ask VIM questions. It is certainly my "go to" place.
> It ain't great, but it will do.
Good to know.
Also seems to verify that Windows nntp groups probably aren't the go to
place.
>
> 2) In the past, I have received advice similar to yours - to the effect
> that "this isn't the place; Usenet is dead, etc, etc" and "You should join
> the mailing lists on the VIM site". I have done so, and I'm not impressed.
> I think I actually get better responsiveness here than there. They tend to
> be a bit snooty over there.
Snooty is everywhere - nntp, community forums...hasn't changed since in
decades.



--
...w¡ñ§±¤ñ

John Robertson

unread,
Oct 25, 2022, 11:05:46 PM10/25/22
to
On 2022/10/25 4:50 pm, Heron wrote:


> There's a method shown to *add* menu icons to the gVIM GUI banner.
> But no known method yet shown for Windows to *remove* menu icons.

:help builtin-tools
:help 'guioptions'
https://vim.fandom.com/wiki/Hide_toolbar_or_menus_to_see_more_text

:tmenu ToolBar
:tmenu ToolBar SaveAll
:aunmenu ToolBar.Print
That removes just the "Print" & "SaveAll" menu icons in the menu bar.
https://superuser.com/questions/11289/how-do-i-customize-the-gvim-toolbar

Notice there is a "toolbar", "menubar" & a "scrollbar" in Windows gVim.
https://stackoverflow.com/questions/13525518/how-to-hide-the-menu-tool-bar-of-gvim

:set guioptions = -m
That removes the menu bar from Windows gVim.

:set guioptions = -T
That removes the tool bar from Windows gVim.

:set guioptions = -r
That removes the scroll bar from Windows gVim.

The result is more room for editing inside of gVIM.

This will show the user where all the system files are located.
:version

These are important variables that the user will need to know.
:echo $VIM
:echo $HOME
:echo $VIMRUNTIME

The OP will likely want to put these commands into the vimrc file.
aunmenu ToolBar.Print
aunmenu ToolBar.SaveAll

Or
set guioptions-=m "menu bar
set guioptions-=T "toolbar
set guioptions-=r "scrollbar
https://www.reddit.com/r/vim/comments/3i6sgj/is_it_possible_to_change_the_icons_in_the_top_bar/
--
(Please post followups or tech inquiries to the USENET newsgroup)
John's Jukes Ltd.
MOVED to #7 - 3979 Marine Way, Burnaby, BC, Canada V5J 5E3
(604)872-5757 (Pinballs, Jukes, Video Games)
www.flippers.com
"Old pinballers never die, they just flip out."

Heron

unread,
Oct 25, 2022, 11:39:39 PM10/25/22
to
On 10/25/2022 11:27 AM, Adam Sampson wrote:
> Yep -- the toolbar in VIM is represented as a menu, so you can remove
> the print icon for all modes with the command:
>
>:aunmenu ToolBar.Print
>
> Add that to your .vimrc

Thank you for that suggestion of using ":aunmenu ToolBar.Print" to remove
the print icon from the menu bar inside of the Windows gVim user interface.

When I run that individually in a gVim window, it removes the Print icon.
[Escape]:aunmenu ToolBar.Print[RETURN]

But when I put it into the user _vimrc, it doesn't do anything.
" Remove the Print icon
:aunmenu ToolBar.Print

I'm sure I have the correct _vimrc because if I add a typo, it complains.
Is the syntax inside the user _vimrc different than the interactive gVim?
0 new messages