X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=zsh%2Frc;h=15e3911ec4429d680602498ea347eadd873034dc;hb=77da04c4fc98cf5f1041f6b00c8fbbcbd3db4973;hp=7b0e7d24ac41708318b720f4c543b470440c7846;hpb=ce883f49812af309c29b1a5c532a171175e99f08;p=config%2Fdotfiles.git diff --git a/zsh/rc b/zsh/rc index 7b0e7d2..15e3911 100644 --- a/zsh/rc +++ b/zsh/rc @@ -97,6 +97,30 @@ alias -g D='2>&1 | colordiff L' # Simplify calls to grep. alias -g G='| grep' +# Automatically use unified diffs. +alias diff='diff -u' + +# Display all files and use human readable sizes. +alias du='du -sh' + +# Multiple files given to Vim are opened in tabs. +alias vim='vim -p' +# Shortcuts for Vim. +alias v='vim' +alias vi='vim' + +# Exit binding like in Vim. +alias :q='exit' + +# Edit the mercurial patch queue series file for the current mercurial +# repository in Vim. Also change Vim's pwd to the patches directory so other +# patches can easily be opened. +alias vqs='vim -c "cd $(hg root)/.hg/patches/" "$(hg root)/.hg/patches/series"' + +# Make going up directories simple. +alias -g ...='../..' +alias -g ....='../../..' + # Improved ls which displays the files in columns (-C), visualises directories, # links and other special files (-F) and pages everything through less (L). # @@ -123,5 +147,7 @@ function ll() { } +# Load rc file for current OS. +source_config ~/.zsh os rc $(uname) nolocal # Load rc file for current hostname (first part before a dot) or rc.local. -source_config ~/.zsh "" rc ${$(hostname)//.*/} +source_config ~/.zsh host rc ${$(hostname)//.*/}