diff options
-rw-r--r-- | config/essentials/zsh/.zshrc | 1 | ||||
-rw-r--r-- | config/essentials/zsh/widgets.zsh | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 02d0ddf..b9c1173 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -23,6 +23,7 @@ zle -N change-surround surround . $XDG_CONFIG_HOME/shell/functions.sh . $XDG_CONFIG_HOME/shell/aliases.sh . $XDG_CONFIG_HOME/zsh/comp.zsh +. $XDG_CONFIG_HOME/zsh/widgets.zsh # . $XDG_CONFIG_HOME/zsh/prompt.zsh # . $XDG_CONFIG_HOME/zsh/plugins.zsh diff --git a/config/essentials/zsh/widgets.zsh b/config/essentials/zsh/widgets.zsh new file mode 100644 index 0000000..e0cbf98 --- /dev/null +++ b/config/essentials/zsh/widgets.zsh @@ -0,0 +1,9 @@ +# surround line in variable +surround_in_var() +{ + BUFFER=" \$($BUFFER)" + zle beginning-of-line +} +zle -N surround_in_var +bindkey '\ev' surround_in_var + |