diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-02-27 17:33:46 +0100 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-02-27 17:33:46 +0100 |
commit | 2102e1ed005293b73e105729cc404ee6557a0508 (patch) | |
tree | ac2ac74f830eebe57d20d4169108c74fa14eb168 | |
parent | 623951fb948261c0dbe1f5b3881596bb509534b6 (diff) |
[zsh] added surround_in_var in widgets.zsh
-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 + |