The VSCodeVim team prioritizes issues based on reaction count.
Make sure vim.useCtrlKeys setting is set to true.
Open a file that has more content than can fit on the screen.
Place cursor on the first line.
Press Shift+V to enter visual line mode (bug is present in visual mode as well)
Press Ctrl+D for a page down movement
Notice that the selection is now gone or starts in a different place
Text selection should still start on the line which user started Visual mode in.
Text selection moves to the current cursor location.
Me too!! I need a solution to continue use cmd+D normally please
An issue has been opened on VSCode to track this: https://github.com/Microsoft/vscode/issues/16248
One clever workaround until the VSCode team fixes our bug is to redefine C-u and C-d in terms of k and j using remappings:
"vim.otherModesKeyBindingsNonRecursive": [
{
"before": ["<C-u>"],
"after": ["2", "0", "k"]
},
{
"before": ["<C-d>"],
"after": ["2", "0", "j"]
}
]
Now the selection will work properly again.
@johnfn, thanks for the workaround! Just wanted to comment that "20", "k" would not work for me. I assume this is because 20 isn't a single key press.
Changing it to "after": ["2", "0", "k"] works for me.
@kylpo you are exactly right. Thanks for the correction! I've updated my post.
This was supposedly fixed in #1859, but I still have this issue in the latest version of Code.
I had to use this to get what I was looking for (keeping the cursor on the same screen line as I page up and down):
"vim.otherModesKeyBindingsNonRecursive": [
{
"before": ["<C-u>"],
"after": ["2", "0", "<C-y>", "2", "0", "k"]
},
{
"before": ["<C-d>"],
"after": ["2", "0", "<C-e>", "2", "0", "j"]
}
]
@jkfranci I'm new to VSCode, where do you paste that code?
Hi all,
If any of you is still experiencing this. What fixed mine was to have VScode let the vim extension to handle the ctrl+u and ctrl+d keys by setting.
"vim.handleKeys": {
"<C-d>": true,
"<C-u>": true,
},
Most helpful comment
One clever workaround until the VSCode team fixes our bug is to redefine C-u and C-d in terms of
kandjusing remappings:Now the selection will work properly again.