Compare commits

..

4 Commits

Author SHA1 Message Date
Yax b64e2d49d4 spaceship config 4 weeks ago
Yax 5d8dddb3a0 Reorder initialization 4 weeks ago
Yax 31b080d00f Update zshrc 4 weeks ago
Yax 5af678e33a update zshrc 4 weeks ago

@ -64,39 +64,76 @@ ZSH_THEME="spaceship"
# Custom plugins may be added to $ZSH_CUSTOM/plugins/ # Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse) # Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup. # Add wisely, as too many plugins slow down shell startup.
plugins=(fzf sdk nodenv) plugins=(fzf sdk nodenv zsh-autosuggestions zsh-syntax-highlighting)
source $ZSH/oh-my-zsh.sh source $ZSH/oh-my-zsh.sh
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# User configuration # USER CONFIGURATION
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
autoload -U compinit export FAVORITE_COMMAND1="{{ .tmux_favorite1 }}"
compinit export FAVORITE_COMMAND2="{{ .tmux_favorite2 }}"
export FAVORITE_COMMAND3="{{ .tmux_favorite3 }}"
export FAVORITE_COMMAND4="{{ .tmux_favorite4 }}"
# You may need to manually set your language environment alias cdd='cd {{ .deploydir }}'
# export LANG=en_US.UTF-8 export cdd={{ .deploydir }}
# Preferred editor for local and remote sessions if [[ -f "$HOME/.zshrc.local" ]]; then
# if [[ -n $SSH_CONNECTION ]]; then source "$HOME/.zshrc.local"
# export EDITOR='vim' fi
# else
# export EDITOR='nvim'
# fi
# ---------------------------------------------------------------------------
# History
# ---------------------------------------------------------------------------
# set the maximum number of lines to be saved in the history file
export HISTSIZE="50000"
export SAVEHIST="$HISTSIZE"
# append new history entries to the history file
setopt APPEND_HISTORY
# save each command to the history file as soon as it is executed
setopt INC_APPEND_HISTORY
# ignore recording duplicate consecutive commands in the history
setopt HIST_IGNORE_DUPS
# ignore commands that start with a space in the history
setopt HIST_IGNORE_SPACE
# ---------------------------------------------------------------------------
# Git
# ---------------------------------------------------------------------------
if command -v tig &>/dev/null; then if command -v tig &>/dev/null; then
alias tiga='tig --all' alias tiga='tig --all'
fi fi
alias cdd='cd {{ .deploydir }}' # ---------------------------------------------------------------------------
export cdd={{ .deploydir }} # Editor
# ---------------------------------------------------------------------------
if hash nvim 2>/dev/null; then
export EDITOR=nvim
elif hash vim 2>/dev/null; then
export EDITOR=vim
elif hash vi 2>/dev/null; then
export EDITOR=vi
else
export EDITOR=nano
fi
export SVN_EDITOR=$EDITOR
export GIT_EDITOR=$EDITOR
export VISUAL=$EDITOR
alias vi=$EDITOR
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# TMUX # Tmux
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Function to set tmux window title # Function to set tmux window title
@ -126,14 +163,8 @@ function ssh() {
fi fi
} }
export FAVORITE_COMMAND1="{{ .tmux_favorite1 }}"
export FAVORITE_COMMAND2="{{ .tmux_favorite2 }}"
export FAVORITE_COMMAND3="{{ .tmux_favorite3 }}"
export FAVORITE_COMMAND4="{{ .tmux_favorite4 }}"
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# FZF # Fzf
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
if command -v fzf &>/dev/null; then if command -v fzf &>/dev/null; then
@ -152,7 +183,7 @@ fi
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# SDKMAN # Sdkman
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
export SDKMAN_DIR="$HOME/.sdkman" export SDKMAN_DIR="$HOME/.sdkman"
@ -160,7 +191,7 @@ export SDKMAN_DIR="$HOME/.sdkman"
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# MAVEN # Maven
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
if command -v mvn &>/dev/null; then if command -v mvn &>/dev/null; then

@ -1,10 +1,15 @@
# Display time # Never display time
SPACESHIP_TIME_SHOW=false SPACESHIP_TIME_SHOW=false
# Display username always # Never display user
SPACESHIP_USER_SHOW=false SPACESHIP_USER_SHOW=false
# Do not truncate path in repos # Do not truncate path in repos
SPACESHIP_DIR_TRUNC_REPO=false SPACESHIP_DIR_TRUNC_REPO=false
SPACESHIP_JOBS_SHOW=false # Never display jobs
SPACESHIP_JOBS_SHOW=false
# Async display git branch
# and apply workaround in spaceship code: https://github.com/spaceship-prompt/spaceship-prompt/issues/1193
SPACESHIP_GIT_BRANCH_ASYNC=true
Loading…
Cancel
Save