it applies tOn Fri, Apr 23, 2021 at 12:31 AM cjsmall
<jefferysmall@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/CAJkCKXuAfB8ULy%2BqZksyECGw9Ld43TVvkF78KXpSu9fAbs4mmg%40mail.gmail.com.
No comments:
Post a Comment