some dotfiles.
Last active
August 29, 2015 14:05
-
-
Save wnoguchi/d3a3efa1a45eca669574 to your computer and use it in GitHub Desktop.
Main dotfiles.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #key | |
| set-option -g prefix C-s | |
| unbind-key C-b | |
| bind-key C-s send-prefix | |
| bind s split-window -v | |
| bind v split-window -h | |
| bind j select-pane -D | |
| bind k select-pane -U | |
| bind h select-pane -L | |
| bind l select-pane -R | |
| bind -r < resize-pane -L 1 | |
| bind -r > resize-pane -R 1 | |
| bind -r - resize-pane -D 1 | |
| bind -r + resize-pane -U 1 | |
| bind : command-prompt | |
| bind C-i select-pane -t :.+ | |
| bind Escape copy-mode | |
| setw -g mode-keys vi | |
| # Synchronization | |
| bind e setw synchronize-panes on | |
| bind E setw synchronize-panes off | |
| # Layout even | |
| bind H select-layout even-horizontal | |
| bind V select-layout even-vertical | |
| # Reload tmux configuration | |
| bind R source-file ~/.tmux.conf | |
| #option | |
| set -g display-time 6000 | |
| set -g status-interval 30 | |
| set -g history-limit 5000 | |
| #set -g mouse-select-pane on | |
| #status line | |
| set -g status-right "#(w | head -1 | rev | cut -d',' -f1 | rev) | %Y/%m/%d (%a) %H:%M" | |
| setw -g window-status-format "#I:#W" | |
| setw -g window-status-current-format "#I:#W_#P" | |
| set -g status-bg black | |
| set -g status-fg cyan | |
| set -g status-left-fg black | |
| set -g status-left-bg magenta | |
| set -g status-right-fg black | |
| set -g status-right-bg green | |
| set -g status-right-length 100 | |
| set-window-option -g window-status-current-attr bright,reverse | |
| set-window-option -g window-status-current-bg cyan | |
| set-window-option -g window-status-current-fg black | |
| set-window-option -g xterm-keys on | |
| set-option -g default-terminal "screen-256color" | |
| bind '"' split-window -c "#{pane_current_path}" | |
| bind % split-window -h -c "#{pane_current_path}" | |
| bind c new-window -c "#{pane_current_path}" | |
| # or | |
| # New Tmux Panes go to the same directory as the current pane; new tmux windows go to home directory? - Unix & Linux Stack Exchange | |
| # http://unix.stackexchange.com/questions/101949/new-tmux-panes-go-to-the-same-directory-as-the-current-pane-new-tmux-windows-go | |
| #bind '"' split-window -c "$PWD" | |
| #bind % split-window -h -c "$PWD" | |
| #bind c new-window -c "$PWD" | |
| # Mac Specific Settings: | |
| #------------------------------------------------------------------- | |
| set-option -g default-command "reattach-to-user-namespace -l zsh" | |
| # Use vim keybindings in copy mode | |
| setw -g mode-keys vi | |
| # Setup 'v' to begin selection as in Vim | |
| bind-key -t vi-copy v begin-selection | |
| bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy" | |
| # Update default binding of `Enter` to also use copy-pipe | |
| unbind -t vi-copy Enter | |
| bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy" | |
| #------------------------------------------------------------------- | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| syntax on | |
| set title | |
| set tabstop=2 | |
| set smartindent | |
| set ignorecase | |
| set smartcase | |
| set wrapscan | |
| set autoindent | |
| set incsearch | |
| set laststatus=2 | |
| " Clipboard Sharing | |
| set clipboard+=unnamed | |
| " インサートモード時にバックスペースを使う for Mac | |
| set backspace=indent,eol,start | |
| "NeoBundle Scripts----------------------------- | |
| if has('vim_starting') | |
| set nocompatible " Be iMproved | |
| " Required: | |
| set runtimepath+=/Users/wnoguchi/.vim/bundle/neobundle.vim/ | |
| endif | |
| " Required: | |
| call neobundle#begin(expand('/Users/wnoguchi/.vim/bundle')) | |
| " Let NeoBundle manage NeoBundle | |
| " Required: | |
| NeoBundleFetch 'Shougo/neobundle.vim' | |
| " My Bundles here: | |
| NeoBundle 'Shougo/neosnippet.vim' | |
| NeoBundle 'Shougo/neosnippet-snippets' | |
| NeoBundle 'tpope/vim-fugitive' | |
| NeoBundle 'kien/ctrlp.vim' | |
| NeoBundle 'flazz/vim-colorschemes' | |
| " Scala | |
| NeoBundle 'derekwyatt/vim-scala' | |
| " Powerline | |
| NeoBundle 'alpaca-tc/alpaca_powertabline' | |
| NeoBundle 'Lokaltog/powerline', { 'rtp' : 'powerline/bindings/vim'} | |
| NeoBundle 'Lokaltog/powerline-fontpatcher' | |
| let g:Powerline_symbols = 'fancy' | |
| "let g:Powerline_symbols = 'compatible' | |
| set t_Co=256 | |
| " You can specify revision/branch/tag. | |
| NeoBundle 'Shougo/vimshell', { 'rev' : '3787e5' } | |
| " Required: | |
| call neobundle#end() | |
| " Required: | |
| filetype plugin indent on | |
| " If there are uninstalled bundles found on startup, | |
| " this will conveniently prompt you to install them. | |
| NeoBundleCheck | |
| "End NeoBundle Scripts------------------------- | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 少し凝った zshrc | |
| # License : MIT | |
| # http://mollifier.mit-license.org/ | |
| ######################################## | |
| # 環境変数 | |
| export LANG=ja_JP.UTF-8 | |
| # 色を使用出来るようにする | |
| autoload -Uz colors | |
| colors | |
| # emacs 風キーバインドにする | |
| bindkey -e | |
| # ヒストリの設定 | |
| HISTFILE=~/.zsh_history | |
| HISTSIZE=1000000 | |
| SAVEHIST=1000000 | |
| # プロンプト | |
| # 1行表示 | |
| # PROMPT="%~ %# " | |
| # 2行表示 | |
| PROMPT="%{${fg[red]}%}[%n@%m]%{${reset_color}%} %~ | |
| %# " | |
| # 単語の区切り文字を指定する | |
| autoload -Uz select-word-style | |
| select-word-style default | |
| # ここで指定した文字は単語区切りとみなされる | |
| # / も区切りと扱うので、^W でディレクトリ1つ分を削除できる | |
| zstyle ':zle:*' word-chars " /=;@:{},|" | |
| zstyle ':zle:*' word-style unspecified | |
| ######################################## | |
| # 補完 | |
| # 補完機能を有効にする | |
| autoload -Uz compinit | |
| compinit | |
| # 補完で小文字でも大文字にマッチさせる | |
| zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' | |
| # ../ の後は今いるディレクトリを補完しない | |
| zstyle ':completion:*' ignore-parents parent pwd .. | |
| # sudo の後ろでコマンド名を補完する | |
| zstyle ':completion:*:sudo:*' command-path /usr/local/sbin /usr/local/bin \ | |
| /usr/sbin /usr/bin /sbin /bin /usr/X11R6/bin | |
| # ps コマンドのプロセス名補完 | |
| zstyle ':completion:*:processes' command 'ps x -o pid,s,args' | |
| ######################################## | |
| # vcs_info | |
| 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|)" | |
| ######################################## | |
| # オプション | |
| # 日本語ファイル名を表示可能にする | |
| setopt print_eight_bit | |
| # beep を無効にする | |
| setopt no_beep | |
| # フローコントロールを無効にする | |
| setopt no_flow_control | |
| # '#' 以降をコメントとして扱う | |
| setopt interactive_comments | |
| # ディレクトリ名だけでcdする | |
| setopt auto_cd | |
| # cd したら自動的にpushdする | |
| setopt auto_pushd | |
| # 重複したディレクトリを追加しない | |
| setopt pushd_ignore_dups | |
| # = の後はパス名として補完する | |
| setopt magic_equal_subst | |
| # 同時に起動したzshの間でヒストリを共有する | |
| setopt share_history | |
| # 同じコマンドをヒストリに残さない | |
| setopt hist_ignore_all_dups | |
| # ヒストリファイルに保存するとき、すでに重複したコマンドがあったら古い方を削除する | |
| setopt hist_save_nodups | |
| # スペースから始まるコマンド行はヒストリに残さない | |
| setopt hist_ignore_space | |
| # ヒストリに保存するときに余分なスペースを削除する | |
| setopt hist_reduce_blanks | |
| # 補完候補が複数あるときに自動的に一覧表示する | |
| setopt auto_menu | |
| # 高機能なワイルドカード展開を使用する | |
| setopt extended_glob | |
| ######################################## | |
| # キーバインド | |
| # ^R で履歴検索をするときに * でワイルドカードを使用出来るようにする | |
| bindkey '^R' history-incremental-pattern-search-backward | |
| ######################################## | |
| # エイリアス | |
| alias la='ls -a' | |
| alias ll='ls -l' | |
| alias rm='rm -i' | |
| alias cp='cp -i' | |
| alias mv='mv -i' | |
| alias mkdir='mkdir -p' | |
| # sudo の後のコマンドでエイリアスを有効にする | |
| alias sudo='sudo ' | |
| # グローバルエイリアス | |
| alias -g L='| less' | |
| alias -g G='| grep' | |
| # C で標準出力をクリップボードにコピーする | |
| # mollifier delta blog : http://mollifier.hatenablog.com/entry/20100317/p1 | |
| if which pbcopy >/dev/null 2>&1 ; then | |
| # Mac | |
| alias -g C='| pbcopy' | |
| elif which xsel >/dev/null 2>&1 ; then | |
| # Linux | |
| alias -g C='| xsel --input --clipboard' | |
| elif which putclip >/dev/null 2>&1 ; then | |
| # Cygwin | |
| alias -g C='| putclip' | |
| fi | |
| ######################################## | |
| # OS 別の設定 | |
| case ${OSTYPE} in | |
| darwin*) | |
| #Mac用の設定 | |
| export CLICOLOR=1 | |
| alias ls='ls -G -F' | |
| ;; | |
| linux*) | |
| #Linux用の設定 | |
| ;; | |
| esac | |
| # rbenv | |
| eval "$(rbenv init -)" | |
| # awscli | |
| source aws_zsh_completer.sh | |
| export PATH=/opt/apache/apache-jmeter/latest/bin:$PATH | |
| export PATH=/opt/apache/apache-maven/latest/bin:$PATH | |
| export PATH=/opt/apache/apache-tomcat/latest/bin:$PATH | |
| export PATH=/opt/play/latest:$PATH | |
| export PATH=/opt/scala/latest/bin:$PATH | |
| export SVN_EDITOR=vim | |
| alias vi='vim' | |
| alias be='bundle exec' | |
| alias bi='bundle install --path vendor/bundle' | |
| alias binit='bundle init' | |
| # vim:set ft=zsh: | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment