Yonghoon
Yonghoon

Reputation: 71

VIM for VSCode : how to disable key ctrl + , and ctrl + / in vim key

I'm using Vim with VSCode.

When I use ctrl + , or ctrl + / in vim mode to open settings or comment code, it's sometimes not working. So I thought it's a conflict with vim mode.

And I then modified setting.json in vs code.

"vim.handleKeys": {
    "<C-,>": false,
    "<C-/>": false
}

But it did not solve my problem.

Upvotes: 6

Views: 11155

Answers (2)

glaciasn
glaciasn

Reputation: 11

From your username, I'll assume that you're Korean. If you have installed or updated 한글과컴퓨터 (Hancom) word processor, then the installer might switch out your keyboard settings. Yes, it's very likely that this is not an issue from Visual Studio Code.

From Windows Settings -> Time & Language -> Language -> Preferred languages -> Click "한국어" or the default language for you -> Click Options and check Keyboards.

If "한컴 입력기" is set to be your default keyboard, then that's causing your problem. Click it and press Remove, or switch it to Microsoft IME.

The following is the exact same answer, but translated into Korean:

윈도우 설정에서 시간 및 언어 -> 언어 -> 기본 설정 언어의 한국어 클릭 -> 옵션 -> 키보드 항목에 입력기가 "한컴 입력기"로 설정되어 있으면 그러한 증상이 나타납니다. 이를 Microsoft 입력기로 바꿔주시면 문제가 해결됩니다. 추가로 한컴 입력기는 그냥 삭제하셔도 괜찮습니다.

Upvotes: 0

Jossnix
Jossnix

Reputation: 448

I think your settings are superfluous. With the settings below, comments work well.

"vim.handleKeys": {

    "<C-d>": true,
    "<C-k>": false,
    "<C-c>": false,
    "<C-u>": false,
    "<C-v>": false,
    "<C-x>": false,
    "<C-a>": false,
    "<C-f>": false,
    "<C-h>": false
},

Check if this function works normally if you turn off the plugin vim. And check that the Vim: Leader is not "/"

Upvotes: 21

Related Questions