Vim icon indicating copy to clipboard operation
Vim copied to clipboard

Fn+Up/Down (Page Up/Down) loses selection

Open 1player opened this issue 9 years ago • 7 comments

What did you do?

Started a selection (Shift+v, Ctrl+v, v), pressed Fn+Up/Down to move up/down one page.

What did you expect to happen?

The selection to be extended one page up/down.

What happened instead?

The selection is lost.

Technical details:

  • VSCode Version: 1.6
  • VsCodeVim Version: 0.3.5
  • OS: OS X 10.11.6

It works as intended if I move up or down with Fn+Shift+Up/Down, but not with the regular Fn+Up/Down.

I've had this problem with basically all Vim plugins for both VSCode, Atom and Sublime (!). That is weird indeed, and it works perfectly on Emacs or vim, which suggests I'm doing something very wrong and nobody has ever reported a movement I do 100x per day.

Can you help me understand what's going on?

1player avatar Oct 11 '16 12:10 1player

No you are not wrong, for example, shift+v and using ctrl + d or ctrl + u would be using strictly vim shortcuts, and the same difference occurs. This is a valid issue to have filed!

xconverge avatar Oct 12 '16 02:10 xconverge

@1player I also have this issue and it drives me crazy! Everything else in Vim plugin works perfectly for me, but I keep stumbling on this one issue constantly. I filed this issue as well here: https://github.com/VSCodeVim/Vim/issues/907

maciej-trebacz avatar Oct 25 '16 15:10 maciej-trebacz

Also, it's weird because doing Shift+V and then 20j works just as expected.

maciej-trebacz avatar Oct 25 '16 15:10 maciej-trebacz

@Chillee Now that https://github.com/VSCodeVim/Vim/pull/1859 landed, and the few related bugs #1591, #907, etc. have been closed, could you have a look at this one? Pg-Up/Down when in visual mode still isn't working.

1player avatar Jun 26 '17 14:06 1player

I also vote to fix this issue.

I tried the below workaround, which not only didn't map PgUp/PgDn correctly, but prevented Ctrl-U/Ctrl-D from working as expected with the selection:

vim.visualModeKeyBindings": [
       {
           "before": ["<C-u>"],
           "after": ["<PageUp>"]
       },
       {
           "before": ["<C-d>"],
           "after": ["<PageDown>"]
       }

lukedegruchy avatar Oct 17 '18 23:10 lukedegruchy

There's another symptom. If I press an arrow key (or anything else that moves by one line/character?) after triggering the original bug with Page Up/Down the cursor jumps back to where it was before and the selection is restored.

Otherwise this plugin has really come on in leaps and bounds since I last tried Code, surpassing Jetbrains' IdeaVim. Keep up the good work :).

realh avatar Nov 28 '18 23:11 realh

Any progress on this? What's up with the pending pullrequest?

allo- avatar Mar 27 '25 13:03 allo-