Skip to content

Commit

Permalink
Attempting to speed things up a bit.
Browse files Browse the repository at this point in the history
+ misc other changes
  • Loading branch information
mattfoster committed May 2, 2012
1 parent ade55c5 commit f94e0ab
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 3 deletions.
2 changes: 2 additions & 0 deletions 03_zkbd
Expand Up @@ -3,3 +3,5 @@ if [[ -f ~/.zkbd/$TERM-$VENDOR-$OSTYPE ]]; then
else
source $mydir/default_zkbd
fi

bindkey -e
2 changes: 1 addition & 1 deletion 05_editor
Expand Up @@ -4,7 +4,7 @@ export GIT_EDITOR

# Define an order or preference for text editors
local editors
editors=(mate mvim gvim vim vi nano pico)
editors=(vim mate mvim gvim nano pico)

# Look for the first of these editors which exists
for editor ($editors) {
Expand Down
4 changes: 4 additions & 0 deletions 10_bindkey
Expand Up @@ -6,7 +6,11 @@ bindkey " " magic-space

bindkey "^Og" noglob-command-line
bindkey "^Os" sudo-command-line
bindkey "^Ol" less-command-line
bindkey "^OL" less-command-line-output
bindkey "^Oh" sub-command-line

bindkey "^[^[[D" backward-word
bindkey "^[^[[C" forward-word

bindkey "^h" run-help
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 20 additions & 0 deletions 09_abbreviations → disabled/09_abbreviations
Expand Up @@ -80,6 +80,26 @@ sudo-command-line() {
}
zle -N sudo-command-line


less-command-line() {
[[ -z $BUFFER ]] && zle up-history
[[ $BUFFER != less\ * ]] && BUFFER="less $BUFFER"
}
zle -N less-command-line

less-command-line-output() {
[[ -z $BUFFER ]] && zle up-history
[[ $BUFFER != less\ * ]] && BUFFER="less \$($BUFFER)"
}
zle -N less-command-line-output

sub-command-line() {
BUF=$BUFFER
zle up-history
BUFFER="$BUF \$($BUFFER)"
}
zle -N sub-command-line

# run command line with noglob set:
noglob-command-line() {
[[ -z $BUFFER ]] && zle up-history
Expand Down
2 changes: 2 additions & 0 deletions func/prompt_minimal_vcs_setup
Expand Up @@ -25,9 +25,11 @@ function prompt_minimal_vcs_setup {
if is-at-least 4.3.7 || [[ $SHLVL == 1 ]]; then
PS1='%{$fg_bold[$d_col]%}%1~ %{$fg_bold[$b_col]%}${vcs_info_msg_0_}%(?.%{$fg_bold[$n_tru]%}.%{$fg[$n_fal]%})%# %{$reset_color%}'
PS2='%_ %{$fg_bold[$d_col]%}→ %{$reset_color%}'
PS4=$'+ $(/usr/local/bin/gdate "+%s.%N")\011 '
else
PS1='%B%F{$d_col}%1~ %F{$b_col}${vcs_info_msg_0_}%(?.%F{$n_tru}.%F{$n_fal})%# %F{white}'
PS2='%_ %B%F{$d_col}→ %F{white}'
PS4=$'+ $(/usr/local/bin/gdate "+%s.%N")\011 '
fi
}

Expand Down
5 changes: 3 additions & 2 deletions rc
Expand Up @@ -60,7 +60,6 @@ zstyle ':completion:*:tar:*' files '*.tar|*.tgz|*.tz|*.tar.Z|*.tar.bz2|*.tZ|*.ta
# for printing
zstyle ':completion:*:xdvi:*' files '*.dvi'
zstyle ':completion:*:dvips:*' files '*.dvi'

# Group relatex matches:
zstyle ':completion:*' group-name ''
zstyle ':completion:*:-command-:*:(commands|builtins|reserved-words-aliases)' group-name commands
Expand Down Expand Up @@ -107,11 +106,13 @@ autoload -Uz is-at-least

if is-at-least 4.3.6; then
autoload -Uz vcs_info
zstyle ':vcs_info:*' disable cdv darcs mtn p4 svk tla
zstyle ':vcs_info:*' enable git cvs svn hg bzr
zstyle ':vcs_info:*' get-revision true
zstyle ':vcs_info:*' formats '%b '
zstyle ':vcs_info:(svn|bzr|cvs):*' branchformat '%b:%r'
zstyle ':vcs_info:cvs:*' branchformat '%r '
zstyle ':vcs_info:bzr:*' use-simple true
zstyle ':vcs_info:*' enable git cvs svn hg bzr
# vcs_info also needs to be in precmd, see: 10_hooks
vcs_info
fi
Expand Down

0 comments on commit f94e0ab

Please sign in to comment.