As the title, it's my setting below, by the way, the before:["C-k"] is wroking nomrally
in setting.json
"vim.normal..." :{
"before":["A-k"],
"after":["C-i"],
}
Is there something other setting in vscode which i need to handle?
Hi, afaik alt key mappings are not supported as of now:
https://github.com/VSCodeVim/Vim/issues/2713
For your special case, C-i is jump forward, right? If there is an equivalent vscode function, one could create a keybinding to that.
Hi, ALT key is not been mapped. I'm trying to map keys to move lines up and down with
"vim.visualModeKeyBindingsNonRecursive": [
{
"before": ["<A-j>"],
"commands": ["editor.action.moveLinesDownAction"]
},
{
"before": ["<A-k>"],
"commands": ["editor.action.moveLinesUpAction"]
}
]
I don't get why its happening because in previous releases alt key is supported (https://github.com/VSCodeVim/Vim/issues/2713#issuecomment-616074103). Maybe a bug is still occurring?
As far as I know there is currently no support for 'Alt' keys combinations. For now as a workaround you can change the keybindings directly in VSCode.
If you go to VSCode's 'Keyboard Shortcuts' (you can press Ctrl+Shift+P to open command palette then type 'Preferences: Open Keyboard Shortcuts (JSON)' to open the shortcuts file) and then you can add the following shortcuts:
{
"key": "alt+j",
"command": "editor.action.moveLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "alt+k",
"command": "editor.action.moveLinesUpAction",
"when": "editorTextFocus && !editorReadonly"
},
This will allow you to also use 'Alt+k' and 'Alt+j' to move lines up and down respectively. And since this is native to VSCode it will work no matter what mode you are in.
Most helpful comment
As far as I know there is currently no support for 'Alt' keys combinations. For now as a workaround you can change the keybindings directly in VSCode.
If you go to VSCode's 'Keyboard Shortcuts' (you can press
Ctrl+Shift+Pto open command palette then type 'Preferences: Open Keyboard Shortcuts (JSON)' to open the shortcuts file) and then you can add the following shortcuts:This will allow you to also use 'Alt+k' and 'Alt+j' to move lines up and down respectively. And since this is native to VSCode it will work no matter what mode you are in.