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

feat(shell)!: bind the Atuin search to "/" in vi-normal mode #1629

Merged
merged 1 commit into from Jan 26, 2024

Conversation

akinomyoga
Copy link
Contributor

@akinomyoga akinomyoga commented Jan 26, 2024

This is a suggestion for the keybinding to / motivated by @Nemo157's comments #1553 (comment) and #1570 (comment).

Also, I suggest removing keybinding to C-r in the vicmd keymap of Zsh since it overwrites the existing widget (redo) which is not a search. Since this involves removal of a keybinding, I think we need to discuss it carefully.

See also the commit message.

A search feature in the vi-normal mode of shells can be called by "/".
To make the shell-integration keybindings consistent with the existing
shell keybindings, we add the keybinding to "/" in this patch.

This patch removes the Ctrl-r binding in the "vicmd" keymap in Zsh.
The key Ctrl-r is used for the `redo` operation in the vi-normal mode
by default.  We would like to avoid overwriting an existing keybinding
with a totally different feature.
@ellie
Copy link
Member

ellie commented Jan 26, 2024

Also, I suggest removing keybinding to C-r in the vicmd keymap of Zsh since it overwrites the existing widget (redo) which is not a search. Since this involves removal of a keybinding, I think we need to discuss it carefully.

I think this makes sense. I would expect that vim mapping users would understand this, and it's fairly straightforward to add the mapping back again should they wish.

@ellie ellie merged commit 2e48e21 into atuinsh:main Jan 26, 2024
8 checks passed
@akinomyoga akinomyoga deleted the shell-vicmd branch January 26, 2024 12:00
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.

None yet

2 participants