Closed
Description
These commands are needed for Vim:
From VSCodeVim/Vim#210:
Vim has handy commands for scrolling without moving the cursor, e.g. zt, which scrolls the screen so that the line with the current cursor is placed as the first line. E.g., I often do actions like /main(zt, so that I can see as much of the main function as possible.
Would it be possible to implement zt, zb and zz?
Thanks!
- Scroll window upwards/downwards by lines (real line) or window size (eg, half window size)
executeCommand('editorScroll', {to: 'up', by: 'line', value: 10, revealCursor?: false});
'to'
- up
- down
'by'
- line
- wrappedLine
- page
- halfPage
'revealCursor'
- If
true
reveals the cursor while scrolling otherwise does not. - Scroll line to a specific position of the window
executeCommand('revealLine', {lineNumber: 10, at: 'top'});
'at'
- top
- center
- bottom
- Scroll horizontal scrollbar by column numbers.
Horizontal scrolling is already implemented by cursor move commands. Hence marking this done. See VIM API Gaps #8997