Reputation: 808
I'm using VSCode with Vim extension enabled.
By default, VSCode Ctrl+K Ctrl+number
would fold the code of the entire file to the indent level set by the number.
This is EXTREMELY useful for me, and I use it all the time.
The problem is: with the Vim extension enabled, those commands doesn't work anymore.
This extension also doesn't allow (as far as I know) to change configurations such as ":set foldmethod=indent".
Are there any workarounds?
Thank you very much!
Upvotes: 6
Views: 3130
Reputation: 808
ORIGINAL SOLUTION:
The most simple solution I found was to disable Vim: Use Ctrl Keys
at
Settings > Extensions > Vim > Vim: Use Ctrl Keys
(you can type "vim ctrl" in the search bar to find it faster).
You can also add "vim.useCtrlKeys": false,
directly in your settings.json.
It's good enough for me, but be aware that it can mess up your Vim commands, as it will not use any Ctrl commands anymore.
MUCH BETTER SOLUTION:
Just put this in settings.json!
"vim.handleKeys": {
"<C-k>": false
},
Upvotes: 10