Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more readline bindings #9

Merged
merged 1 commit into from
Mar 14, 2022
Merged

Conversation

jmbaur
Copy link
Contributor

@jmbaur jmbaur commented Mar 14, 2022

These changes add more readline keybindings to zf. They are definitely all about opinion, so if adding these keybindings does not align with this project, let me know and I can close this PR. Thanks!

@natecraddock
Copy link
Owner

natecraddock commented Mar 14, 2022

Thanks for taking the time to add these! Other than the ctrl-k binding, I have no issue with this PR. I know some people prefer the more vim-like ctrl-j ctrl-k bindings for moving the selected line. I added those bindings upon request from someone else.

I'm not against an option (likely an environment variable #7) to configure this, but I'm curious on what you think about adding all of your proposed bindings except ctrl-k.

Also, just checking fzf and fzy, both use ctrl-k for moving the selected line, so this would also be more conventional.

@jmbaur
Copy link
Contributor Author

jmbaur commented Mar 14, 2022

I am definitely okay with removing the ctrl-k binding. I think adding in the binding with an environment variable would be a nice addition in the future.

@natecraddock
Copy link
Owner

I will get this merged soon, and I have added a task for an environment variable in #7. Thanks again!

Adds new readline bindings for moving the cursor and deleting
characters. ctrl-k is not included due to being used for moving
selection down with vi-like keybinds, and is conventional (used in fzf
and fzy). A future feature should add an environment variable to control
emacs/vi bindings.
@natecraddock natecraddock merged commit 9c7a784 into natecraddock:master Mar 14, 2022
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.

2 participants