Skip to content

Instantly share code, notes, and snippets.

@migrs
Created April 6, 2011 09:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save migrs/905368 to your computer and use it in GitHub Desktop.
Save migrs/905368 to your computer and use it in GitHub Desktop.
minimum dotfiles
escape ^Tt
defbce on
vbell off
termcapinfo xterm* ti@:te@
startup_message off
defhstatus ^En:^Et
maptimeout 0
autodetach on
altscreen on
defscrollback 10000
hardstatus alwayslastline "%{= rw} %H %{= wk}%-Lw%{= bw}%n%f* %t%{= wk}%+Lw %{= wk}%=%0`%{= gk} %y/%m/%d %c "
bind h focus left
bind l focus right
bind = resize =
bind + resize +1
bind - resize -1
bind _ resize max
bind . resize +10
bind , resize -10
set-option -g prefix C-t
unbind-key C-b
bind-key C-t send-prefix
#bind C-q run-shell 'reattach-to-user-namespace tmux-pbcopy' # for mac
#set-option -g default-command "reattach-to-user-namespace -l zsh" # for mac
set-option -g default-shell /bin/zsh
set-option -g status-interval 5
set-option -g status-left '#[fg=white]#[bg=red]#H#[default]'
#set-option -s status-left-length 20
set-option -g status-right '#(cut -d " " -f 1-3 /proc/loadavg) #[bg=yellow] #S #[bg=green]%m-%d(%a) %H:%M#[default]'
# set-option -g status-right '#(sysctl -n vm.loadavg | cut -d " " -f 2-4) #[bg=yellow] #S #[bg=green]%m-%d(%a) %H:%M#[default]' # for mac
set-option -g status-bg white
set-option -g status-fg black
set-window-option -g utf8 on
set-window-option -g window-status-current-bg blue
set-window-option -g window-status-current-fg white
#set-option -g mode-mouse on
#set-option -g mouse-resize-pane on
#set-option -g mouse-select-pane on
#set-option -g mouse-select-window on
syntax on
filetype on
filetype indent on
filetype plugin on
set encoding=utf-8
set termencoding=utf-8
set fileencodings=utf-8,iso-2022-jp-3,cp932,euc-jisx0213,ucs-2
set ambiwidth=double
set hlsearch
set nobackup
set expandtab
set smartindent
set shiftwidth=2
set softtabstop=2
set tabstop=2
set nowrap
set cmdheight=1
set notitle
set laststatus=2
alias ls='ls --color'
export LV='-Ou8 -c'
export LESS='-R'
export LESSOPEN='| /usr/share/source-highlight/src-hilite-lesspipe.sh %s'
bindkey -e
bindkey '^R' history-incremental-pattern-search-backward
bindkey '^S' history-incremental-pattern-search-forward
HISTFILE=~/.zsh_history
HISTSIZE=100000
SAVEHIST=100000
autoload -U compinit
compinit -u
setopt always_last_prompt # 補完のときプロンプトの位置を変えない
setopt auto_cd # ディレクトリ名を入力するだけでカレントディレクトリを変更
setopt auto_list # 補完候補が複数ある時に一覧表示
setopt auto_menu # 補完キーを連打するだけで順に補完候補を自動で補完
setopt auto_param_keys # カッコの対応などを自動的に補完
setopt auto_param_slash # ディレクトリ名の補完で末尾の / を自動的に付加し、次の補完に備える
setopt auto_pushd # cd 時に自動で pushd
setopt auto_resume # サスペンド中のプロセスと同じコマンド名を実行した場合はリジューム
setopt brace_ccl # {a-c} を a b c に展開する機能を使えるようにする
setopt complete_aliases # 補完される前にオリジナルのコマンドまで展開してチェックする
setopt complete_in_word # 語の途中でもカーソル位置で補完
setopt correct # スペルチェック
setopt equals # =command を command のパス名に展開する
setopt extended_glob # ファイル名で #, ~, ^ の 3 文字を正規表現として扱う
setopt extended_history # zsh の開始, 終了時刻をヒストリファイルに書き込む
setopt hist_ignore_all_dups # 重複したヒストリは追加しない
setopt hist_ignore_dups # 直前と同じコマンドラインはヒストリに追加しない
setopt hist_ignore_space # コマンドラインの先頭がスペースで始まる場合ヒストリに追加しない
setopt hist_no_store # history (fc -l) コマンドをヒストリリストから取り除く。
setopt hist_reduce_blanks # 余分なスペースを削除してヒストリに記録する
setopt hist_verify # ヒストリを呼び出してから実行する間に一旦編集できる状態になる
setopt interactive_comments # コマンドラインでも # 以降をコメントと見なす
setopt list_packed # 保管結果をできるだけ詰める
setopt list_types # 補完候補一覧でファイルの種別をマーク表示
setopt long_list_jobs # 内部コマンド jobs の出力をデフォルトで jobs -l にする
setopt magic_equal_subst # --prefix=/usr などの = 以降も補完
setopt mark_dirs # ファイル名の展開でディレクトリにマッチした場合末尾に / を付加する
setopt menu_complete # 補完候補が複数ある時、一覧表示 (auto_list) せず、すぐに最初の候補を補完する
setopt multios # 複数のリダイレクトやパイプなど、必要に応じて tee や cat の機能が使われる
setopt no_list_beep # 補完の時にベルを鳴らさない
setopt numeric_glob_sort # ファイル名の展開で、辞書順ではなく数値的にソートされるようになる
setopt print_exit_value # 戻り値が 0 以外の場合終了コードを表示する
setopt short_loops # for, repeat, select, if, function などで簡略文法が使えるようになる
setopt print_eight_bit # 8 ビット目を通すようになり、日本語のファイル名などを見れるようになる
setopt prompt_subst # 色を使う
setopt pushd_ignore_dups # 同じディレクトリを pushd しない
setopt notify # ジョブの状態をただちに知らせる
setopt share_history # シェルのプロセスごとに履歴を共有
bindkey -e
bindkey '^R' history-incremental-pattern-search-backward
bindkey '^S' history-incremental-pattern-search-forward
bindkey "^I" menu-complete
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 "^X^P" history-beginning-search-backward-end
bindkey "^X^N" history-beginning-search-forward-end
autoload -Uz colors
colors
PROMPT="%{%}%n@%m%{%}${WINDOW:+[$WINDOW]} %{%}%~
%{%}%* %{%}%#%{%} "
zstyle ':completion:*' group-name ''
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
zstyle ':completion:*' keep-prefix
zstyle ':completion:*:default' menu select=2
eval `dircolors`
zstyle ':completion:*:default' list-colors ${LS_COLORS}
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([%0-9]#)*=0=01;31'
zstyle ':completion:*' verbose yes
zstyle ':completion:*' completer _oldlist _complete _match _ignored _approximate _list _history _expand _prefix
zstyle ':completion:*:messages' format $fg_bold[yellow]'%d'$reset_color
zstyle ':completion:*:warnings' format $fg_bold[red]'No matches for:'$fg_bold[yellow]' %d'$reset_color
zstyle ':completion:*:descriptions' format $fg_bold[yellow]'%B%d%b'$reset_color
zstyle ':completion:*:corrections' format $fg_bold[yellow]'%B%d '$fg_bold[red]'(errors: %e)%b'$reset_color
zstyle ':completion:*:options' description 'yes'
autoload -Uz vcs_info
zstyle ':vcs_info:*' formats '(%s)-[%b]'
zstyle ':vcs_info:*' actionformats '(%s)-[%b|%a]'
precmd () {
psvar=()
LANG=en_US.UTF-8 vcs_info
[[ -n "$vcs_info_msg_0_" ]] && psvar[1]="$vcs_info_msg_0_"
}
RPROMPT="%1(v|%F{green}%1v%f|)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment