Thursday, April 22, 2021

Re: Gvim and Alt-F10

The window manager is possibly responsible for some of these
Alt assignments. In gvim. on my system, Alt-[FETSBWH] display
the File/Edit/Tools/Syntax/Buffers/Window/Help pull-down
menus.  Alt-F10 is the only function key of the twelve that is
being co-opted and duplicating the Alt-F function.  This is why
I thought that it might be specific to gvim and was hoping that
there was a way to control this externally without having to
recompile from scratch.

As for the build, 8,.1 is the current package in the Ubuntu
repository.  It is using GTK3 and was compiled a year ago
on 04-15-20.  It would be great if Sven or someone could goose
the maintainer to update the package.  I've tried!  :-(

On Thursday, April 22, 2021 at 5:56:48 PM UTC-7 antoine.m...@gmail.com wrote:
it applies tOn Fri, Apr 23, 2021 at 12:31 AM cjsmall
<jeffer...@gmail.com> wrote:
>
> I'm on Xubuntu 20.04 and using vim 8.1
>
> In gvim, the Alt-F10 key is co-opted to display the File pull-down menu. I have a series of remapped assignments for all of the function keys. These all work well for vim in a terminal window, but this single one fails due to this built-in menu assignment.
>
> Is there an easy way to deactivate this so that the Alt-F10 code (<M-F10>) can be assigned to my purpose?
>
> Thanks.

You didn't say which GUI you are using (I'm using GTK3); also, Vim 8.1
is getting a little long in the teeth IYSWIM. Vim 8.2 was released on
12 December 2019 and its latest patchlevel is 8.2.2800. It is
conceivable that one of these two thousand eight hundred patches fixes
your problem; but otherwise, see below.

I'm on openSUSE 15.2 and here, hitting Alt-F10 on a virtual desktop
unmaximizes the top window, no matter which one — it applies to my
browser as well as to gvim. Repeating the action reverses the process.
The Alt-F10 combo doesn't even reach gvim here. OTOH Alt+letter
triggers (in gvim with GTK3 GUI) the menus on the menubar: Alt-F is
File, Alt-E is Edit, Alt-T is Tools, etc. IIUC this behaviour depends
on the 'winaltkeys' settings.
See :help 'winaltkeys'

If you don't want the GUI menus at all, you can disable them by
removing the m flag from the 'guioptions' setting; OTOH, even without
the menus-on-top there is still a separate ways to get the same menus
at the bottom in both gvim and Vim, see
https://vim.fandom.com/wiki/Text_mode_menus

In my experience, the most portable {lhs} key assignments for mappings
are F2 to F9 and F10 to F12 in both Vim and gvim, and in addition
Shift-F1 to Shift-F12 in gvim. F1 is reserved for Help. F10 may either
be the system menu, or it may be available too. Others might or might
not work for reasons external to Vim.

If when you do
:verbose map <M-F10>
in gvim, the answer is either "No mapping found" or your own defined
mapping, then if gvim does something else when you hit that key combo,
the reason is to be found outside of Vim. Maybe in the settings of
your window manager, if you can get at them. Otherwise, if you still
have some not yet taken mappable key (maybe a non-ASCII key like the
³² and £ยต keys present on my keyboard), try moving whatevr you have on
Alt-F10 to some such key.

Best regards,
Tony.

--
--
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/9c17590f-06c6-421a-bb91-d5f39d66ca3an%40googlegroups.com.

No comments: