Skip to content

Add Emacs-like keybindings as a preset configuration#1106

Open
noborus wants to merge 2 commits into
masterfrom
emacs-keybinds
Open

Add Emacs-like keybindings as a preset configuration#1106
noborus wants to merge 2 commits into
masterfrom
emacs-keybinds

Conversation

@noborus

@noborus noborus commented Jun 19, 2026

Copy link
Copy Markdown
Owner
  • Add EmacsKeyBinds function that returns a KeyBind with Emacs-like keybindings.
  • Update GetKeyBinds to include the "emacs" preset.
  • Update renderConfigTemplate to include the "emacs" preset.
  • Update the help test to include a test case for EmacsKeyBinds.

- Add EmacsKeyBinds function that returns a KeyBind with Emacs-like keybindings.
- Update GetKeyBinds to include the "emacs" preset.
- Update renderConfigTemplate to include the "emacs" preset.
- Update the help test to include a test case for EmacsKeyBinds.
@noborus

noborus commented Jun 19, 2026

Copy link
Copy Markdown
Owner Author

This pull request will be closed and not merged if it does not receive comments from multiple people who will actually use it.

Try this branch.

git fetch
git switch emacs-keybinds
make
make test 
./ov --generate-config=emacs > ov-emacs.yaml
./ov --config ov-emacs.yaml README.md

If you change a key, you can test for duplicates using make test or the following command:

go test ./oviewer -v -run 'TestDuplicateKeyBind'

Some terminals and tcell keyboard protocol modes can report < and > differently
(e.g. as alt+shift+, / alt+shift+. or as alt+< / alt+>).

To make Emacs-style navigation consistent across terminal/protocol combinations,
define both representations for move-top and move-bottom keybindings.
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.

1 participant