Feat: update zsh config
This commit is contained in:
@@ -1,5 +1,61 @@
|
||||
# Created by newuser for 5.5.1
|
||||
source <(antibody init)
|
||||
antibody bundle < ~/.zsh_plugins.txt
|
||||
PATH="$PATH:$(ruby -e 'print Gem.user_dir')/bin:$(yarn config get prefix)/bin"
|
||||
source ~/.zshrc.local
|
||||
fpath+=$ZDOTDIR/pure
|
||||
|
||||
autoload -U compinit
|
||||
zstyle ':completion:*' menu select
|
||||
zmodload zsh/complist
|
||||
compinit
|
||||
_comp_options+=(globdots) # Include hidden files.
|
||||
|
||||
# Prompt theme
|
||||
# git clone https://github.com/sindresorhus/pure ~/.config/zsh/
|
||||
autoload -U promptinit; promptinit
|
||||
prompt pure
|
||||
|
||||
# Cursor for vimode
|
||||
# ZLE hooks for prompt's vi mode status
|
||||
function zle-line-init zle-keymap-select {
|
||||
# Change the cursor style depending on keymap mode.
|
||||
case $KEYMAP {
|
||||
vicmd)
|
||||
printf '\e[0 q' # Box.
|
||||
;;
|
||||
|
||||
viins|main)
|
||||
printf '\e[6 q' # Vertical bar.
|
||||
;;
|
||||
}
|
||||
}
|
||||
zle -N zle-line-init
|
||||
zle -N zle-keymap-select
|
||||
|
||||
# Switch between vimode quickly
|
||||
export KEYTIMEOUT=1
|
||||
|
||||
# Alias
|
||||
## Colors
|
||||
alias ls='ls --color'
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
## Prompt when over right
|
||||
alias cp='cp -iv'
|
||||
alias mv='mv -iv'
|
||||
alias rm='rm -i'
|
||||
|
||||
|
||||
# Autosuggestions
|
||||
# git clone https://github.com/zsh-users/zsh-autosuggestions ~/.config/zsh/
|
||||
source ~/.config/zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
ZSH_AUTOSUGGEST_STRATEGY=(history completion)
|
||||
|
||||
# Syntax Highlight
|
||||
# git clone https://github.com/zsh-users/zsh-syntax-highlighting ~/.config/zsh/
|
||||
source ~/.config/zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
|
||||
# Auto-ls
|
||||
source ~/.config/zsh/auto-ls/auto-ls.zsh
|
||||
|
||||
|
||||
source /usr/share/fzf/key-bindings.zsh
|
||||
source /usr/share/fzf/completion.zsh
|
||||
|
||||
|
||||
Reference in New Issue
Block a user