question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. Itย collects links to all the places you might be looking at while hunting down a tough bug.

And, if youโ€™re still stuck at the end, weโ€™re happy to hop on a call to see how we can help out.

Ctrl+D / Ctrl+U (page down/up) moves selection when in Visual Line mode

See original GitHub issue
  • Click thumbs-up ๐Ÿ‘ on this issue if you want it!
  • Click confused ๐Ÿ˜• on this issue if not having it makes VSCodeVim unusable.

The VSCodeVim team prioritizes issues based on reaction count.


What did you do?

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

What did you expect to happen?

Text selection should still start on the line which user started Visual mode in.

What happened instead?

Text selection moves to the current cursor location.

Technical details:

  • VSCode Version: 1.6.0
  • VsCodeVim Version: 0.3.7
  • OS: macOS Sierra

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:27
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

18reactions
johnfncommented, Jan 23, 2017

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.

4reactions
chriyscommented, Mar 22, 2019

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,
},
Read more comments on GitHub >

github_iconTop Results From Across the Web

Keyboard shortcuts in Windows - Microsoft Support
Copy, paste, and other general keyboard shortcuts ; Alt + Page Up. Move up one screen. ; Alt + Page Down. Move down...
Read more >
Keyboard shortcuts for Windows - Visual Studio Code
Ctrl +C. Copy line (empty selection). Alt+ โ†‘ / โ†“. Move line up/down ... Ctrl+End. Go to end of file. Ctrl+โ†‘ / โ†“....
Read more >
Visual Studio Shortcut Keys - VS Code shortcuts - Dofactory
Ctrl -Shift-Page Down, Moves the cursor to the last line in view, extending the selection. Ctrl-Shift-Page Up, Moves the cursor to the top...
Read more >
Keyboard shortcuts: keymaps comparison (Windows) - JetBrains
Visual Studio 2022 โ€” this keymap is recommended for Windows users who have ... Alt+Up. Move Caret to Page Top. Ctrl+Page Up. Ctrl+Page...
Read more >
Keyboard shortcuts in After Effects - Adobe Support
Move selected layers, masks, effects, or render items down (back) or up (forward) in stacking order. Ctrl + Alt + Down Arrow or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found