make zsh and vim place nicer on interix

This commit is contained in:
dave 2008-11-23 22:50:05 -06:00
parent 1ecaf1b495
commit 2ac4344c12
3 changed files with 15 additions and 5 deletions

6
vimrc
View file

@ -283,11 +283,15 @@ inoremap # X<BS>#
" Force <C-?> to be backspace except when in interix mode " Force <C-?> to be backspace except when in interix mode
" because interix uses that for forward delete... " because interix uses that for forward delete...
" and always accept <C-h> as a backspace key " and always accept <C-h> as a backspace key
" 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>
map! <C-?> <BS> map! <C-?> <BS>
else
map  <Home>
map  <End>
endif endif
" Python specific stuff " Python specific stuff

View file

@ -34,13 +34,13 @@ function extract()
# *) # *)
case "${(L)1}" in case "${(L)1}" in
*.tar) *.tar)
tar xf "${1}" --no-same-owner tar xf "${1}"
;; ;;
*.tar.gz|*.tgz|*.tar.Z) *.tar.gz|*.tgz|*.tar.Z)
tar zxf "${1}" --no-same-owner tar zxf "${1}"
;; ;;
*.tar.bz2|*.tbz2) *.tar.bz2|*.tbz2)
tar jxf "${1}" --no-same-owner tar jxf "${1}"
;; ;;
*.zip|*.ZIP|*.jar) *.zip|*.ZIP|*.jar)
unzip -qo "${1}" unzip -qo "${1}"
@ -61,7 +61,7 @@ function extract()
ar x "${1}" ar x "${1}"
;; ;;
*.tar.lzma) *.tar.lzma)
lzma -dc "${1}" | tar xf - --no-same-owner lzma -dc "${1}" | tar xf
;; ;;
*.lzma) *.lzma)
lzma -dc "${1}" > $(basename "${1%.*}") lzma -dc "${1}" > $(basename "${1%.*}")

6
zshrc
View file

@ -153,6 +153,12 @@ case $TERM in
bindkey '^[[7~' beginning-of-line bindkey '^[[7~' beginning-of-line
bindkey '^[[8~' end-of-line bindkey '^[[8~' end-of-line
;; ;;
interix)
bindkey '^[[H' beginning-of-line
bindkey '^[[U' end-of-line
bindkey '^[[C' emacs-forward-word
bindkey '^[[D' emacs-backward-word
;;
esac esac
# prompt # prompt