Reputation: 1459
I am trying to improve my skill with using the vim extension on vscode, and I would like to ask if it is possible to navigate through the file tree with it.
Here is what I would want to do:
If there is a better document for this, I would be glad to explore more :)
Upvotes: 2
Views: 6261
Reputation: 1491
Add into the Visual Studio Code settings.json some of the following configuration:
{
"vim.leader": "<space>",
"vim.normalModeKeyBindings": [
{
"before": ["<leader>", "p"],
"commands": ["workbench.view.explorer"]
},
{
"before": ["<leader>", "P"],
"commands": ["workbench.files.action.showActiveFileInExplorer"]
}
],
"vim.handleKeys": {
"<C-p>": false,
"<C-c>": false,
"<C-v>": false,
"<C-x>": false,
"<C-a>": false,
"<C-w>": false,
"<C-y>": false,
"<C-f>": false
},
"vim.useSystemClipboard": true,
}
Use the vim navigation keys: L or Enter will open the file.
I suggest to use the built-in Ctrl+P feature from Visual Studio Code.
Use the delete key on your keyboard.
Edit the VS Code keybindings.json or set your own in the vim config.
Check out the documentation.
Upvotes: 0
Reputation: 220
VSCodeVim provides only text editing and navigation commands like }, dd, p and so on. Moreover, None of the native Visual Studio Code ctrl (e.g. ctrl+f, ctrl+v) commands work. The only way to use VSCode commands is turn off vim extension: ctrl + P > Toggle Vim Mode.
Upvotes: 2