From 072e00a84278c26afdb52c12d06bcd5a99cc8bed Mon Sep 17 00:00:00 2001 From: Vitor Rocha Date: Tue, 1 Mar 2016 11:20:24 -0300 Subject: [PATCH] Added plugin to delete a word forward like Alt+Backspace Reverse --- plugins/reverse-word-delete/reverse-word-delete.plugin.zsh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 plugins/reverse-word-delete/reverse-word-delete.plugin.zsh diff --git a/plugins/reverse-word-delete/reverse-word-delete.plugin.zsh b/plugins/reverse-word-delete/reverse-word-delete.plugin.zsh new file mode 100644 index 00000000..3600d613 --- /dev/null +++ b/plugins/reverse-word-delete/reverse-word-delete.plugin.zsh @@ -0,0 +1,7 @@ +reverse-word-delete() { + RBUFFER=$(echo "$RBUFFER" | sed -e "s/^\W*\w*//") +} + +zle -N reverse-word-delete +# Defined shortcut keys: [Esc] [Esc] +bindkey '3~' reverse-word-delete