Skip to content

Need API to for lines visible in viewport #2771

@ghost

Description

Cursor Commands

  • Move to view line start g0
  • Select till line start vg0
  • Move to view line first non white space character g^
  • Select till line first non white space character vg^
  • Move to view line end g$
  • Select till view line end vg$
  • Move to view line last non white space character g_
  • Select till view line last non white space character vg_
  • Move to view line middle gm
  • Select till view line middle vgm
  • Move up N view lines gk
  • Select till N view lines up vgk
  • Move down N view lines gj
  • Select till N view lines down vgj
  • Move to first non white space character of Nth line from the top of the view H
  • Select till first non white space character of Nth line from the top of the view vH
  • Move to first non white space character of center line of the view M
  • Select till first non white space character of center line of the view vM
  • Move to first non white space character of Nth line from the bottom of the view L
  • Select till first non white space character of Nth line from the bottom of the view vL

vi has H, M, and L keybindings that move the cursor based what lines are currently on screen. It's not possible for a Vim-like extension to implement these right now, because the the vscode extension APIs don't expose this information.

Metadata

Metadata

Labels

VIMVIM issueapifeature-requestRequest for new features or functionality

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions