Moved the dotfiles into the home/ dir
This commit is contained in:
5
home/private_dot_config/zsh/alias.zsh
Normal file
5
home/private_dot_config/zsh/alias.zsh
Normal file
@ -0,0 +1,5 @@
|
||||
alias ls="ls --color --group-directories-first"
|
||||
alias l="ls -l --almost-all --human-readable"
|
||||
|
||||
alias vi="nvim"
|
||||
alias vim="nvim"
|
33
home/private_dot_config/zsh/dot_zshrc
Normal file
33
home/private_dot_config/zsh/dot_zshrc
Normal file
@ -0,0 +1,33 @@
|
||||
source "$ZDOTDIR/history.zsh"
|
||||
source "$ZDOTDIR/alias.zsh"
|
||||
source "$ZDOTDIR/plugins.zsh"
|
||||
|
||||
PS1="%F{38}[%n@%m %F{45}%B%~%b%f%F{38}]%f$ "
|
||||
TIMEFMT=$'real\t%E\nuser\t%U\nsys\t%S'
|
||||
EDITOR="nvim"
|
||||
ViSUAL_EDITOR="nvim"
|
||||
|
||||
# Bind Ctrl-left/right arrow to move back/formward one word
|
||||
# https://unix.stackexchange.com/a/140499
|
||||
#
|
||||
# Bind Canc, Home and End to the right functions
|
||||
# https://stackoverflow.com/a/8645267
|
||||
bindkey "^[[1;5C" forward-word
|
||||
bindkey "^[[1;5D" backward-word
|
||||
bindkey "^[[H" beginning-of-line
|
||||
bindkey "^[[F" end-of-line
|
||||
bindkey "^[[3~" delete-char
|
||||
|
||||
# Enable the autocompletion and make it case insensitive
|
||||
# https://superuser.com/a/1092328
|
||||
autoload -U compinit && compinit
|
||||
zstyle ":completion:*" matcher-list "m:{a-z}={A-Za-z}"
|
||||
|
||||
# Load `ls` color when autocompleting directories
|
||||
# https://unix.stackexchange.com/a/447002
|
||||
eval "$(dircolors)"
|
||||
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
|
||||
|
||||
# Import fzf and zoxide
|
||||
eval "$(fzf --zsh)"
|
||||
eval "$(zoxide init --cmd cd zsh)"
|
16
home/private_dot_config/zsh/history.zsh
Normal file
16
home/private_dot_config/zsh/history.zsh
Normal file
@ -0,0 +1,16 @@
|
||||
# Define the history file path
|
||||
HISTFILE="$HOME/.cache/zsh/.zsh_history"
|
||||
[ ! -d "$HOME/.cache/zsh" ] && mkdir -p "$HOME/.cache/zsh"
|
||||
[ ! -f "$HISTFILE" ] && touch $HISTFILE
|
||||
|
||||
HISTSIZE=5000
|
||||
SAVEHIST=$HISTSIZE
|
||||
|
||||
HISTDUP=erase
|
||||
setopt appendhistory
|
||||
setopt sharehistory
|
||||
setopt hist_ignore_space
|
||||
setopt hist_ignore_all_dups
|
||||
setopt hist_save_no_dups
|
||||
setopt hist_ignore_dups
|
||||
setopt hist_find_no_dups
|
20
home/private_dot_config/zsh/plugins.zsh
Normal file
20
home/private_dot_config/zsh/plugins.zsh
Normal file
@ -0,0 +1,20 @@
|
||||
# Zinit package manager
|
||||
# https://github.com/zdharma-continuum/zinit
|
||||
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"
|
||||
[ ! -d $ZINIT_HOME ] && mkdir -p "$(dirname $ZINIT_HOME)"
|
||||
[ ! -d $ZINIT_HOME/.git ] && git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME"
|
||||
source "${ZINIT_HOME}/zinit.zsh"
|
||||
|
||||
# Syntax highlighting
|
||||
zinit ice wait lucid depth=1; zinit light "zsh-users/zsh-syntax-highlighting"
|
||||
|
||||
# Command completions
|
||||
zinit ice wait lucid depth=1; zinit light "zsh-users/zsh-completions"
|
||||
|
||||
# History autosuggestions
|
||||
zinit ice wait lucid depth=1; zinit light "zsh-users/zsh-autosuggestions"
|
||||
|
||||
# Use fzf for completion
|
||||
zinit ice wait lucid depth=1; zinit light "Aloxaf/fzf-tab"
|
||||
zstyle ":fzf-tab:complete:cd:*" fzf-preview "ls --color $realpath"
|
||||
zstyle ":completion:*" menu no
|
Reference in New Issue
Block a user