dotfiles

config files and scripts
git clone git://git.hanetzok.net/dotfiles
Log | Files | Refs

.zshrc (2021B)


      1 source "$HOME/.config/zsh/aliases"
      2 source "$HOME/.config/zsh/dracula-tty.sh"
      3 
      4 # Enable colors and change prompt:
      5 autoload -U colors && colors	# Load colors
      6 PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
      7 stty stop undef		# Disable ctrl-s to freeze terminal.
      8 setopt interactive_comments
      9 
     10 # History in cache directory:
     11 HISTSIZE=10000000
     12 SAVEHIST=10000000
     13 HISTFILE="$HOME/.cache/zsh/history"
     14 setopt inc_append_history
     15 
     16 # Basic auto/tab complete:
     17 autoload -U compinit
     18 zstyle ':completion:*' menu select
     19 zmodload zsh/complist
     20 compinit
     21 _comp_options+=(globdots)		# Include hidden files.
     22 
     23 # vi mode
     24 bindkey -v
     25 export KEYTIMEOUT=1
     26 
     27 # Use vim keys in tab complete menu:
     28 bindkey -M menuselect 'h' vi-backward-char
     29 bindkey -M menuselect 'k' vi-up-line-or-history
     30 bindkey -M menuselect 'l' vi-forward-char
     31 bindkey -M menuselect 'j' vi-down-line-or-history
     32 bindkey -v '^?' backward-delete-char
     33 
     34 # Change cursor shape for different vi modes.
     35 function zle-keymap-select () {
     36     case $KEYMAP in
     37         vicmd) echo -ne '\e[1 q';;      # block
     38         viins|main) echo -ne '\e[5 q';; # beam
     39     esac
     40 }
     41 zle -N zle-keymap-select
     42 zle-line-init() {
     43     zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere)
     44     echo -ne "\e[5 q"
     45 }
     46 zle -N zle-line-init
     47 echo -ne '\e[5 q' # Use beam shape cursor on startup.
     48 preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt.
     49 
     50 # Edit line in vim with ctrl-e:
     51 autoload edit-command-line; zle -N edit-command-line
     52 bindkey '^e' edit-command-line
     53 bindkey -M vicmd '^[[P' vi-delete-char
     54 bindkey -M vicmd '^e' edit-command-line
     55 bindkey -M visual '^[[P' vi-delete
     56 
     57 # Load syntax highlighting; should be last.
     58 #source "$HOME/.config/zsh/highlighting-dracula.sh"
     59 #source "$HOME/.config/zsh/highlighting-gruvbox-light.sh"
     60 source "$HOME/.config/zsh/highlighting-gruvbox-dark.sh"
     61 source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null