amVim-for-VSCode icon indicating copy to clipboard operation
amVim-for-VSCode copied to clipboard

Ctrl+d Ctrl+u

Open zhangbowei opened this issue 8 years ago • 10 comments

I want to move N lines when i click "Ctrl+d", what should i do? (I don't want to click N and Ctrl+d every times.In other words, I use N and Ctrl+u/d) image image

zhangbowei avatar May 04 '16 11:05 zhangbowei

CTRL-D and CTRL-U are not supported yet. They stands for "window N lines downwards/upwards (default: 1/2 window)". But we can't get how many lines current window has by using VSCode's api now. I'm going to ask a solution from VSCode's team.

aioutecism avatar May 04 '16 11:05 aioutecism

We already support this feature in Code. The command for this feature is like

await commands.executeCommand('editorScroll', {
  to: "up",
  by: "halfPage",
  value: 1,
  revealCursor: args.moveType !== PageMoveType.Normal,
});

If you set revealCursor as true, Code will help you select the content. I've tried to implement this a little bit but seems I don't get the selection correct, so I put this info here first.

rebornix avatar Oct 16 '16 22:10 rebornix

Yes. This can be implemented now.

aioutecism avatar Oct 17 '16 03:10 aioutecism

@aioutecism Had this been implemented?

kalaxiya avatar Nov 04 '16 02:11 kalaxiya

Hi @linzerui , No, I'll find time to add it.

aioutecism avatar Nov 09 '16 05:11 aioutecism

@aioutecism any progress on this ? perhaps if you could point me to the right files I could try to make a PR

bjerkins avatar Jul 12 '17 10:07 bjerkins

Ref: https://code.visualstudio.com/docs/extensionAPI/vscode-api#TextEditor.visibleRanges

aioutecism avatar Apr 13 '18 05:04 aioutecism

It seems this has been added because it is in the settings, but it is currently broken it seems. Tried setting it up, removing key bind conflicts, etc. Still not working.

Vscode 1.86.2

plutotom avatar Feb 27 '24 17:02 plutotom

I see what you mean by it appears to be in the settings, but perhaps only working for up/down in the list view. The other Ctrl+U in the settings is for insert mode delete left of cursor. The half page up/down is not yet implemented. It should not be too difficult to do, I will try to take a look when I have some time, or you are welcome to take a look if you like.

alisonatwork avatar Feb 29 '24 12:02 alisonatwork

I have some time this weekend so I can take a look. No promises on progress though!

plutotom avatar Mar 01 '24 15:03 plutotom