Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Tab completition
- autoload -Uz compinit
- typeset -i updated_at=$(date +'%j' -r ~/.zcompdump 2>/dev/null || stat -f '%Sm' -t '%j' ~/.zcompdump 2>/dev/null)
- if [ $(date +'%j') != $updated_at ]; then
- compinit -i
- else
- compinit -C -i
- fi
- zmodload -i zsh/complist
- #ZSH History settings
- HISTFILE=$HOME/.zsh_history
- HISTSIZE=100000
- SAVEHIST=$HISTSIZE
- setopt hist_ignore_all_dups # remove older duplicate entries from history
- setopt hist_reduce_blanks # remove superfluous blanks from history items
- setopt inc_append_history # save history entries as soon as they are entered
- setopt share_history # share history between different instances of the shell
- # Other settings
- setopt auto_cd # cd by typing directory name if it's not a command
- setopt correct_all # autocorrect commands
- #Tab completition
- setopt auto_list # automatically list choices on ambiguous completion
- setopt auto_menu # automatically use menu completion
- setopt always_to_end # move cursor to end if word had one match
- zstyle ':completion:*' menu select # select completions with arrow keys
- zstyle ':completion:*' group-name '' # group results by category
- zstyle ':completion:::::' completer _expand _complete _ignored _approximate # enable approximate matches for completion
- zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
- #Spaceship prompt settings
- SPACESHIP_PROMPT_ORDER=(
- user # Username section
- dir # Current directory section
- host # Hostname section
- git # Git section (git_branch + git_status)
- hg # Mercurial section (hg_branch + hg_status)
- exec_time # Execution time
- line_sep # Line break
- vi_mode # Vi-mode indicator
- jobs # Background jobs indicator
- exit_code # Exit code section
- char # Prompt character
- )
- SPACESHIP_PROMPT_ADD_NEWLINE=false
- SPACESHIP_CHAR_SYMBOL="‚ùØ"
- SPACESHIP_CHAR_SUFFIX=" "
- # Simplify prompt if we're using Hyper
- if [[ "$TERM_PROGRAM" == "Hyper" ]]; then
- SPACESHIP_PROMPT_SEPARATE_LINE=false
- SPACESHIP_DIR_SHOW=false
- SPACESHIP_GIT_BRANCH_SHOW=false
- fi
- #Antibody plugins
- source <(antibody init)
- antibody bundle zdharma/fast-syntax-highlighting
- antibody bundle zsh-users/zsh-autosuggestions
- antibody bundle zsh-users/zsh-completions
- antibody bundle marzocchi/zsh-notify
- antibody bundle denysdovhan/spaceship-prompt
- antibody bundle hschne/fzf-git
- antibody bundle gradle/gradle-completion
- # Open new tabs in same directory
- if [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then
- function chpwd {
- printf 'e]7;%sa' "file://$HOSTNAME${PWD// /%20}"
- }
- chpwd
- fi
- #Enable vi mode
- bindkey -v
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement