HISTFILE=~/.histfile HISTSIZE=10000 SAVEHIST=10000 setopt extendedglob nomatch notify histignorespace histignorealldups histnofunctions histnostore histverify incappendhistory autopushd pushdignoredups unsetopt autocd beep bindkey -v export RPROMPT=' ' # Fixes a side-effect of the vi-mode oh-my-zsh plugin export KEYTIMEOUT=1 typeset -U path fpath=(~/bin ~/.zshcompletions $fpath) zstyle :compinstall filename '/home/anthonys/.zshrc' zstyle ":completion:*" complete _complete _ignored _approximate _expand zstyle ":completion:*" glob 1 zstyle ":completion:*" insert-unambiguous true zstyle ':completion:*' menu select zstyle ':completion:*' rehash true zstyle ':completion:*' matcher-list 'r:|[._-]=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'l:|=* r:|=*' zstyle ":completion:*" substitute 1 autoload -Uz up-line-or-beginning-search down-line-or-beginning-search zle -N up-line-or-beginning-search zle -N down-line-or-beginning-search [[ -n "$key[Up]" ]] && bindkey -- "$key[Up]" up-line-or-beginning-search [[ -n "$key[Down]" ]] && bindkey -- "$key[Down]" down-line-or-beginning-search autoload -Uz compinit promptinit promptinit compinit export COMPLETION_WAITING_DOTS="true" export VISUAL='nvim' export EDITOR='nvim' path=("$HOME/bin" $path) source <(antibody init) antibody bundle < ~/.zsh_plugins.txt if [[ -d ~/.cargo/bin ]]; then path=($HOME/.cargo/bin $path) fi if [[ $(whence -p starship 2> /dev/null) ]]; then eval "$(starship init zsh)" else antibody bundle denysdovhan/spaceship-prompt fi alias exa="exa -l --git" function dt() { local session_name session_name=${1:-DefaultSession} tmux -u -2 new-session -A -s $session_name } function send-to-pane() { tmux pipe-pane -I -t $1 "$2 | head -n 1" } function _send_to_pane { reply=($(tmux display-panes -b '')) } compctl -K _send_to_pane send-to-pane if [[ -n $TMUX ]]; then export NVIM_LISTEN_ADDRESS="/tmp/nvim_${USER}_$(tmux display -p '#{session_name}')" fi function nv() { if [[ ! -z "$TMUX" ]]; then local ids="$(tmux list-panes -a -F '#{pane_current_command} #{window_id} #{pane_id}' | awk '/^nvim / {print $2" "$3; exit}')" local window_id="$ids[(w)1]" local pane_id="$ids[(w)2]" [[ ! -z "$pane_id" ]] && tmux select-window -t "$window_id" && tmux select-pane -t "$pane_id" fi nvr -s $@ } function vim() { if [[ $(whence -p nvim 2> /dev/null) ]]; then nv ${@} else vim ${@} fi } path+=($HOME/.anyenv/bin) eval "$(anyenv init -)" path+=($(yarn global bin)) export PATH #THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!! export SDKMAN_DIR="$HOME/.sdkman" [[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh" if [[ -a $HOME/.zshsrc ]]; then source $HOME/.zshsrc else printf "No zshsrc\nOne has been created\n" touch $HOME/.zshsrc fi for funcfile in $(ls $HOME/.zsh.d/); do source ${HOME}/.zsh.d/${funcfile} done