scatterd-dotfiles/zshrc
Dan Croak e69f7b7995 Source ~/.zshrc.local if it exists
Follows the pattern of:

* ~/.aliases.local in ce7ad49
* ~/.gitconfig.local in 8e141fe
* ~/.vimrc.local in a666267

Use consistent:

* `source`ing style.
* commenting style.

I am using ~/.zshrc.local as a home for `eval "$(rbenv init -)"`.
2013-07-08 21:20:11 -07:00

71 lines
1.4 KiB
Bash

# load our own completion functions
fpath=(~/.zsh/completion $fpath)
# completion
autoload -U compinit
compinit
for function in ~/.zsh/functions/*; do
source $function
done
# automatically enter directories without cd
setopt auto_cd
# use vim as the visual editor
export VISUAL=vim
export EDITOR=$VISUAL
# vi mode
bindkey -v
bindkey "^F" vi-cmd-mode
bindkey jj vi-cmd-mode
# use incremental search
bindkey "^R" history-incremental-search-backward
# 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"
# expand functions in the prompt
setopt prompt_subst
# prompt
export PS1='[${SSH_CONNECTION+"%n@%m:"}%~] '
# ignore duplicate history entries
setopt histignoredups
# keep TONS of history
export HISTSIZE=4096
# look for ey config in project dirs
export EYRC=./.eyrc
# automatically pushd
setopt auto_pushd
export dirstacksize=5
# 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
# aliases
[[ -f ~/.aliases ]] && source ~/.aliases
# Local config
[[ -f ~/.zshrc.local ]] && source ~/.zshrc.local