tomtom / tcomment_vim

An extensible & universal comment vim-plugin that also handles embedded filetypes
http://www.vim.org/scripts/script.php?script_id=1173
GNU General Public License v3.0
1.39k stars 102 forks source link

`<c-_><c-_>` does not work, but `gcc` works well #299

Closed dantezhu closed 2 years ago

dantezhu commented 2 years ago

When I type Ctrl -, it just works like I type -, the cursor move back. I am using gVim, version 8.2.5136, but other version does not work too. image

I am using the lastest version of tcomment.

dantezhu commented 2 years ago

it seems like, in gvim, when I type Ctrl -, it will trigger Ctrl -, not Ctrl _.

but when I use macvim, it will trigger Ctrl _.

it is very strange behavior

dantezhu commented 2 years ago

I try to solve it by config like these:

let g:tcomment_mapleader1 = '<C-->'

it works well now, but I don't think it is a good method, because I don't know why Ctlr - behavior like this.

dantezhu commented 2 years ago

seems like it is gvim's bug. I have raise a issue to gvim.

tomtom commented 2 years ago

I think this is documented somewhere. VIM assumes the US keyboard layout for certain tasks. I agree this is weird but I don't know of a work around.