+/config
my dotfiles and nix configuration
git clone https://git.julia.blue/+/config
4a85823
main
1# good resource for when you forget how all this works again: 2# https://sgeb.io/posts/zsh-zle-custom-widgets 3 4bindkey -e 5_zle_load () {autoload -U $1 &&zle -N $1; } 6_zle_load up-line-or-beginning-search 7_zle_load down-line-or-beginning-search 8bindkey ${terminfo[kcuu1]} up-line-or-beginning-search # up 9bindkey ${terminfo[kcud1]} down-line-or-beginning-search # down 10bindkey '^J' up-line-or-beginning-search 11bindkey '^K' up-line-or-beginning-search 12bindkey '^L' emacs-forward-word 13_zle_load edit-command-line 14bindkey '^E' edit-command-line 15bindkey '^Z' end-of-line 16bindkey '\e[3~' delete-char # del 17bindkey '\e[3;5~' kill-word # ctrl+del 18bindkey '^H' backward-kill-word # ctrl+backspace 19bindkey '\e[1;5D' backward-word # ctrl+left 20bindkey '\e[1;5C' emacs-forward-word # ctrl+right 21bindkey ${terminfo[khome]} beginning-of-line # home 22bindkey ${terminfo[kend]} end-of-line # end 23bindkey '\e[Z' reverse-menu-complete # shift+tab 24_zle_load copy-earlier-word 25bindkey '^[.' copy-earlier-word 26 27SHIFT_WORDCHARS =WORDCHARS # *?_-.[]~=/&;!#$%^(){}<> 28WORDCHARS ='_.$<>' 29backward-kill-blank-word ()WORDCHARS ='' zle .backward-kill-word 30forward-small-word ()WORDCHARS =$SHIFT_WORDCHARSzle .forward-word 31backward-small-word ()WORDCHARS =$SHIFT_WORDCHARSzle .backward-word 32 33_zle_bind () {bindkey $1 $2 &&zle -N $2; } 34_zle_bind '\e^?' backward-kill-blank-word # alt+esc 35bindkey '\e[1;3D' vi-backward-blank-word # alt+left 36bindkey '\e[1;3C' vi-forward-blank-word # alt+right 37_zle_bind '\e[1;2D' backward-small-word # shift+left 38_zle_bind '\e[1;2C' forward-small-word # shift+right