-
-
Notifications
You must be signed in to change notification settings - Fork 91
Open
Labels
Milestone
Description
Some links:
- Search the code base for
nextPrev
. You'll need to make a new type of token calledordinal
that functions identically tonextPrev
, but creates anordinalScope
modifier instead of therelativeScope
created bynextPrev
- Here is the shape of the ordinal modifier you'll end up creating from our keyboard grammar:
cursorless/packages/common/src/types/command/PartialTargetDescriptor.types.ts
Lines 263 to 280 in 5f94e08
/** * Refer to scopes by absolute index relative to iteration scope, eg "first * funk" to refer to the first function in a class. */ export interface OrdinalScopeModifier { type: "ordinalScope"; scopeType: ScopeType; /** The start of the range. Start from end of iteration scope if `start` is negative */ start: number; /** The number of scopes to include. Will always be positive. If greater than 1, will include scopes after {@link start} */ length: number; /** If true, yields individual targets instead of contiguous range. Defaults to `false` */ isEvery?: boolean; }