Describe the bug
In my settings I have <C-n> remapped to "g b", and have been using it like that for well over a year. Today it stopped working in the middle of editing a file, and I had to revert to version 1.9.0 to have it working again.
I noticed the when expression has changed in v1.10.0, to something more complicated.
To Reproduce
Steps to reproduce the behavior:
settings.json
"vim.visualModeKeyBindingsNonRecursive": [
{
"before": ["<C-n>"],
"after": ["g", "b"],
}
],
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": ["<C-n>"],
"after": ["g", "b"],
}
],
<C-n> a few timesExpected behavior
The current word should be highlighted, followed by each repetition of the word for every keypress.
Environment:
Just tried this on windows and it was opening a new file instead of doing the intended remapping
Here's the when expression on the keybinding we contribute from package.json:
(editorTextFocus || vim.mode == 'SearchInProgressMode' || vim.mode == 'CommandlineInProgress') && vim.active && vim.use<C-n> && !inDebugRepl
And here's the when expression in keybindings.json:
(editorTextFocus || vim.mode == 'SearchInProgressMode' || vim.active && vim.use<C-n> && !inDebugRepl && vim.mode == ''CommandlineInProgress')'
Seems like it isn't parsing it correctly... are parentheses supported?
Edit: seems they're not. Since we need them to get precedence right, seems like we can't use || 馃檨
Edit: oh right, this wasn't just a nice-to-have: Activating extension 'vscodevim.vim' failed: command 'extension.vim_ctrl+n' already exists.
What is the solution then? Ctrl+N opens a new tab now, even deleting the VSCode keybinding for Ctrl+N does not bring back the expected behaviour.
EDIT: Okay. File-> Preferences -> Vim -> replace "when" condition by the longer expression in your commit. I was actually going crazy trying to figure out how I messed up the keybindings
Same issue happens on my Mac
frustrates me too! This has been my solution to the problem - another plugin :-)
any progress on this?
@aabccd021 This should be fixed - please create a new issue if you're seeing a similar problem
Most helpful comment
Just tried this on windows and it was opening a new file instead of doing the intended remapping