Skip to content

Test: Evaluate API gaps for better VIM support #9699

@Tyriar

Description

@Tyriar

Test for #8997:

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 beginning
  • vg0: Selects till beginning
  • `g^: Moves to first non white space character
  • vg^: Selects till first non white space character
  • g$: Moves to end
  • vg$: Selects till end
  • g_: Moves to last non white space character
  • vg_: Selects till last non white space character
  • gm: Moves to center
  • vgm: Selects till center

Test up - down motions (Where n is a number variable and default is 1)

  • ngkMove up n wrapped lines
  • nvgkSelect till n wrapped lines up
  • ngjMove down n wrapped lines
  • nvgjSelect till n wrapped lines down
  • nH Move to first non white space character of nth line from the top of the view
  • nvH Select till first non white space character of nth line from the top of the view
  • nL Move to first non white space character of nth line from the bottom of the view
  • nvL Select till first non white space character of nth line from the bottom of the view
  • nM Move to first non white space character of center line of the view
  • nvM 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 group
  • tabm{n} Moves to position n in its group. Default is 0.
  • tabm>{n} Moves to right by n positions in its group. Default is 1.
  • tabm<{n} Moves to left by n 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 to Right group
  • tabm<, tabm<< Moves to Left group
  • tabm. Moves to Center group
  • tabm{n} Moves to group n. Default is Right.

Known bugs

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions