夜行録 - 酔歩.net

日暮れて道遠し さらに夜道を行く もって夜行録と名付く

zsh 設定の refine/tuning

autoload predict-on
predict-on

zle -N predict-on
zle -N predict-off
bindkey '^xp' predict-on
bindkey '^x^p' predict-off
zstyle ':predict' verbose true
zstyle ':predict' toggle true

最後のzstyle ':predict' toggle trueが最重要。昔、predict-onにした時に結局止めたのも、せっかく予測で超長いコマンドラインを拾い出せたのに、編集すると後ろがみんな消える、それも前にコマンド追加しようとすると全部消えるのが殺意わくほどムカついたから。きっとなにか、細かく制御できるんだろうとは思ったが、ちゃんと回避策があったようなので早速復活させてみる。

せっかくなので、その他の設定。

ヒストリ関連

HISTSIZE=100000
SAVEHIST=100000
HISTFILE=~/.zhistory
setopt share_history
setopt append_history
setopt hist_ignore_dups
setopt hist_reduce_blanks
autoload history-search-end

補完関連。compinitは切って試してみるか…。

# zshzle
# `/' and `.' was removed from original/default setting
WORDCHARS="`echo $WORDCHARS|sed 's![/.]!!g'`"

# exception rule for globing
setopt EXTENDED_GLOB

autoload history-search-end
zle -N history-beginning-search-backward-end history-search-end
zle -N history-beginning-search-forward-end history-search-end
bindkey "^P" history-beginning-search-backward-end
bindkey "^N" history-beginning-search-forward-end

setopt list_packed
setopt correct
#autoload -U compinit
#compinit
2009年02月19日 (Thu) - 00:40:39 - その他雑記 - 13917x - permalink
Karma points: 12. Do you like this article? [yes/no]