Permalink
Browse files

reverted

  • Loading branch information...
1 parent f7e32a8 commit 7e62eadad37d4776c0683a6b1c463c9a19926d11 @graysky2 committed Jan 5, 2013
Showing with 23 additions and 5 deletions.
  1. +17 −4 dotfiles/shell/.zsh/lib/keys.zsh
  2. +6 −1 dotfiles/shell/.zshrc
@@ -1,9 +1,12 @@
-bindkey -v # set vim bindings http://zshwiki.org/home/zle/bindkeys
+autoload up-line-or-beginning-search
+autoload down-line-or-beginning-search
+zle -N up-line-or-beginning-search
+zle -N down-line-or-beginning-search
-typeset -A key
+bindkey -v # set vim bindings
+# http://zshwiki.org/home/zle/bindkeys
-bindkey "^[[A" history-beginning-search-backward
-bindkey "^[[B" history-beginning-search-forward
+typeset -A key
key[Home]=${terminfo[khome]}
key[End]=${terminfo[kend]}
@@ -22,6 +25,16 @@ key[Enter]=${terminfo[kent]}
[[ -n "${key[End]}" ]] && bindkey "${key[End]}" end-of-line
[[ -n "${key[Insert]}" ]] && bindkey "${key[Insert]}" overwrite-mode
[[ -n "${key[Delete]}" ]] && bindkey "${key[Delete]}" delete-char
+[[ -n "${key[Up]}" ]] && bindkey "${key[Up]}" up-line-or-beginning-search
+[[ -n "${key[Down]}" ]] && bindkey "${key[Down]}" down-line-or-beginning-search
[[ -n "${key[Left]}" ]] && bindkey "${key[Left]}" backward-char
[[ -n "${key[Right]}" ]] && bindkey "${key[Right]}" forward-char
[[ -n "${key[Enter]}" ]] && bindkey "${key[Enter]}" enter
+
+# Finally, make sure the terminal is in application mode, when zle is
+# active. Only then are the values from $terminfo valid.
+zle-line-init () { echoti smkx }
+zle-line-finish () { echoti rmkx }
+
+zle -N zle-line-init
+zle -N zle-line-finish
View
@@ -1,5 +1,10 @@
ZSH=$HOME/.zsh
-[[ -f $HOME/.zsh/zsh-syntax-highlighting/*.zsh ]] && . $HOME/.zsh/zsh-syntax-highlighting/*.zsh # https://github.com/zsh-users/zsh-syntax-highlighting
+
+[[ -s /scratch/autojump/pkg/etc/profile.d/autojump.sh ]] \
+ && . /scratch/autojump/pkg/etc/profile.d/autojump.sh
+[[ -f $HOME/.zsh/zsh-syntax-highlighting/*.zsh ]] \
+ && . $HOME/.zsh/zsh-syntax-highlighting/*.zsh # https://github.com/zsh-users/zsh-syntax-highlighting
+
for config_file ($ZSH/lib/*.zsh) source $config_file # load zsh specific stuff
for i in aliases bashrc2 commonrc functions zsh; do

0 comments on commit 7e62ead

Please sign in to comment.