From 0502e98cd5e55803856299299062c6e8577b210d Mon Sep 17 00:00:00 2001 From: Toby Vincent Date: Mon, 15 Nov 2021 19:16:31 -0600 Subject: fix: fixed bugs and menu completion --- zsh/keybindings.zsh | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'zsh/keybindings.zsh') diff --git a/zsh/keybindings.zsh b/zsh/keybindings.zsh index d210181..fe919fc 100644 --- a/zsh/keybindings.zsh +++ b/zsh/keybindings.zsh @@ -6,7 +6,7 @@ else clip=/dev/null fi -function r-delregion() { +r-delregion() { if ((REGION_ACTIVE)) then zle kill-region else @@ -16,30 +16,30 @@ function r-delregion() { fi } -function r-deselect() { +r-deselect() { ((REGION_ACTIVE = 0)) local widget_name=$1 shift zle $widget_name -- $@ } -function r-select() { +r-select() { ((REGION_ACTIVE)) || zle set-mark-command local widget_name=$1 shift zle $widget_name -- $@ } -function r-select-a() { +r-select-a() { r-deselect beginning-of-line r-select end-of-line } -function r-undo { +r-undo() { zle undo } -function r-copy() { +r-copy() { if ((REGION_ACTIVE)) then zle copy-region-as-kill printf "$CUTBUFFER" | $clip @@ -48,7 +48,7 @@ function r-copy() { fi } -function r-cut() { +r-cut() { if ((REGION_ACTIVE)) then zle kill-region else @@ -101,6 +101,8 @@ for key kcap seq mode widget ( bindkey ${terminfo[$kcap]-$seq} key-$key } +bindkey '^ ' autosuggest-accept +bindkey '^[[Z' reverse-menu-complete # register ctrl+c as interupt function ctrl_c_intr() { @@ -112,7 +114,6 @@ function ctrl_y_intr() { stty intr \^Y <$TTY >$TTY } - # make sure we can register hooks autoload -Uz add-zsh-hook || return -- cgit v1.2.3-70-g09d2