From ff6510d9785cf8cc0aba361b7074cdb883c8d78a Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Sun, 2 Mar 2025 10:43:57 +0100 Subject: [PATCH] Update dotfiles --- dotfiles/.config/shell/aliasrc | 1 + dotfiles/.config/shell/inputrc | 5 --- dotfiles/.config/zsh/.zshrc | 71 ++++++++++------------------------ 3 files changed, 22 insertions(+), 55 deletions(-) diff --git a/dotfiles/.config/shell/aliasrc b/dotfiles/.config/shell/aliasrc index 319d858..96db826 100644 --- a/dotfiles/.config/shell/aliasrc +++ b/dotfiles/.config/shell/aliasrc @@ -6,6 +6,7 @@ alias mpvgui='mpv --player-operation-mode=pseudo-gui' alias wget='wget --hsts-file="$XDG_DATA_HOME/wget-hsts"' alias adb='HOME="$XDG_DATA_HOME"/android adb' alias nvidia-settings='nvidia-settings --config="$XDG_CONFIG_HOME"/nvidia/settings' +alias cdotfis='cd ~/Documents/cdotfis' alias ll='ls -l' la='ls -al' l='ls -CF' lh='ls -lh' alias ls="ls -hN --color=auto --group-directories-first" diff --git a/dotfiles/.config/shell/inputrc b/dotfiles/.config/shell/inputrc index b5ecd5e..b09ae81 100644 --- a/dotfiles/.config/shell/inputrc +++ b/dotfiles/.config/shell/inputrc @@ -17,8 +17,3 @@ Control-l: clear-screen Control-a: beginning-of-line $endif - -set completion-ignore-case on - -"\e[A":history-search-backward -"\e[B":history-search-forward diff --git a/dotfiles/.config/zsh/.zshrc b/dotfiles/.config/zsh/.zshrc index 42851bf..7ca2313 100644 --- a/dotfiles/.config/zsh/.zshrc +++ b/dotfiles/.config/zsh/.zshrc @@ -3,12 +3,12 @@ if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" ]; then fi ZLE_REMOVE_SUFFIX_CHARS=$' \t\n;&' - ZSH_COMPDUMP="$XDG_CACHE_HOME"/zsh/zcompdump-"$HOST-$ZSH_VERSION" zmodload zsh/complist autoload -U compinit && compinit -d $ZSH_COMPDUMP autoload -U colors && colors +autoload -U edit-command-line zstyle ':completion:*' menu select zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} ma=0\;33 @@ -27,6 +27,20 @@ setopt no_case_glob no_case_match setopt interactive_comments bindkey -v +bindkey -M menuselect 'h' vi-backward-char +bindkey -M menuselect 'k' vi-up-line-or-history +bindkey -M menuselect 'j' vi-down-line-or-history +bindkey -M menuselect 'l' vi-forward-char +bindkey '^E' edit-command-line +bindkey -M vicmd '^e' edit-command-line +bindkey -M vicmd '^[[P' vi-delete-char +bindkey -M visual '^[[P' vi-delete +bindkey "^H" backward-delete-char +bindkey "^?" backward-delete-char +bindkey "^R" history-incremental-search-backward +bindkey "^[[A" history-search-backward +bindkey "^[[B" history-search-forward +bindkey '^[[P' delete-char zle-keymap-select () { case $KEYMAP in @@ -35,59 +49,16 @@ zle-keymap-select () { esac } -zle -N zle-keymap-select +zle-line-init() { zle -K viins; echo -ne "\e[5 q" } -zle-line-init() { - zle -K viins - echo -ne "\e[5 q" +zle-line-finish () { echoti rmkx } -} +bracketed-paste() { zle .$WIDGET && LBUFFER=${LBUFFER%$'\n'} } -zle -N zle-line-init - -echo -ne '\e[5 q' -preexec() { echo -ne '\e[5 q' ;} - -bindkey -M menuselect 'h' vi-backward-char -bindkey -M menuselect 'k' vi-up-line-or-history -bindkey -M menuselect 'j' vi-down-line-or-history -bindkey -M menuselect 'l' vi-forward-char - -autoload -U edit-command-line zle -N edit-command-line -bindkey '^E' edit-command-line -bindkey -M vicmd '^e' edit-command-line -bindkey -M vicmd '^[[P' vi-delete-char -bindkey -M visual '^[[P' vi-delete - -bindkey "^H" backward-delete-char -bindkey "^?" backward-delete-char - -bindkey "^R" history-incremental-search-backward - -#autoload -U history-search-end -#zle -N history-beginning-search-backward-end history-search-end -#zle -N history-beginning-search-forward-end history-search-end -#bindkey "^[[A" history-beginning-search-backward-end -#bindkey "^[[B" history-beginning-search-forward-end - -bindkey "^[[A" history-search-backward -bindkey "^[[B" history-search-forward - -bindkey '^[[P' delete-char - -# bindkey "^[[3~" delete-char - -#function zle-line-finish () { echoti rmkx } -#zle -N zle-line-finish - -#bindkey -s '^f' 'cd "$(dirname "$(fzf)")"\n' -#bindkey -s '^o' 'xdg-open "$(fzf)"\n' - -bracketed-paste() { - zle .$WIDGET && LBUFFER=${LBUFFER%$'\n'} -} - +zle -N zle-keymap-select +zle -N zle-line-init +zle -N zle-line-finish zle -N bracketed-paste eval "$(starship init zsh)"