VSCodeVim / Vim

:star: Vim for Visual Studio Code
http://aka.ms/vscodevim
MIT License
13.97k stars 1.32k forks source link

unable to use visual block mode via `<C-v>` #7779

Open hopezh opened 2 years ago

hopezh commented 2 years ago

Describe the bug I'm unable to use "ctrl+v", or "^v" (Mac OS), to enter the "visual block mode" to select a rectangular block of text.

I checked my "keyboard shortcuts", and it seems ok that "^v" is assigned to "extension.vim_ctrl+v", as shown below:

Anyone having similar issue?

I understand that there is a multi-cursor function in vscode, but considering that visual block mode is such a basic and useful function in vim, it's frustrating that it's not working in vscodevim...

Previous discussions on visual block mode don't seem to have any conclusions: https://github.com/VSCodeVim/Vim/issues/353 https://github.com/VSCodeVim/Vim/issues/401

Screenshots Screen Shot 2022-06-25 at 13 54 57 PM

Environment (please complete the following information):

Ty026 commented 2 years ago

try <C-q> 😄

scypurple commented 2 years ago

same question ... This is the only function it's bound to <C-v>

J-Fields commented 2 years ago

Mind sharing your settings.json (at least the vim.* settings), keybindings.json, and .vimrc (if you're using the feature)?

hopezh commented 2 years ago

Thanks, @J-Fields

As requested, I'm attaching three files here: vscode's settings.json, vscode's keybindings.json, and my nvim's init.vim

Appreciate your advice.

setting_files.zip

hopezh commented 2 years ago

try <C-q> 😄

Sorry, not working. Seems is used for many things in my vscode, as shown blow...

Screen Shot 2022-06-30 at 23 33 40 PM

wiwh commented 2 years ago

Solved it by adding "\<C-q>": true to vim.handleKeys in the settings.

AbdelrahmanDwedar commented 1 year ago

I'm also facing this issue as well, and even doesn't work even after adding it to vim.handleKeys.

Update: it now works fine for some reason with <C-q>, but can't we use <C-v> for that?

sietsevanderbom commented 11 months ago

You might have the C-v keybinding blocked by setting:

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

When I get rid of that line, or set it to true C-v works.

haitt173508 commented 10 months ago

delete line "vim.useCtrlKeys": ... in settings.json file

cocoaaa commented 2 weeks ago

Quick question: what's the reasoning behind vscode-vim to set <ctrl+q> in place of vim's original binding <ctrl+v>?