scatterd-dotfiles/zshrc

70 lines
1.3 KiB
Bash
Raw Normal View History

2011-01-13 17:26:04 -05:00
# load our own completion functions
fpath=(~/.zsh/completion $fpath)
for function in ~/.zsh/functions/*; do
source $function
done
2011-01-13 17:26:04 -05:00
# completion
autoload -U compinit
compinit
# automatically enter directories without cd
setopt auto_cd
# use vim as an editor
export EDITOR=vim
# aliases
if [ -e "$HOME/.aliases" ]; then
source "$HOME/.aliases"
fi
# vi mode
bindkey -v
bindkey "^F" vi-cmd-mode
2011-01-14 01:17:25 -05:00
bindkey jj vi-cmd-mode
2011-01-13 17:26:04 -05:00
# use incremental search
bindkey "^R" history-incremental-search-backward
2011-01-13 17:26:04 -05:00
2011-01-14 01:17:25 -05:00
# add some readline keys back
bindkey "^A" beginning-of-line
bindkey "^E" end-of-line
# handy keybindings
bindkey "^P" history-search-backward
bindkey "^Y" accept-and-hold
bindkey "^N" insert-last-word
bindkey -s "^T" "^[Isudo ^[A" # "t" for "toughguy"
2011-01-13 17:26:04 -05:00
# expand functions in the prompt
setopt prompt_subst
# prompt
export PS1='[${SSH_CONNECTION+"%n@%m:"}%~] '
# ignore duplicate history entries
setopt histignoredups
2011-04-04 10:26:18 -04:00
# keep TONS of history
export HISTSIZE=4096
2011-01-13 17:26:04 -05:00
# look for ey config in project dirs
export EYRC=./.eyrc
2011-01-14 01:17:25 -05:00
# automatically pushd
setopt auto_pushd
export dirstacksize=5
2011-04-04 10:26:18 -04:00
# awesome cd movements from zshkit
setopt AUTOCD
setopt AUTOPUSHD PUSHDMINUS PUSHDSILENT PUSHDTOHOME
setopt cdablevars
# Try to correct command line spelling
setopt CORRECT CORRECT_ALL
# Enable extended globbing
setopt EXTENDED_GLOB