summaryrefslogtreecommitdiff
path: root/config/essentials/zsh
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2024-04-16 10:09:29 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2024-04-16 10:09:29 +0200
commit692bc52c20da866630fa401be6740bc38f8f8574 (patch)
treebe52e621dbbb15bfd2f43ec92053e4b0a817c392 /config/essentials/zsh
parent197a1a74f468d9d69d624b19f90280a3946455e5 (diff)
parent19ea61db733c9152f2b334b0ae9871f81ac3664d (diff)
Merge branch 'main' of debuc.com:dotfiles
Diffstat (limited to 'config/essentials/zsh')
-rw-r--r--config/essentials/zsh/.zshrc12
-rw-r--r--config/essentials/zsh/widgets.zsh11
2 files changed, 13 insertions, 10 deletions
diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc
index b7128b9..c9bf8b1 100644
--- a/config/essentials/zsh/.zshrc
+++ b/config/essentials/zsh/.zshrc
@@ -16,10 +16,6 @@ fi
autoload -U select-word-style
autoload -z edit-command-line
zle -N edit-command-line
-autoload -Uz surround
-zle -N delete-surround surround
-zle -N add-surround surround
-zle -N change-surround surround
### Source files
. $XDG_CONFIG_HOME/zsh/comp.zsh
@@ -49,8 +45,8 @@ plug "zsh-users/zsh-history-substring-search"
plug "MichaelAquilina/zsh-auto-notify"
export AUTO_NOTIFY_TITLE="zsh"
-export AUTO_NOTIFY_BODY="<b>%command</b> [%exit_code]"
-AUTO_NOTIFY_IGNORE+=("gurk" "ttyper" "pulsemixer" "tmux" "btop")
+export AUTO_NOTIFY_BODY="%command [%exit_code]"
+AUTO_NOTIFY_IGNORE+=("gurk" "ttyper" "pulsemixer" "tmux" "btop" "vis")
# Substring search settings
export HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND="bg=blue,fg=black,bold"
@@ -86,9 +82,6 @@ fi
### Keybinds
bindkey -v
-bindkey -a cs change-surround
-bindkey -a ds delete-surround
-bindkey -a ys add-surround
bindkey -M visual S add-surround
bindkey "^A" beginning-of-line
bindkey "^E" end-of-line
@@ -103,6 +96,7 @@ bindkey "^Xe" edit-command-line
bindkey "^[." insert-last-word
bindkey "^['" quote-line
bindkey '\ea' autosuggest-toggle
+bindkey '^Xp' push-input
## Move around using h j k l in completion menu
zmodload zsh/complist
bindkey -M menuselect 'h' vi-backward-char
diff --git a/config/essentials/zsh/widgets.zsh b/config/essentials/zsh/widgets.zsh
index c8b24f7..233ea65 100644
--- a/config/essentials/zsh/widgets.zsh
+++ b/config/essentials/zsh/widgets.zsh
@@ -1,4 +1,4 @@
-# surround line in variable
+# Surround line in variable
surround_in_var()
{
BUFFER=" \"\$($BUFFER)\""
@@ -7,3 +7,12 @@ surround_in_var()
zle -N surround_in_var
bindkey '\ev' surround_in_var
+# Insert output from the previous command
+zmodload -i zsh/parameter
+insert-last-command-output() {
+ LBUFFER+="$(eval $history[$((HISTCMD-1))])"
+}
+zle -N insert-last-command-output
+bindkey "^Xl" insert-last-command-output
+
+#