Compare commits

...

4 Commits

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

@ -64,39 +64,76 @@ ZSH_THEME="spaceship"
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# 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
# ---------------------------------------------------------------------------
# User configuration
# USER CONFIGURATION
# ---------------------------------------------------------------------------
autoload -U compinit
compinit
export FAVORITE_COMMAND1="{{ .tmux_favorite1 }}"
export FAVORITE_COMMAND2="{{ .tmux_favorite2 }}"
export FAVORITE_COMMAND3="{{ .tmux_favorite3 }}"
export FAVORITE_COMMAND4="{{ .tmux_favorite4 }}"
alias cdd='cd {{ .deploydir }}'
export cdd={{ .deploydir }}
if [[ -f "$HOME/.zshrc.local" ]]; then
source "$HOME/.zshrc.local"
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
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# ignore recording duplicate consecutive commands in the history
setopt HIST_IGNORE_DUPS
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='nvim'
# fi
# ignore commands that start with a space in the history
setopt HIST_IGNORE_SPACE
# ---------------------------------------------------------------------------
# Git
# ---------------------------------------------------------------------------
if command -v tig &>/dev/null; then
alias tiga='tig --all'
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
@ -126,14 +163,8 @@ function ssh() {
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
@ -152,7 +183,7 @@ fi
# ---------------------------------------------------------------------------
# SDKMAN
# Sdkman
# ---------------------------------------------------------------------------
export SDKMAN_DIR="$HOME/.sdkman"
@ -160,7 +191,7 @@ export SDKMAN_DIR="$HOME/.sdkman"
# ---------------------------------------------------------------------------
# MAVEN
# Maven
# ---------------------------------------------------------------------------
if command -v mvn &>/dev/null; then

@ -1,10 +1,15 @@
# Display time
# Never display time
SPACESHIP_TIME_SHOW=false
# Display username always
# Never display user
SPACESHIP_USER_SHOW=false
# Do not truncate path in repos
SPACESHIP_DIR_TRUNC_REPO=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