aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/zsh/keybindings.zsh
diff options
context:
space:
mode:
authorToby Vincent <tobyv13@gmail.com>2021-11-15 19:16:31 -0600
committerToby Vincent <tobyv13@gmail.com>2021-11-15 19:16:31 -0600
commit0502e98cd5e55803856299299062c6e8577b210d (patch)
treee09f3c90c8848d5a733b8df9b77a32dff4b1354b /zsh/keybindings.zsh
parent82ad6c1edfb9334eab1a3978e82040df15414fa7 (diff)
fix: fixed bugs and menu completion
Diffstat (limited to 'zsh/keybindings.zsh')
-rw-r--r--zsh/keybindings.zsh17
1 files changed, 9 insertions, 8 deletions
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