Feat: update zsh config
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
zsh-users/zsh-syntax-highlighting
|
||||
zsh-users/zsh-autosuggestions
|
||||
zsh-users/zsh-history-substring-search
|
||||
desyncr/auto-ls
|
||||
andrewferrier/fzf-z
|
||||
|
||||
https://github.com/denysdovhan/spaceship-prompt spaceship
|
||||
|
||||
|
||||
|
||||
17
files/dotfiles/zshenv
Normal file
17
files/dotfiles/zshenv
Normal file
@@ -0,0 +1,17 @@
|
||||
export TERM='rxvt-256color'
|
||||
|
||||
# XDG
|
||||
export XDG_CONFIG_HOME=$HOME/.config
|
||||
|
||||
# editor
|
||||
export EDITOR="nvim"
|
||||
export VISUAL="nvim"
|
||||
|
||||
|
||||
# zsh
|
||||
export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
|
||||
export HISTFILE="$ZDOTDIR/.zhistory" # History filepath
|
||||
export HISTSIZE=10000 # Maximum events for internal history
|
||||
export SAVEHIST=10000 # Maximum events in history file
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
# Lines configured by zsh-newuser-install
|
||||
HISTFILE=~/.zsh_history
|
||||
HISTSIZE=1000
|
||||
SAVEHIST=1000
|
||||
setopt appendhistory nomatch
|
||||
# End of lines configured by zsh-newuser-install
|
||||
# The following lines were added by compinstall
|
||||
zstyle :compinstall filename '/home/lafrite/.zshrc'
|
||||
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
# End of lines added by compinstall
|
||||
|
||||
# Autocompletion insensitive to case
|
||||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
|
||||
|
||||
export ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=245"
|
||||
# automatic color scheme with pywall
|
||||
|
||||
# Vim keybindings
|
||||
bindkey -v
|
||||
|
||||
# substring search
|
||||
bindkey '^[[A' history-substring-search-up
|
||||
bindkey '^[[B' history-substring-search-down
|
||||
|
||||
bindkey -M vicmd 'k' history-substring-search-up
|
||||
bindkey -M vicmd 'j' history-substring-search-down
|
||||
|
||||
# fzf
|
||||
source /usr/share/fzf/key-bindings.zsh
|
||||
source /usr/share/fzf/completion.zsh
|
||||
|
||||
# fzf-z
|
||||
export FZFZ_EXTRA_DIRS="/media/documents/"
|
||||
|
||||
# Alias
|
||||
alias notes="vim -c Note"
|
||||
# taskwarrior alias
|
||||
alias in="task add +in"
|
||||
|
||||
export EDITOR="vim"
|
||||
|
||||
# auto_ls pluting
|
||||
export AUTO_LS_COMMANDS=(ls git-status)
|
||||
Reference in New Issue
Block a user