amVim-for-VSCode
amVim-for-VSCode copied to clipboard
Ctrl+d Ctrl+u
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)
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.
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.
Yes. This can be implemented now.
@aioutecism Had this been implemented?
Hi @linzerui , No, I'll find time to add it.
@aioutecism any progress on this ? perhaps if you could point me to the right files I could try to make a PR
Ref: https://code.visualstudio.com/docs/extensionAPI/vscode-api#TextEditor.visibleRanges
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
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.
I have some time this weekend so I can take a look. No promises on progress though!