/** * Vim Motion Commands * * Implements vim-style navigation motions for list navigation. * * @since v1.58.0 */ import type { Tier } from '../../core/types/auth.js'; import type { MotionCommand, MotionContext, MotionResult, VimKeyEvent } from './vim-types.js'; /** * Basic motion: Move up (k) */ export declare function motionUp(context: MotionContext): MotionResult; /** * Basic motion: Move down (j) */ export declare function motionDown(context: MotionContext): MotionResult; /** * Basic motion: Move left (h) - for horizontal lists */ export declare function motionLeft(context: MotionContext): MotionResult; /** * Basic motion: Move right (l) - for horizontal lists */ export declare function motionRight(context: MotionContext): MotionResult; /** * Line motion: Jump to first item (0) */ export declare function motionLineStart(context: MotionContext): MotionResult; /** * Line motion: Jump to last item ($) */ export declare function motionLineEnd(context: MotionContext): MotionResult; /** * Line motion: Jump to first non-empty item (^) * For lists, this is effectively the same as 0 */ export declare function motionFirstNonBlank(context: MotionContext): MotionResult; /** * Screen motion: Jump to top of visible list (H) */ export declare function motionScreenTop(context: MotionContext): MotionResult; /** * Screen motion: Jump to middle of visible list (M) */ export declare function motionScreenMiddle(context: MotionContext): MotionResult; /** * Screen motion: Jump to bottom of visible list (L) */ export declare function motionScreenBottom(context: MotionContext): MotionResult; /** * Page motion: Half page up (Ctrl+u) */ export declare function motionHalfPageUp(context: MotionContext): MotionResult; /** * Page motion: Half page down (Ctrl+d) */ export declare function motionHalfPageDown(context: MotionContext): MotionResult; /** * Page motion: Full page up (Ctrl+b) */ export declare function motionFullPageUp(context: MotionContext): MotionResult; /** * Page motion: Full page down (Ctrl+f) */ export declare function motionFullPageDown(context: MotionContext): MotionResult; /** * Document motion: Jump to first item (gg) */ export declare function motionDocumentTop(context: MotionContext): MotionResult; /** * Document motion: Jump to last item (G) */ export declare function motionDocumentBottom(context: MotionContext): MotionResult; /** * Document motion: Jump to percentage (%) */ export declare function motionPercentage(context: MotionContext): MotionResult; /** * Search motion: Next search result (n) */ export declare function motionNextSearchResult(context: MotionContext): MotionResult; /** * Search motion: Previous search result (N) */ export declare function motionPrevSearchResult(context: MotionContext): MotionResult; /** * Mark motion: Jump to mark ('{letter}) */ export declare function motionJumpToMark(context: MotionContext, mark: string): MotionResult; /** * Mark motion: Jump to previous position ('') */ export declare function motionJumpToPrevious(context: MotionContext): MotionResult; /** * All motion commands registry */ export declare const MOTION_COMMANDS: MotionCommand[]; /** * Motion Engine for processing vim motions */ export declare class MotionEngine { private motions; private pendingKeys; private context; private userTier; constructor(context: MotionContext, userTier?: Tier); /** * Register all motion commands */ private registerMotions; /** * Update context */ updateContext(context: Partial): void; /** * Update user tier */ updateTier(tier: Tier): void; /** * Check if a motion is available for the current tier */ isMotionAvailable(motionId: string): boolean; /** * Process a key event */ processKey(event: VimKeyEvent): { consumed: boolean; result?: MotionResult; motion?: MotionCommand; }; /** * Get motion by ID */ getMotion(id: string): MotionCommand | undefined; /** * Get all motions for a tier */ getAvailableMotions(): MotionCommand[]; /** * Execute a motion by ID */ executeMotion(id: string, count?: number): MotionResult | null; /** * Reset pending keys */ reset(): void; /** * Get pending key sequence */ getPending(): string; } /** * Create a motion engine instance */ export declare function createMotionEngine(context: MotionContext, userTier?: Tier): MotionEngine; //# sourceMappingURL=vim-motions.d.ts.map