-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Closed
Description
Test for #8997:
- Any OS (Linux) - @Tyriar
Set up
- Clone the repository VS Code Extension Samples
- Go to the folder vim-sample and do npm install
- Open VS Code on vim-sample
- Run the extension using Launch Extension.
This will run Vim sample extension and is referred as Vim editor from here after. Verify following scenarios on this.
Good to know
- Vim editor has basically 3 modes:
Normal
,Visual
,Edit
.
Mode change
- Press
i
for edit mode when in normal or visual mode. - Press
esc
for normal node when in edit mode. - Press
v
for visual mode when in normal mode.
Line vs wrapped line
A line is a complete line that can consists of one or more wrapped lines in the screen.
Note: All of these scenarios have to be tested in non-edit mode
Test Cursor movements
When cursor is in wrapped line then typing...
Test left - right motions
g0
: Moves to beginningvg0
: Selects till beginning- `g^: Moves to first non white space character
vg^
: Selects till first non white space characterg$
: Moves to endvg$
: Selects till endg_
: Moves to last non white space charactervg_
: Selects till last non white space charactergm
: Moves to centervgm
: Selects till center
Test up - down motions (Where n
is a number variable and default is 1)
ngk
Move up n wrapped linesnvgk
Select till n wrapped lines upngj
Move down n wrapped linesnvgj
Select till n wrapped lines downnH
Move to first non white space character of nth line from the top of the viewnvH
Select till first non white space character of nth line from the top of the viewnL
Move to first non white space character of nth line from the bottom of the viewnvL
Select till first non white space character of nth line from the bottom of the viewnM
Move to first non white space character of center line of the viewnvM
Select till first non white space character of center line of the view
Test Tab motions
In Normal / Visual mode, typing :
will open an Input box. In the input box, type and test following for current active editor
Note: For convenience, input box is pre-filled with value tabm
.
When tabs are enabled
tabm
Moves to last position in its grouptabm{n}
Moves to positionn
in its group. Default is 0.tabm>{n}
Moves to right byn
positions in its group. Default is 1.tabm<{n}
Moves to left byn
positions in its group. Default is 1.tabm>>
Moves to last position in its group.tabm<<
Moves to last position in its group.tabm.
Moves to center of its group. Default is 1.
When tabs are disabled
Note: 0
: Left, 1
:Center, 2
:Right
tabm
,tabm>
,tabm>>
Moves toRight
grouptabm<
,tabm<<
Moves toLeft
grouptabm.
Moves toCenter
grouptabm{n}
Moves to groupn
. Default isRight
.