From c0b1058149b87983e4ff89e69b7082f18b2c18ee Mon Sep 17 00:00:00 2001 From: Steven Lu Date: Tue, 23 Jul 2013 19:51:59 -0400 Subject: [PATCH] more better fixing --- .../history-substring-search.zsh | 10 +++------ zshrc | 22 +------------------ 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/plugins/history-substring-search/history-substring-search.zsh b/plugins/history-substring-search/history-substring-search.zsh index 53b1b429b..ef3a73539 100644 --- a/plugins/history-substring-search/history-substring-search.zsh +++ b/plugins/history-substring-search/history-substring-search.zsh @@ -434,8 +434,6 @@ function _history-substring-search-down-buffer() { false } -HISTORY_PATH_SEPARATOR="///; " - function _history-substring-search-up-history() { # # Behave like up in ZSH, except clear the $BUFFER @@ -449,8 +447,7 @@ function _history-substring-search-up-history() { # going up from somewhere below the top of history else - ((HISTNO--)) - BUFFER=${history[$HISTNO]#*$HISTORY_PATH_SEPARATOR} + zle up-history fi return true @@ -473,8 +470,7 @@ function _history-substring-search-down-history() { # going down from somewhere above the bottom of history else - ((HISTNO++)) - BUFFER=${history[$HISTNO]#*$HISTORY_PATH_SEPARATOR} + zle down-history fi return true @@ -521,7 +517,7 @@ function _history-substring-search-up-search() { # to highlight the current buffer. # (( _history_substring_search_match_index-- )) - BUFFER=${history[$_history_substring_search_matches[$_history_substring_search_match_index]]#*$HISTORY_PATH_SEPARATOR} + BUFFER=$history[$_history_substring_search_matches[$_history_substring_search_match_index]] _history_substring_search_query_highlight=$HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND elif [[ $_history_substring_search_match_index -eq 1 ]]; then diff --git a/zshrc b/zshrc index 8dfd5c031..76cf322ce 100644 --- a/zshrc +++ b/zshrc @@ -49,26 +49,6 @@ export PATH=~/bin:~/util:$PATH:/usr/local/share/npm/bin # bindkey -M menuselect ' ' accept-and-infer-next-history # bindkey -M menuselect '^?' undo -# vim mode. I'm ready for it. -bindkey -v -bindkey "^H" backward-kill-word -bindkey "^?" backward-delete-char -bindkey "^U" backward-kill-line -# must bind all kind of shit for gettind the damn control keys right now... -bindkey "^[[1;5D" backward-word -bindkey "^[[1;5C" forward-word -bindkey "^[[1;3D" vi-backward-word # alt -bindkey "^[[1;3C" vi-forward-word-end # alt -bindkey "^[[1~" beginning-of-line -bindkey "^[[4~" end-of-line -# bindkey "^[[2~" Thsi should run tmux ctrl a ] to paste copy buffer -bindkey "^[[3~" delete-char -bindkey "^[[5~" up-line-or-search -bindkey "^[[6~" down-line-or-search -bindkey -M vicmd "F10" vi-cmd-mode -# bindkey -m vicmd "F10" this should run a widget that runs tmux to switch pane (Note the semantics are reversed; by default the shell should be in insert mode) -bindkey -M viins '^r' history-incremental-search-backward -bindkey -M vicmd '^r' history-incremental-search-backward stty -ixon stty -ixoff @@ -99,7 +79,7 @@ alias l="ls" alias gs="git s" # short status alias glp="git log -p --no-ext-diff" alias gdt="git difftool" -alias gd="git diff --no-ext-diff" +alias gd="git diff" alias gdc="gd --cached" alias gg="git lg" alias gcm="git commit -am"