Skip to content

feat(keybind): complete emacs keybinding coverage #596

Description

@wowi42

The emacs keybind namespace covers basic movement and editing, but many standard GNU Emacs defaults are missing.

Wrong binding

Key Emacs expects Current
C-r isearch-backward find_file

Missing bindings (command exists)

Key Emacs command Flow command
C-l recenter-top-bottom scroll_view_center_cycle
M-w kill-ring-save copy
M-; comment-dwim toggle_comment
M-^ delete-indentation join_next_line
M-{ backward-paragraph move_par_begin
M-} forward-paragraph move_par_end
M-h mark-paragraph select_par
M-g M-g goto-line goto_line
C-x C-w write-file save_file_as
C-x u undo undo
C-x 0 delete-window close_split
C-x 1 delete-other-windows -
C-x 2 split-window-below add_split
C-x 3 split-window-right add_split
C-x o other-window focus_split
C-x left previous-buffer previous_tab
C-x right next-buffer next_tab
C-x C-x exchange-point-and-mark selections_reverse
C-x C-u upcase-region to_upper
C-x C-l downcase-region to_lower

Missing commands (need implementation)

Key Emacs command Description
C-t transpose-chars Swap characters at point
M-t transpose-words Swap words at point
C-x C-t transpose-lines Swap lines
M-u upcase-word Uppercase word at point
M-l downcase-word Lowercase word at point
M-c capitalize-word Capitalize word at point
M-y yank-pop Cycle kill-ring
M-% query-replace Interactive replace
C-o open-line Insert newline without moving cursor
M-z zap-to-char Delete up to char
M-\\ delete-horizontal-space Remove spaces/tabs around point
M-SPC just-one-space Collapse whitespace to one space
C-M-f forward-sexp Forward over balanced expression
C-M-b backward-sexp Backward over balanced expression
C-M-k kill-sexp Delete balanced expression
C-M-a beginning-of-defun Start of current function
C-M-e end-of-defun End of current function

Questions

  • Which of the missing commands would be worth implementing? The transpose-* and sexp family likely need tree-sitter or similar support, but upcase-word, downcase-word, capitalize-word, open-line, yank-pop, and query-replace seem straightforward.
  • Should the wrong C-r binding and the "command exists" group be fixed first as low-hanging fruit?

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