1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00

Compare commits

..

No commits in common. "895d0ff0aa1caa207564155a76b2defcca709089" and "a41314ca343e60f8ba0faff92fd89f7035c29d43" have entirely different histories.

3 changed files with 10 additions and 24 deletions

View File

@ -89,16 +89,13 @@ bindkey "^[[7~" beginning-of-line
bindkey "^[[8~" end-of-line
bindkey "^[[3~" delete-char
bindkey "^[[3;3~" delete-word
bindkey '^[[A' fzf-history-widget # Up (fzf)
bindkey '^[[B' fzf-history-widget # Down (fzf)
bindkey '^F' fzf-file-widget # Ctrl+F file search (fzf)
bindkey "^F" fzf-file-widget # Ctrl+F file search (fzf)
bindkey "^[[A" fzf-history-widget # Up (fzf)
bindkey "^[[B" fzf-history-widget # Down (fzf)
bindkey "${terminfo[kcuu1]}" fzf-history-widget # Up (fzf)
bindkey "${terminfo[kcud1]}" fzf-history-widget # Down (fzf)
# Backspace across newlines when in vi-mode
bindkey -v '^?' backward-delete-char
bindkey "^F" fzf-file-widget
bindkey -M vicmd "^W" backward-delete-word
bindkey -M vicmd d vi-backward-char
bindkey -M vicmd h vi-down-line-or-history
bindkey -M vicmd t vi-up-line-or-history
@ -108,6 +105,9 @@ bindkey -M vicmd K vi-kill-eol
bindkey -M vicmd j vi-find-next-char-skip
bindkey -M vicmd l vi-repeat-search
# Backspace across newlines when in vi-mode
bindkey -v '^?' backward-delete-char
ZSH_AUTOSUGGEST_USE_ASYNC=true
ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=128
ZSH_AUTOSUGGEST_CLEAR_WIDGETS=("${(@)ZSH_AUTOSUGGEST_CLEAR_WIDGETS:#(up|down)-line-or-history}")

View File

@ -4,16 +4,6 @@ _fishy_collapsed_wd() {
pwd | sed -E 's|^'$HOME'|~|;s|(.*)/|\1%|;s|((^\|/)\.?[^/%]{1})[^/%]*|\1|g;s|(.*)%|\1/|'
}
function zle-line-init zle-keymap-select {
case $KEYMAP in
vicmd) printf '\e[3 q';; # block cursor
*) printf '\e[2 q';; # less visible cursor
esac
zle reset-prompt
}
zle -N zle-line-init
zle -N zle-keymap-select
# Required for dynamic prompt
setopt prompt_subst
@ -21,8 +11,4 @@ local user_color='green'; [ $UID -eq 0 ] && user_color='red'
PROMPT="%n@%m %F{$user_color}\$(_fishy_collapsed_wd)%f%(!.#.>) "
PROMPT2='%F{red}\ %f'
RPROMPT='%F{cyan}${${KEYMAP/vicmd/ normal}/(main|viins)/}%f%(?.. %F{red}%?%f)'
# Disable trailing space
# https://superuser.com/questions/655607/removing-the-useless-space-at-the-end-of-the-right-prompt-of-zsh-rprompt
ZLE_RPROMPT_INDENT=0
RPROMPT='%F{red}%(?.. %?)%f'