summaryrefslogtreecommitdiff
path: root/config/essentials/zsh/widgets.zsh
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2024-02-29 14:26:50 +0100
committerRaymaekers Luca <raymaekers.luca@gmail.com>2024-02-29 14:26:50 +0100
commitc16799693cb6d780f258833689a6d312506093bb (patch)
treef11e3ba72e632269160275f1c3c36d170fb81a62 /config/essentials/zsh/widgets.zsh
parentda998b5c857aef8903bf791b4e41966cf230562c (diff)
parent8ab76a9ebf8414c720f13bd0aaaa2e6452ff753b (diff)
Merge branch 'main' of debuc.com:dotfiles
Diffstat (limited to 'config/essentials/zsh/widgets.zsh')
-rw-r--r--config/essentials/zsh/widgets.zsh9
1 files changed, 9 insertions, 0 deletions
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
+