X-Git-Url: https://git.draconx.ca/gitweb/zshconf.git/blobdiff_plain/444e9cc97af7f2644efc56409365f19d3ffe89e4..590f3449add396e5dc77275df6fbf6014cb7a4e2:/zshrc diff --git a/zshrc b/zshrc index 899be85..7f5a3b3 100644 --- a/zshrc +++ b/zshrc @@ -1,14 +1,23 @@ +# Configuration for interactive shells. +# +# Copyright (C) 2009 Nick Bowler +# +# Copying and distribution of this file, with or without modification, +# are permitted in any medium without royalty provided the copyright +# notice and this notice are preserved. This file is offered as-is, +# without any warranty. + if [[ -n $HOME ]]; then HISTFILE=$HOME/.zsh_history - SAVEHIST=1000 + SAVEHIST=10000 fi -HISTSIZE=1000 +HISTSIZE=10000 bindkey -e case $TERM in rxvt*) - if [[ $TERM == rxvt-unicode ]]; then + if [[ $TERM =~ '^rxvt-unicode' ]]; then [[ -z $COLORTERM ]] && export COLORTERM='rxvt-xpm' [[ -z $COLORFGBG ]] && export COLORFGBG='15;default;0' fi @@ -17,18 +26,32 @@ rxvt*) bindkey '\e[8~' end-of-line bindkey '\e[7~' beginning-of-line ;; -screen*|linux) +screen*|linux|cygwin) bindkey '\e[3~' delete-char bindkey '\e[4~' end-of-line bindkey '\e[1~' beginning-of-line + bindkey '\eOM' accept-line ;; -xterm) +xterm*) bindkey '\e[3~' delete-char bindkey '\e[F' end-of-line bindkey '\e[H' beginning-of-line bindkey '\eOH' beginning-of-line bindkey '\eOF' end-of-line ;; +cons25) + bindkey '^?' delete-char + bindkey '\e[F' end-of-line + bindkey '\e[H' beginning-of-line +;; +esac + +# Keymap-specific bindings +case $KEYMAP in +colemak) + bindkey '^R' history-incremental-search-forward + bindkey '^P' history-incremental-search-backward + ;; esac # Set the xterm title @@ -76,11 +99,16 @@ fi export LANG=en_CA.UTF-8 export LC_COLLATE=ja_JP.UTF-8 -# I like colours -alias ls='ls --color=auto' +# Default options for various utilities. +alias ls='ls --time-style=long-iso --color=auto' alias grep='grep --color=auto' # I hate mistakes alias mv='mv -i' alias rm='rm -i' alias cp='cp -i' + +# Common aliases +alias vv='$EDITOR ~/.zshrc && source ~/.zshrc' +alias ll='ls -l' +alias lr='ls -rtl'