Add option to use emacs keymaps in prompt window - #147
Merged
Merged
Conversation
mmrwoods
force-pushed
the
emacs_keys
branch
from
September 19, 2026 07:54
97188be to
8ee5ff0
Compare
Fuzzbox normally follows Vim cmdline editing keymaps, but if you prefer the Emacs style keymaps that are the default in Readline and probably the default in your shell, you can now set g:fuzzbox_emacs_keys to true
Map CTRL-K to delete from cursor to end of line in prompt when Emacs keys are enabled and replace previous CTRL-K mappings in FuzzyMru and FuzzyHighlights with CTRL-Y. Why CTRL-Y? Honestly, mostly because I'm used to it from vim-unimpaired, where it is used because "if you tilt it a bit it looks like a switch". But, also because it doesn't make sense to apply Vim's CTRL-Y scroll up behaviour in Fuzzbox as its opposite in Vim to scroll down is CTRL-E, and CTRL-E is already used to moves the cursor to the end of the line, same as Vim's cmdline editing or Readline's Emacs mode in a shell.
Update FuzzyHighlights and FuzzyMru to continue to support CTRL-K toggle mapping when emacs editing mode has not been enabled, but show a warning
mmrwoods
force-pushed
the
emacs_keys
branch
from
September 19, 2026 11:15
b9b2d8f to
c4ff3ea
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fuzzbox normally follows Vim cmdline editing keymaps, but if you prefer the Emacs style keymaps that are the default in Readline and probably the default in your shell, you can now set
g:fuzzbox_emacs_keysto true.Related to #145