Skip to content

Add word, page, and line navigation for source editing #168

Description

@owainlewis

Add word, page, and line navigation for source editing

What are we building?

Movement is limited to characters and single lines. Add the navigation commands needed to reach code quickly with Emacs-style keys.

Why?

This removes a concrete obstacle to the local coding loop tracked in #160 while keeping Cortex small and predictable.

Done when

  • M-f and M-b move by Unicode-aware words; M-d and M-Backspace kill forward/backward words through the kill ring.
  • M-< and M-> move to buffer start/end, preserving grapheme boundaries.
  • C-v/PageDown and M-v/PageUp move by the current visible page with a small overlap and keep point visible.
  • goto-line accepts a positive one-based line number through M-x; invalid input leaves point unchanged with a clear message.
  • All commands appear in the registry and have focused keymap/view/app tests for empty files, EOF, Unicode, and long lines.

How to check

cargo test view::; cargo test keymap::; cargo test app::; cargo fmt --check; cargo clippy --all-targets -- -D warnings; cargo test. Navigate and kill/yank words in a Unicode fixture, jump to a line, page through it, and exit.

Agent notes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions