Skip to content

[api] Allow extensions to determine if a position is within a fold #81498

@costincaraivan

Description

@costincaraivan

This has been the most demanded feature of VSCodeVim: VSCodeVim/Vim#1004 for over 3 years.

The main problem with Folds and Vim is that some motions will skip right over folded areas (like moving up/down). We need to know if we are in a folded area so we can iterate these motions until we are out of the fold.

An API like vscode.window.activeTextEditor.getAllFoldedRegions(): vscode.Range[] would be ideal.

An API like vscode.window.activeTextEditor.isPositionInFold(position: vscode.Position): boolean would also be great.


This is technically a duplicate for 22276, but that was closed because the roadmap at the time couldn't include this ticket.

Maybe it's time to revisit this? It has been blocking the most demanded feature of one of the most popular plugins out there, for 3+ years.

Metadata

Metadata

Labels

VIMVIM issueapifeature-requestRequest for new features or functionality

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions