Vim icon indicating copy to clipboard operation
Vim copied to clipboard

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

Open hopezh opened this issue 3 years ago • 9 comments

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):

  • Extension (VsCodeVim) version: 1.22.2
  • VSCode version: 1.68.1
  • OS: Mac OS Monterey v12.4

hopezh avatar Jun 25 '22 06:06 hopezh

try <C-q> 😄

Ty026 avatar Jun 27 '22 11:06 Ty026

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

scypurple avatar Jun 29 '22 04:06 scypurple

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

J-Fields avatar Jun 29 '22 20:06 J-Fields

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 avatar Jun 30 '22 15:06 hopezh

try <C-q> 😄

Sorry, not working. Seems <C-q> is used for many things in my vscode, as shown blow...

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

hopezh avatar Jun 30 '22 15:06 hopezh

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

wiwh avatar Jul 24 '22 13:07 wiwh

I'm also facing this issue as well, and even <C-q> ~~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?

AbdelrahmanDwedar avatar May 14 '23 13:05 AbdelrahmanDwedar

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.

sietsevanderbom avatar Nov 23 '23 10:11 sietsevanderbom

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

haitt173508 avatar Dec 21 '23 09:12 haitt173508