Merge branch 'master' of gitosis@majnematic.com:davesdots

This commit is contained in:
David Alexander Majnemer 2008-12-02 23:29:09 -06:00
commit 8e05298573
3 changed files with 60 additions and 45 deletions

View file

@ -88,3 +88,6 @@ URxvt*color12: #729FCF
URxvt*color13: #AD7FA8 URxvt*color13: #AD7FA8
URxvt*color14: #34E2E2 URxvt*color14: #34E2E2
URxvt*color15: #EEEEEC URxvt*color15: #EEEEEC
/* Rxvt */
Rxvt*termName: rxvt

16
vimrc
View file

@ -271,18 +271,18 @@ imap <silent> <F12> <C-O>:silent set number!<CR>
" Don't force column 0 for # " Don't force column 0 for #
inoremap # X<BS># inoremap # X<BS>#
" Force <C-?> to be backspace except when in interix mode " Always map <C-h> to backspace
" because interix uses that for forward delete... " Both interix and cons use C-? as forward delete,
" and always accept <C-h> as a backspace key " besides those two exceptions, always set it to backspace
" Let interix use ^[[U for end and ^[[H for home " Also let interix use ^[[U for end and ^[[H for home
map <C-h> <BS> map <C-h> <BS>
map! <C-h> <BS> map! <C-h> <BS>
if (&term !~ "interix") if (&term =~ "interix")
map <C-?> <BS>
map! <C-?> <BS>
else
map  <Home> map  <Home>
map  <End> map  <End>
elseif (&term !~ "cons")
map <C-?> <BS>
map! <C-?> <BS>
endif endif
" Python specific stuff " Python specific stuff

86
zshrc
View file

@ -91,19 +91,25 @@ export GIT_PAGER=''
# aliases # aliases
alias cd..='cd ..' alias cd..='cd ..'
# handles per OS aliases, fixes a few terms
case `uname -s` in case `uname -s` in
Linux|CYGWIN*) Linux|CYGWIN*)
alias ls="ls -h --color=auto" alias ls="ls -h --color=auto"
alias grep='grep -d skip --color=auto' alias grep='grep -d skip --color=auto'
;; ;;
FreeBSD|Darwin|DragonFly) FreeBSD|Darwin|DragonFly)
# we must lie to the mac, for it is dumb
export LSCOLORS=ExGxFxDxCxDxDxHbaDacec export LSCOLORS=ExGxFxDxCxDxDxHbaDacec
alias ls="ls -Gh" alias ls="ls -Gh"
alias grep='grep -d skip --color=auto' alias grep='grep -d skip --color=auto'
;; ;;
Interix) Interix)
alias ls="ls --color" alias ls="ls --color"
# sorta hacky, but I cannot find a better way to do this :/
if [[ `which infocmp` = /usr/local/bin/infocmp ]] ; then
export TERMINFO=/usr/local/share/terminfo
export TERM=$TERM
fi
;; ;;
SunOS) SunOS)
if (which gls &> /dev/null) ; then if (which gls &> /dev/null) ; then
@ -154,48 +160,58 @@ bindkey ' ' magic-space
bindkey -M emacs '\ee' edit-command-line bindkey -M emacs '\ee' edit-command-line
bindkey -M emacs '' history-incremental-search-forward bindkey -M emacs '^P' history-incremental-search-forward
bindkey -M emacs '' history-incremental-search-backward bindkey -M emacs '^N' history-incremental-search-backward
case $TERM in case $TERM in
xterm*) xterm*)
bindkey '^[[H' beginning-of-line bindkey '\e[H' beginning-of-line
bindkey '^[[F' end-of-line bindkey '\e[F' end-of-line
bindkey '^[OH' beginning-of-line bindkey '\eOH' beginning-of-line
bindkey '^[OF' end-of-line bindkey '\eOF' end-of-line
bindkey '^[[1~' beginning-of-line bindkey '\e[1~' beginning-of-line
bindkey '^[[4~' end-of-line bindkey '\e[4~' end-of-line
bindkey '^[[7~' beginning-of-line bindkey '\e[7~' beginning-of-line
bindkey '^[[8~' end-of-line bindkey '\e[8~' end-of-line
bindkey '^[[3~' delete-char bindkey '\e[3~' delete-char
bindkey '^[[1;5C' emacs-forward-word bindkey '\e[1;5C' emacs-forward-word
bindkey '^[[1;5D' emacs-backward-word bindkey '\e[1;5D' emacs-backward-word
bindkey '^[[5C' emacs-forward-word bindkey '\e[5C' emacs-forward-word
bindkey '^[[5D' emacs-backward-word bindkey '\e[5D' emacs-backward-word
bindkey '^[OC' emacs-forward-word bindkey '\eOC' emacs-forward-word
bindkey '^[OD' emacs-backward-word bindkey '\eOD' emacs-backward-word
bindkey '\eOc' emacs-forward-word
bindkey '\eOd' emacs-backward-word
bindkey '\e[c' emacs-forward-word
bindkey '\e[d' emacs-backward-word
;; ;;
linux) linux)
bindkey '^[[1~' beginning-of-line bindkey '\e[1~' beginning-of-line
bindkey '^[[4~' end-of-line bindkey '\e[4~' end-of-line
bindkey '^[[3~' delete-char bindkey '\e[3~' delete-char
;; ;;
rxvt*) rxvt*)
bindkey '^[[c' emacs-forward-word bindkey '\e[c' emacs-forward-word
bindkey '^[[d' emacs-backward-word bindkey '\e[d' emacs-backward-word
bindkey '^[Oc' emacs-forward-word bindkey '\eOc' emacs-forward-word
bindkey '^[Od' emacs-backward-word bindkey '\eOd' emacs-backward-word
bindkey '^[[3~' delete-char bindkey '\e[3~' delete-char
bindkey '^[[7~' beginning-of-line bindkey '\e[7~' beginning-of-line
bindkey '^[[8~' end-of-line bindkey '\e[8~' end-of-line
;;
cons*)
bindkey '\e[H' beginning-of-line
bindkey '\e[F' end-of-line
bindkey '^?' delete-char
;; ;;
interix) interix)
bindkey '^[[H' beginning-of-line bindkey '\e[H' beginning-of-line
bindkey '^[[U' end-of-line bindkey '\e[U' end-of-line
bindkey '^?' delete-char
;; ;;
cygwin) cygwin*)
bindkey '^[[1~' beginning-of-line bindkey '\e[1~' beginning-of-line
bindkey '^[[4~' end-of-line bindkey '\e[4~' end-of-line
;; ;;
esac esac
@ -213,9 +229,6 @@ precmd()
{ {
local termtitle local termtitle
## Changing IFS breaks a few things otherwise, especially clear-zle-screen
IFS=$' \t\n'
termtitle=$(print -P "%n@%m") termtitle=$(print -P "%n@%m")
title zsh "$termtitle" title zsh "$termtitle"
} }
@ -272,7 +285,6 @@ function title
# Use these two for GNU Screen: # Use these two for GNU Screen:
print -nR $'\ek'$1$'\e'"\\" print -nR $'\ek'$1$'\e'"\\"
shift shift
# print -nR $'\e]0;'$*$'\a'
print -nR $'\e_screen \005 | '$*$'\e'"\\" print -nR $'\e_screen \005 | '$*$'\e'"\\"
;; ;;
xterm*|rxvt*|cygwin|interix) xterm*|rxvt*|cygwin|interix)