6

I have a windows 7 machine with an azerty keyboard running gVim 7.4

My problem is that <C-]> simply does nothing: When I'm in an help page I can't follow the tags links. As I have an azerty keyboard I have to use the keys Ctrl+AltGr+] I thought that was causing the problem but when I use Vim on a distant machine via ssh in a cygwin console <C-]> works properly.

Edit: It also works correctly when I use a local vim instance in a cygwin console. So it seems to be a gVim issue.

I found a question mentionning this problem but none of the answers works for me.

Also I used :verbose nmap <C-]> to check if a mapping was already present but I gave me no mapping found.

What can I do to have this key combinaison working properly?

10
  • 1
    Try the $ key in place of ]: <C-$>.
    – romainl
    Jun 23, 2015 at 10:20
  • If you're using Windows, it's possible the <C-]> is not defined in the keyboard layout i.e. it doesn't generate a code for Vim to pick up. You can probably change the keyboard layout using MS keyboard layout creator tool, in order to add the missing code(s), but I didn't try that, just read about it some time ago. Or, you can map <C-]> to another combo.
    – VanLaser
    Jun 23, 2015 at 10:24
  • @romainl: This alternative key sequence works thanks! @ Laser: as the solution of romainl worked I'll probably will not take time to redefine my layout but I have a question: If windows doesn't send a code for this combo, how can it work on a cygwin console?
    – statox
    Jun 23, 2015 at 10:34
  • It's Vim's fault: ] is hardcoded to the last key on the first alphabetical row.
    – romainl
    Jun 23, 2015 at 10:43
  • According to a recent discussion on vim_use, langmap might help.
    – lcd047
    Jun 23, 2015 at 11:11

3 Answers 3

4

As it was asked in the comment I'll leave here what I have done so far:

I'm using the solution suggested by @romainl in the comments which is using <C-$> instead of <C-]>. That might not be the most elegant way but it works and I haven't found any drawback for the moment.

I think it is important to also mention @lcd047's suggestion of using the option langmap. From what I understood this option allows to map a character to another. For example I tried to put this set langmap+=]$ in my vimrc to let vim replace ] with $ but I haven't been able to make this solution work I will update this answer if I manage to make the second solution work or if I find a better way.

1

I had a similar problem with Vim 9.0 (specifically gvim) on Windows 10 (italian qwerty keyboard, but i think this is irrelevant).

Neither :map command nor Google helped me. :-(

gvim

  • If i try to open link in the help file with Ctrl+] (key Ctrl+AltGr++) nothing happens.
    If I type it twice the cursor go at the bottom of the help file.
  • If I type Ctrl++ the cursor go down by one row. Same behavior if I type only +.

vim

  • As in gvim, if i try to open link in the help file with Ctrl+] (key Ctrl+AltGr++) nothing happens.
    And the same if I type it twice (the cursor go at the bottom of the help file).
  • If I type Ctrl++ it works!, while if I just type + it behaves as gvim.

In both programs the mouse works properly.
Ctrl+LeftClick or double LeftClick both leads me to the right help tag.

My workaround

I solved the problem by setting the mapping in the .vimrc

" Workaround to jump to the help tags in gvim
nnoremap <C-+> <C-]>

P.S. I believe (but I'm not sure) that this problem came by installing the new vim version, with the previous one it seems to me that it worked fine, even if trying to use it now, downloading the zip of 8.2 in a folder and launching gvim the problem is present ... and I didn't remap the keys for Windows when the installer asked me.
I don't know but I am writing this in case anyone else notices any connection.

2
  • 1
    There is currently a bug about Ctrl-[ in Vim 9.: bug 10454 Jul 12, 2022 at 10:57
  • Thanks Vivian, good to know, but I'm not sure that it's related. It happens, for me, also using the old 8.2, as I wrote above.
    – Antonio
    Jul 13, 2022 at 13:03
1

Same problem for me, not being able to jump/reach an help subject in Vim with Ctrl + ] on Windows 10 with an AZERTY keyboard and layout (french).

After many searches...

First my versions :

  • Windows 10 Version 22H2 (build 19045.2846)
  • Powershell 7.3.3 and Windows Terminal version 1.16.10261.0

With Vim 9.0.1425:

  • gvim & vim => Ctrl + $ will jump to the help subject.

With Neovim 0.9.0

  • Ctrl + Shift + + (the key on the top right, with + = and }) will jump to the help subject.

On a Linux system (Ubuntu Mate) with an AZERTY layout and keyboard and with Vim version 8.2.4919, Ctrl + AltGr + ] runs, as expected and stated in the documentation.

Hope this help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.