summaryrefslogtreecommitdiff
path: root/zsh/zshrc
diff options
context:
space:
mode:
authorZachIR <zachir@librem.one>2025-01-21 19:16:39 -0600
committerZachIR <zachir@librem.one>2025-01-21 19:16:39 -0600
commitfc56f96513d5e7ee9d852ea3826f97f5c17fff11 (patch)
tree706a4444ea3367c54f247b36fd71b7605ff0e5d9 /zsh/zshrc
parent1dffd69b8e9e4feac511a2d43a969a5c554fea5e (diff)
parentc654a8e82f10440551c2fec536c116000b7a6fe6 (diff)
Merge branch 'master' into car
Diffstat (limited to 'zsh/zshrc')
-rw-r--r--zsh/zshrc21
1 files changed, 15 insertions, 6 deletions
diff --git a/zsh/zshrc b/zsh/zshrc
index fb5b167..0d6ecd5 100644
--- a/zsh/zshrc
+++ b/zsh/zshrc
@@ -33,11 +33,20 @@ elif [ -f "$HOME"/.zshrc ]; then
alias e='source ~/.zshrc'
fi
+source ~/.zkbd/$TERM-${${DISPLAY:t}:-$VENDOR-$OSTYPE}
+
+#autoload zkbd; zkbd
bindkey -v
+bindkey "${key[Backspace]}" backward-delete-char
+bindkey "${key[Delete]}" delete-char
+bindkey "${key[Home]}" beginning-of-line
+bindkey "${key[End]}" end-of-line
+bindkey "${key[PageUp]}" history-substring-search-up
+bindkey "${key[PageDown]}" history-substring-search-down
-MYPROMPT=$'%B%S%F{002}[%n@%m]%s\UE0B0%F{015}%~%S%F{002}\UE0B0%#%s\UE0B0%f%k%b '
+MYPROMPT=$'%B%S%F{002}[%n@%m]\UE0B2%F{015}%s%~%S%F{002}\UE0B0%#%s\UE0B0%f%k%b '
function zle-line-init zle-keymap-select {
- VIM_PROMPT=$'%B%S%F{012}[%n@%m]%s\UE0B0%F{015}%~%S%F{012}\UE0B0%#%s\UE0B0%f%k%b '
+ VIM_PROMPT=$'%B%S%F{012}[%n@%m]\UE0B2%F{015}%s%~%S%F{012}\UE0B0%#%s\UE0B0%f%k%b '
PS1="${${KEYMAP/vicmd/$VIM_PROMPT}/main/$MYPROMPT}"
zle reset-prompt
}
@@ -52,10 +61,10 @@ if [ -n "$ZPLUG_INSTALLED" ]; then
# zsh history substring search
zplug "zsh-users/zsh-history-substring-search", as:plugin
- bindkey '^[[A' history-substring-search-up
- bindkey '^[[B' history-substring-search-down
- bindkey -M vicmd '^[[A' history-substring-search-up
- bindkey -M vicmd '^[[B' history-substring-search-down
+ bindkey '${key[Up]}' history-substring-search-up
+ bindkey '${key[Down]}' history-substring-search-down
+ bindkey -M vicmd '${key[Up]}' history-substring-search-up
+ bindkey -M vicmd '${key[Down]}' history-substring-search-down
bindkey -M vicmd 'k' history-substring-search-up
bindkey -M vicmd 'j' history-substring-search-down