Describe the bug
The visualModeKeyBindings{NonRecursive} option ignores some motion keybindings.
To Reproduce
"vim.visualModeKeyBindingsNonRecursive": [
{
"before": ["H"],
"after": ["^"],
},
{
"before": ["L"],
"after": ["$"],
},
]
vim.visualModeKeyBindingsNonRecursive and position the cursor over the dot (.) after vimLExpected behavior
Select from the position of the cursor until the end of the line in visual mode (same as using the $ motion as stated in the config)
Actual behaviour
Selects from the position of the cursor until the end of the viewport (L's default behaviour, instead of the one defined in the config file)
Environment
{
"activationTimes": {
"startup": true,
"codeLoadingTime": 260,
"activateCallTime": 5,
"activateResolvedTime": 82,
"activationEvent": "*"
}
}
Additional context
I can confirm that using vnoremap L $ in regular vim behaves as expected. Other visual mode commands (such as y$) do work, but __only__ after I've pressed v to enter visual mode _and pressed another key that's not escape). This seems to be a different bug.
@AeroCross Have been looking though the issues and have found mulitple duplicates, with thumbs up spread amoungst them all;
https://github.com/VSCodeVim/Vim/issues/1261
https://github.com/VSCodeVim/Vim/issues/1835
https://github.com/VSCodeVim/Vim/issues/2233
https://github.com/VSCodeVim/Vim/issues/1398
https://github.com/VSCodeVim/Vim/issues/1870
https://github.com/VSCodeVim/Vim/issues/2131
https://github.com/VSCodeVim/Vim/issues/2234
And duplicate, with some work having been done;
https://github.com/VSCodeVim/Vim/issues/1835
Actually, a significant percentage of issues is regarding remapping of key bindings.
Perhaps we can pool resources to work on a release which would resolve all of them in 1 shot!
I'd be happy to help in any way I can, although my knowledge of the internals of this extension and TypeScript in general is very small 馃槄
A couple of those issues does shed some light about what the issue is.
In https://github.com/VSCodeVim/Vim/issues/2131#issuecomment-343228374 and https://github.com/VSCodeVim/Vim/issues/1835#issuecomment-392646876, you can see that the workaround is pressing another key, because visual mode keybinds don't work otherwise. I think this is because when visual mode is turned on, v is passed as a chord of sorts.

See that extra v after --VISUAL--? It's the same if you had pressed d in normal mode for example. It's expecting another keybinding. That's a bug.
It would also seem that this has been happening for a while.
As a workaround:
"vim.normalModeKeyBindings": [
// Workaround: Visual Mode chord bug
// https://github.com/VSCodeVim/Vim/issues/2842
{
"before": ["v"],
"after": ["v", "l", "h"]
},
Closing as duplicate of #1835
Most helpful comment
I'd be happy to help in any way I can, although my knowledge of the internals of this extension and TypeScript in general is very small 馃槄
A couple of those issues does shed some light about what the issue is.
In https://github.com/VSCodeVim/Vim/issues/2131#issuecomment-343228374 and https://github.com/VSCodeVim/Vim/issues/1835#issuecomment-392646876, you can see that the workaround is pressing another key, because visual mode keybinds don't work otherwise. I think this is because when visual mode is turned on,
vis passed as a chord of sorts.See that extra
vafter--VISUAL--? It's the same if you had presseddin normal mode for example. It's expecting another keybinding. That's a bug.It would also seem that this has been happening for a while.
As a workaround: