Reputation: 365
Today I installed a recent 64-bit Gvim:
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Dec 13 2020 23:02:22)
MS-Windows 64-bit GUI version with OLE support
Included patches: 1-2143
Compiled by appveyor@APPVYR-WIN
...
I used to be a vimmer but switched to emacs and evil-mode a long time ago. I'm investigating whether I should return to vim, so ...
Strangely enough, the Ctrl-]
key plays dead man in vim. It does not jump to the tag under the cursor, nothing happens when I hit that key, no reaction at all.
Jumping to a tag with <C-LeftMouse>
does work.
The physical key does work. When I ask Emacs about this key, it replies:
C-] runs the command abort-recursive-edit (found in global-map), which
is an interactive built-in function in ‘C source code’.
It is bound to <menu-bar> <minibuf> <quit>, C-], C-}.
(abort-recursive-edit)
Abort the command that requested this recursive edit or minibuffer input.
I've also checked using the key history tool
in an autohotkey script
: both the Ctrl
and the ]
are properly traced.
To verify whether I caused the problem in the small .vimrc
and .gvimrc
scripts that I created in the short time I've been trying vim, I ran both vim and gvim without my initialization files:
vim -u NONE -U NONE
gvim -u NONE -U NONE
Same problem, the key doesn't work.
Yesterday I accidentally installed the latest official 32-bit windows installer (which I removed today and replaced with this 64-bit version). I did hit this problem at the first run of the freshly installed gvim, but postponed looking into it until after my python support problem was duly fixed (thanks filbranden).
So it occurs in both the 32- and 64-bit versions, go figure...
But this is really unfortunate, I don't want to have to grab for the mouse whenever I want to jump to one of the help-tags.
Of course, I would like to understand and fix this. But as long as there's no fix, I'd like to remap the functionality to another key, but I have no idea how to do that.
Any help either to fix the original problem, or in remapping the tag-jumping functionality would be highly appreciated.
Thanks in advance, Guido
Upvotes: 1
Views: 1039
Reputation: 2226
It should be easy enough to remap this particular combination like any other, to permanently set the binding add the following line to your vimrc:
nnoremap <C-]> :command-you-want<CR>
Typically, the command you are looking for is :ta
which can be mapped like so:
nnoremap <leader>t :ta<CR>
You should be able to map it to whatever your Left Click is doing as well. If you check in :help index
it should show you your current bindings. For me both C-LeftMouse
and C-]
are doing :ta
I suspect your C-]
isn't for some reason. You can try setting it to that manually as in the above example.
Personally I have a baked potato for a hippocampus and find I forget more advanced bindings all the time so i keep :help index
bound to F1.
Upvotes: 1