ZSHの設定

Cygwinを入れたので、晴れてMac時代と同じくZSHを使えるようになりました。
とは言っても、自分の場合、絶対にZSHじゃなきゃということは無く、ZSHらしい
使い方も特にしてないんですが。
 
なので、.zshrcの記述も大したことはなくこんな感じ。
 
autoload -U compinit
compinit -u
autoload colors
colors

setopt auto_pushd

zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
zstyle ':completion:*' list-colors 'di=34' 'ln=35' 'so=32' 'ex=31' 'bd=46;34' 'cd=43;34'

PROMPT="%{${fg[white]}%}[%n@%M %(3~,%-1~/.../%1~,%~)] %(!.#.$) %{${reset_color}%}"
PROMPT2="%{${fg[white]}%}%_> %{${reset_color}%}"
SPROMPT="%{${fg[red]}%}correct: %R -> %r [nyae]? %{${reset_color}%}"

# history
HISTSIZE=1000
HISTFILE=~/.zsh_history
SAVEHIST=1000
setopt hist_ignore_dups
setopt share_history

#export CLASSPATH="/Applications/Max5/Cycling '74/java/lib/max.jar":$CLASSPATH
#export GIT_EDITOR=/usr/bin/emacs
export LSCOLORS=exfxcxdxbxegedabagacad
#export CVS_RSH="ssh"

alias ls='ls --color=auto -F --show-control-chars'

bindkey "^f" beginning-of-line
bindkey "^l" end-of-line
bindkey "^d" backward-char
bindkey "^n" forward-char
bindkey "^h" up-line-or-history
bindkey "^t" down-line-or-history
bindkey "^b" delete-char-or-list
bindkey "^w" expand-or-complete
bindkey "^a" clear-screen
bindkey "^r" history-incremental-search-backward
#bindkey "^v" send-break
#bindkey "^c" kill-line
#bindkey "^${key[Space]}" set-mark-command
#bindkey "^g" copy-region-as-kill
#bindkey "^r" yank
 
色んなところからの拝借感すごいです。Macからそのまま持ってきて修正した
のは2行目の「compinit -u」の「-u」を追加したのと、20行目の「setopt share_history」
を追記した部分です。bindkeyはDovorak配列な自分用の変更です。

コメントをどうぞ

Your email address will not be published. Required fields are marked *

*