Skip to content

Vim-style line movements #138

@lenis2000

Description

@lenis2000

Add vim-style navigation chords and count prefixes to the diff view.

Motivation

Users coming from vim/less expect to type 5j to move 5 lines down, gg to jump to top, G to jump to bottom, and yy to yank. Currently only single-step j/k work; large jumps require holding the key or falling back to page-down.

Proposed bindings

Chord Action
<N>j / <N>k Move cursor N lines down / up
gg Jump to first line
G Jump to last line
yy Yank current diff line to clipboard

Digit keys 19 (and 0 after a nonzero digit) accumulate a count prefix; the next motion consumes it. A stray digit or unknown second key clears the pending prefix without side effects.

Notes

  • Backward-compatible: plain j/k unchanged when no prefix is active.
  • Help overlay gets a dedicated "Vim" section documenting the chords.
  • Pending prefix is shown in the status bar so the user can see state.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions