Skip to content

Document default Emacs and Vi keybindings - #1119

Closed
Semak12345 wants to merge 1 commit into
nushell:mainfrom
Semak12345:docs/default-keybindings
Closed

Semak12345 wants to merge 1 commit into
nushell:mainfrom
Semak12345:docs/default-keybindings

Conversation

@Semak12345

Copy link
Copy Markdown

Summary

Closes #350.

Adds a user-facing reference for the default Emacs and Vi keybindings, including movement, editing, selection, control, Vi motions, operators, and text objects. Links the new guide from the README outline.

Before

Users had to inspect the keybinding constructors and Vi parser to discover the defaults.

After

The defaults are collected in tables in KEYBINDINGS.md, with notes about terminal-specific and feature-gated bindings.

Additional notes

Documentation-only change. Validated with markdownlint-cli2 and git diff --check.

@kronberger-droid

kronberger-droid commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Nice, this one was on my mind for a long time, thanks for picking it up. @Semak12345
One structural request before we land this: could the shared bindings get their own section?

keybindings.rs has four shared sets.
Right now they're all filed under Emacs with Vi insert referring back in prose, which means:

  • the "Emacs-only ... such as" list is non-exhaustive, so you can't tell what
    Vi insert has
  • Ctrl-Shift-x/c/v are under Emacs → Selection, but they're in add_common_edit_bindings, so also in Vi insert, absent in Vi normal/visual
  • Vi normal lacking the common edit bindings is only implied by subtraction

A ## Common bindings section (one table per add_common_*) would move the
tables mostly verbatim.

kronberger-droid added a commit to kronberger-droid/reedline that referenced this pull request Aug 26, 2026
Structured around the four `add_common_*` sets rather than one table per
mode, since what separates the modes is which sets they compose and which
single keys they override. Filing the shared bindings under emacs instead
leaves vi insert described by subtraction.

Closes nushell#350. Supersedes nushell#1119, which predates helix.
@kronberger-droid

Copy link
Copy Markdown
Collaborator

Superseded by #1197

kronberger-droid added a commit to kronberger-droid/reedline that referenced this pull request Sep 8, 2026
Structured around the four `add_common_*` sets rather than one table per
mode, since what separates the modes is which sets they compose and which
single keys they override. Filing the shared bindings under emacs instead
leaves vi insert described by subtraction.

Every row was read back off the tables and the modal parsers rather than
off vim's and helix's own docs, so the descriptions are reedline's
behaviour where the two diverge: vi `I` is `MoveToLineStart`, not vim's
first non-blank; `Ctrl-d` deletes a grapheme unless the buffer is empty;
a counted helix `g` is dropped rather than acting as `gg`.

Closes nushell#350. Supersedes nushell#1119, which predates helix.
kronberger-droid added a commit that referenced this pull request Sep 11, 2026
Structured around the four `add_common_*` sets rather than one table per
mode, since what separates the modes is which sets they compose and which
single keys they override. Filing the shared bindings under emacs instead
leaves vi insert described by subtraction.

Every row was read back off the tables and the modal parsers rather than
off vim's and helix's own docs, so the descriptions are reedline's
behaviour where the two diverge: vi `I` is `MoveToLineStart`, not vim's
first non-blank; `Ctrl-d` deletes a grapheme unless the buffer is empty;
a counted helix `g` is dropped rather than acting as `gg`.

Closes #350. Supersedes #1119, which predates helix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Template table with the default keybindings and their actions

2 participants