146 lines
4.0 KiB
Bash
146 lines
4.0 KiB
Bash
fpath+=~/.config/zsh/functions/
|
|
# Lines configured by zsh-newuser-install
|
|
HISTFILE=~/.histfile
|
|
HISTSIZE=999999
|
|
SAVEHIST=999999
|
|
bindkey -e
|
|
|
|
# This stops <C-s> from making vim hanging
|
|
stty -ixon
|
|
|
|
# export PATH="$PATH:$HOME/.local/bin:$HOME/dotfiles/scripts:$HOME/.cargo/bin"
|
|
export EDITOR=nvim
|
|
export WORDCHARS='*?_-.[]~&;!#$%^(){}<>'
|
|
export RUST_SRC_PATH='~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src'
|
|
|
|
# End of lines configured by zsh-newuser-install
|
|
# The following lines were added by compinstall
|
|
zstyle :compinstall filename '/home/joe/.zshrc'
|
|
|
|
autoload -Uz compinit
|
|
compinit
|
|
# End of lines added by compinstall
|
|
|
|
zstyle ':completion:*' menu select
|
|
zmodload zsh/complist
|
|
|
|
zstyle ':completion:*:descriptions' format '%U%B%d%b%u'
|
|
zstyle ':completion:*:warnings' format '%BSorry, no matches for: %d%b'
|
|
|
|
# This helps tab and shift tab completion work
|
|
bindkey '^[[Z' reverse-menu-complete
|
|
|
|
autoload -U edit-command-line
|
|
zle -N edit-command-line
|
|
bindkey -M emacs '^x^e' edit-command-line
|
|
|
|
autoload -Uz promptinit
|
|
promptinit
|
|
prompt joe
|
|
|
|
|
|
setopt append_history
|
|
setopt extended_history
|
|
setopt hist_ignore_dups
|
|
setopt hist_ignore_space
|
|
setopt hist_reduce_blanks
|
|
setopt hist_verify
|
|
setopt inc_append_history
|
|
|
|
setopt extended_glob
|
|
setopt no_case_glob
|
|
|
|
setopt nomatch
|
|
setopt notify
|
|
setopt prompt_subst
|
|
setopt complete_in_word
|
|
setopt menu_complete
|
|
|
|
setopt autocd
|
|
setopt auto_pushd
|
|
setopt pushd_silent
|
|
setopt pushd_to_home
|
|
setopt pushd_minus
|
|
setopt pushd_ignore_dups
|
|
|
|
setopt no_flow_control
|
|
setopt interactivecomments
|
|
|
|
source ~/.config/zsh/antigen.zsh
|
|
|
|
antigen bundle zdharma/fast-syntax-highlighting
|
|
antigen bundle momo-lab/zsh-abbrev-alias
|
|
antigen bundle zsh-users/zsh-history-substring-search
|
|
antigen bundle zsh-users/zsh-autosuggestions
|
|
|
|
antigen apply
|
|
|
|
alias l="ls -Ahl --group-directories-first --color=auto"
|
|
alias fcon="$EDITOR ~/.config/fish/config.fish"
|
|
alias gcon="$EDITOR ~/.gitconfig"
|
|
alias rcon="$EDITOR ~/.config/ranger/rc.conf"
|
|
alias icon="$EDITOR ~/.config/i3/config"
|
|
alias kcon="$EDITOR ~/.config/kak/kakrc"
|
|
alias vcon="$EDITOR ~/.config/nvim/init.vim"
|
|
alias zcon="$EDITOR ~/.zshrc"
|
|
alias ideacon="$EDITOR ~/.ideavimrc"
|
|
alias r="ranger"
|
|
alias sf="source $HOME/.zshrc"
|
|
alias xclip="xclip -selection clipboard"
|
|
alias kak-lsp="kak-lsp --config $HOME/.config/kak/kak-lsp.toml"
|
|
alias vim=nvim
|
|
abbrev-alias -g rbt="RUST_BACKTRACE=1"
|
|
|
|
abbrev-alias -g lss="| grep"
|
|
|
|
# Flags are -c -g and -f
|
|
alias gs="git status -u"
|
|
alias gmm="git merge master"
|
|
alias gmom="git merge origin/master"
|
|
alias gchm="git checkout master"
|
|
abbrev-alias -g gl="git lop -10"
|
|
abbrev-alias -g gll="git lol -15"
|
|
abbrev-alias -g gcl="git clone"
|
|
abbrev-alias -g gi="git init"
|
|
abbrev-alias -g gd="git diff"
|
|
abbrev-alias -g gdh="git diff HEAD"
|
|
abbrev-alias -g gds="git diff --stat"
|
|
abbrev-alias -g ga="git add"
|
|
abbrev-alias -g gaa="git add -A"
|
|
abbrev-alias -g gc="git commit"
|
|
abbrev-alias -g gch="git checkout"
|
|
abbrev-alias -g gf="git fetch"
|
|
abbrev-alias -g gp="git push"
|
|
abbrev-alias -g gpd="git push -d origin"
|
|
abbrev-alias -g grh="git reset --hard"
|
|
abbrev-alias -g gss="GIT_LFS_SKIP_SMUDGE=1"
|
|
abbrev-alias -g glp="git lfs pull"
|
|
abbrev-alias -g glm="gss git merge ; glp"
|
|
abbrev-alias -g gm="git merge"
|
|
abbrev-alias -g gms="git merge --squash"
|
|
abbrev-alias -g gb="git branch"
|
|
abbrev-alias -g gba="git branch -a"
|
|
abbrev-alias -g gr="git rebase"
|
|
abbrev-alias -g gcm="git commit -m"
|
|
abbrev-alias -g gcma="git commit -am"
|
|
abbrev-alias -g gca="git commit --amend"
|
|
abbrev-alias -g gcau="git commit --author="
|
|
abbrev-alias -g gpl="git pull"
|
|
abbrev-alias -g grpo="git remote prune origin"
|
|
abbrev-alias -g gcln="git clean -fd"
|
|
abbrev-alias -g gst="git stash"
|
|
abbrev-alias -g gsl="git stash list"
|
|
abbrev-alias -g gsp="git stash pop"
|
|
abbrev-alias -g gsi="git submodule init"
|
|
abbrev-alias -g gsu="git submodule update"
|
|
|
|
bindkey -M emacs '^P' history-substring-search-up
|
|
bindkey -M emacs '^N' history-substring-search-down
|
|
|
|
# Kak alias to open ranger if it's a directory
|
|
# function kak() {
|
|
# test -d "$1" && command kak -e "ranger" || command kak "$@";
|
|
# }
|
|
|
|
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|