43

I've used vscode with the vim plugin for years. All of a sudden I can no longer open files using CTRL+P. Looks like the plug-in intercepts this combination and moves the cursor up instead.

1
  • 2
    This doesn't directly help you, but I suggest using the neovim plugin instead. That extension doesn't emulate neovim, but uses a real instance in the background. And neovim can just load vimrcs, so the switch is really just install neovim and the plugin and write a 3 line configfile. See: :help nvim-from-vim. What made me switch was all the inconsistencies with the emulator and using vim-surround with functions :)
    – jaaq
    Commented Sep 13, 2023 at 12:42

5 Answers 5

40

In the settings.json you can also tweak the vim plugin to ignore some keys:

Set to true or false the key combination you would like the vim plugin to react to:

"vim.handleKeys": {
    "<C-p>": false
}
38

It looks like this issue was introduced in v1.26.0 a few days ago. If you don't use Ctrl+P to navigate in the filepicker, you can disable or change the vim shortcut back to the default VSCode behavior, as noted in the issue:

// keybindings.json
{
    "key": "ctrl+p",
    "command": "workbench.action.quickOpen"
}
1
8

The easier thing to do is to use ctrl+shift+p (which still works) and then delete the '>' that appears in the search box. This turns the box into the file picker.

6

I used this way

ctrl + shift + e // switch to explorer
ctrl + p         // find something
ctrl + shift + e // back to workspace
1

In the latest version you can search for vim ctrl in the settings menu ctrl + , to toggle this sort of overriding on/off:

"Vim: Use Ctrl Keys Enable some Vim Ctrl key commands that override otherwise common operations, like Ctrl+C."

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.