Reputation: 656
I'm trying to use Vim mode in Visual Studio Code, using their VSCodeVim extension
In my old vimrc
it looks like:
map <S-space> <Esc>
In Code's settings.json
I've tried:
"vim.insertModeKeyBindingsNonRecursive": [
{
"before": ["<S-Space>"],
"after": ["<Esc>"]
}
],
Doesn't work :(
Upvotes: 2
Views: 2693
Reputation: 11
Add this to keybindings.json
:
{
"key": "shift+space",
"when": "editorTextFocus && vim.active && vim.mode == 'Insert' && !editorHasSelection",
"command": "extension.vim_escape",
}
vscodevim doesn't seem to support it dirctly now,
I'm using space and shif+space to scroll (like in browsers), this can also achieved by using vscode's api:
{
"key": "shift+space",
"command": "cursorMove",
"args": { "to": "up", "by": "line", "value": 5 }
}
other in settings.json
Upvotes: 0
Reputation: 656
Looks like a bug in their addon, not something I was doing wrong.
Inside just the normal keybindings.json
:
{
"key": "shift+space",
"command": "extension.vim_escape",
"when": "editorTextFocus"
},
Upvotes: 3