Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Scrolling and Folding API commands #11127

Closed
1 task done
sandy081 opened this issue Aug 29, 2016 · 1 comment
Closed
1 task done

Test Scrolling and Folding API commands #11127

sandy081 opened this issue Aug 29, 2016 · 1 comment
Assignees
Milestone

Comments

@sandy081
Copy link
Member

sandy081 commented Aug 29, 2016

Test for #9609 and #9786

Complexity 4

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
Note: When window scrolls downwards, cursor/lines move upwards and vice-versa

Test up and down scrolling

  • ctrl + e Scroll window 1 line downwards
  • 🔢 ctrl + e Scroll window N lines downwards
  • ctrl + d Scroll half window lines downwards
  • 🔢 ctrl + d Scroll N half window lines downwards
  • ctrl + f Scroll one window lines downwards
  • 🔢 ctrl + f Scroll N window lines downwards
  • ctrl + y Scroll window 1 line upwards
  • 🔢 ctrl + y Scroll window N lines upwards
  • ctrl + u Scroll half window lines upwards
  • 🔢 ctrl + u Scroll N half window lines upwards
  • ctrl + b Scroll one window lines upwards
  • 🔢 ctrl + b Scroll N window lines upwards

Make sure during scrolling, cursor is always revealed in the current window.

Test revealing current line

  • z + t Reveals current line at top of window
  • z + z Reveals current line at center of window
  • z + b Reveals current line at bottom of window

Test folding / unfolding

  • z + c Close one fold under the cursor.
  • 🔢 z + c Close N folds deep under the cursor.
  • z + o Open one fold under the cursor.
  • 🔢 z + o Open N folds deep under the cursor.
@aminroosta
Copy link

aminroosta commented Sep 4, 2016

@sandy081 As you know i'm not a fan of cursorMove at all 😄

But i found a bug while working around every single principle in VsCodeVim to get things done.

      await vscode.commands.executeCommand("cursorMove", {
        to: "up",
        by: "wrappedLine",
        select: false,
        noOfLines: noOfLines
      });

noOfLines has no effect, none! It just gets ignored.

Update: It seems the wrong issue for this comment (related issue #9143)
Update2: Not a bug, That field has been renamed to value!

@aeschli aeschli mentioned this issue Oct 30, 2017
2 tasks
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants