mirror of
https://github.com/tomru/DotfilesOld.git
synced 2026-03-03 22:47:29 +01:00
start out with thoughtbots version
This commit is contained in:
committed by
Thomas Ruoff
parent
891caebf74
commit
bc1bd4f5e6
128
zshrc
128
zshrc
@@ -1,92 +1,46 @@
|
||||
source ~/.dotfiles/zplug/init.zsh
|
||||
# load custom executable functions
|
||||
for function in ~/.zsh/functions/*; do
|
||||
source $function
|
||||
done
|
||||
|
||||
# extra files in ~/.zsh/configs/pre , ~/.zsh/configs , and ~/.zsh/configs/post
|
||||
# these are loaded first, second, and third, respectively.
|
||||
_load_settings() {
|
||||
_dir="$1"
|
||||
if [ -d "$_dir" ]; then
|
||||
if [ -d "$_dir/pre" ]; then
|
||||
for config in "$_dir"/pre/**/*(N-.); do
|
||||
. $config
|
||||
done
|
||||
fi
|
||||
|
||||
zplug "lib/spectrum", from:oh-my-zsh
|
||||
zplug "lib/directories", from:oh-my-zsh
|
||||
zplug "lib/grep", from:oh-my-zsh
|
||||
zplug "lib/history", from:oh-my-zsh
|
||||
zplug "lib/misc", from:oh-my-zsh
|
||||
zplug "plugins/common-aliases", from:oh-my-zsh
|
||||
zplug "plugins/frontend-search", from:oh-my-zsh
|
||||
for config in "$_dir"/**/*(N-.); do
|
||||
case "$config" in
|
||||
"$_dir"/pre/*)
|
||||
:
|
||||
;;
|
||||
"$_dir"/post/*)
|
||||
:
|
||||
;;
|
||||
*)
|
||||
if [ -f $config ]; then
|
||||
. $config
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
zplug "zsh-users/zsh-completions", use:"src/*.zsh"
|
||||
zplug "zsh-users/zsh-syntax-highlighting", defer:2
|
||||
if [ -d "$_dir/post" ]; then
|
||||
for config in "$_dir"/post/**/*(N-.); do
|
||||
. $config
|
||||
done
|
||||
fi
|
||||
fi
|
||||
}
|
||||
_load_settings "$HOME/.zsh/configs"
|
||||
|
||||
zplug "peterhurford/git-it-on.zsh"
|
||||
zplug "gerges/oh-my-zsh-jira-plus"
|
||||
# Local config
|
||||
[[ -f ~/.zshrc.local ]] && source ~/.zshrc.local
|
||||
|
||||
zplug "mafredri/zsh-async"
|
||||
zplug "sindresorhus/pure"
|
||||
|
||||
########################
|
||||
# Other settings
|
||||
########################
|
||||
setopt auto_cd
|
||||
setopt multios
|
||||
setopt cdablevars
|
||||
|
||||
|
||||
########################
|
||||
# vi mode
|
||||
########################
|
||||
bindkey -v
|
||||
zle -N edit-command-line
|
||||
autoload -Uz edit-command-line
|
||||
bindkey -M vicmd 'v' edit-command-line
|
||||
|
||||
########################
|
||||
# Aliases
|
||||
########################
|
||||
alias _=sudo
|
||||
alias g=git
|
||||
alias nohist='unset HISTFILE'
|
||||
|
||||
alias reset='reset && base16_gruvbox-dark-medium'
|
||||
|
||||
alias ta='tmux attach -t'
|
||||
alias ts='tmux new-session -s'
|
||||
alias tl='tmux list-sessions'
|
||||
rl () { $(npm bin)/$* }
|
||||
|
||||
# utt time tracking
|
||||
alias ua='uttr --add'
|
||||
alias uah='uttr --add hello'
|
||||
alias uas='uttr --add standup'
|
||||
alias ual='uttr --add "lunch**"'
|
||||
alias ue='uttr --edit'
|
||||
alias urw='uttr --report=week'
|
||||
alias urlw='uttr --report=lastWeek'
|
||||
alias urm='uttr --report=month'
|
||||
alias urlm='uttr --report=lastMonth'
|
||||
|
||||
# dead simple todo list
|
||||
alias todo="mkdir -p ~/todos/\$(date +"%Y"); vim ~/todos/\$(date +"%Y")/todo-\$(date +"%m-%d").md"
|
||||
|
||||
# colors
|
||||
autoload -U colors && colors
|
||||
alias ls='ls --color=tty'
|
||||
|
||||
# keybindings
|
||||
|
||||
export KEYTIMEOUT=1
|
||||
|
||||
# prevent 2*ESC-i insert-mode switch failure
|
||||
noop () { }
|
||||
zle -N noop
|
||||
bindkey -M vicmd '\e' noop
|
||||
|
||||
bindkey '^P' up-history
|
||||
bindkey '^N' down-history
|
||||
|
||||
bindkey '^r' history-incremental-search-backward
|
||||
bindkey ' ' magic-space
|
||||
|
||||
# fzf
|
||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||
|
||||
# zplug
|
||||
if ! zplug check; then
|
||||
zplug install
|
||||
fi
|
||||
|
||||
zplug load
|
||||
# aliases
|
||||
[[ -f ~/.aliases ]] && source ~/.aliases
|
||||
|
||||
Reference in New Issue
Block a user