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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions atuin/src/command/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ impl Cmd {

if std::env::var("ATUIN_NOBIND").is_err() {
const BIND_CTRL_R: &str = r"bindkey -M emacs '^r' _atuin_search_widget
bindkey -M vicmd '^r' _atuin_search_vicmd_widget
bindkey -M viins '^r' _atuin_search_viins_widget";
bindkey -M viins '^r' _atuin_search_viins_widget
bindkey -M vicmd '/' _atuin_search_widget";

const BIND_UP_ARROW: &str = r"bindkey -M emacs '^[[A' _atuin_up_search_widget
bindkey -M vicmd '^[[A' _atuin_up_search_vicmd_widget
Expand Down
1 change: 1 addition & 0 deletions atuin/src/shell/atuin.bash
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ if [[ $__atuin_bind_ctrl_r == true ]]; then
# the vi_nmap keymap in ble.sh.
bind -m emacs -x '"\C-r": __atuin_history --keymap-mode=emacs'
bind -m vi-insert -x '"\C-r": __atuin_history --keymap-mode=vim-insert'
bind -m vi-command -x '"/": __atuin_history --keymap-mode=emacs'
fi

# shellcheck disable=SC2154
Expand Down