1594
コメント:
|
6013
|
削除された箇所はこのように表示されます。 | 追加された箇所はこのように表示されます。 |
行 1: | 行 1: |
#acl alstamber:read,write,admin,revert,delete All:read | |
行 2: | 行 3: |
だいぶ前に書いたまま使ってるやつ。あまり参考にはならない系。 | |
行 90: | 行 92: |
noremap ; : | noremap ; : "for US-Key |
行 99: | 行 101: |
== .zshrc == {{{#!highlight tcsh # alstamber's .zshrc file # Ryutaro Yamamoto <alstamber@gmail.com> # http://wiki.mma.club.uec.ac.jp/alstamber/ autoload colors colors autoload -U compinit compinit WORDCHARS='*?_-.[~=&;!#$%^({<>})]' umask 022 #履歴による予測 autoload -U predict-on #git-compを動作させるための記述 autoload -Uz VCS_INFO_get_data_git; VCS_INFO_get_data_git 2> /dev/null #文字コード,Editor export LANG=ja_JP.UTF-8 export EDITOR=vim setopt prompt_subst #プロンプト変数を展開 setopt no_beep #音を鳴らさない setopt no_list_beep bindkey -e #emacsキーバインド HISTFILE=~/.zsh_history SAVEHIST=100000 HISTSIZE=100000 #gitのbranchの状況を表示する関数 function rprompt-git-current-branch() { local name st color gitdir action if [[ "$PWD" =~ '/\.git(/.*)?$' ]]; then return fi name=`git branch 2> /dev/null | grep '^\*' | cut -b 3- ` if [[ -z $name ]]; then return fi gitdir=`git rev-parse --git-dir 2> /dev/null` action=`VCS_INFO_git_getaction "$gitdir"` && action="($action)" st=`git status 2> /dev/null` if [[ -n `echo "$st" | grep "^nothing to"` ]]; then color=%F{green} elif [[ -n `echo "$st" | grep "^nothing added"` ]]; then color=%F{yellow} elif [[ -n `echo "$st" | grep "^# Untracked"` ]]; then color=%B%F{red} else color=%F{red} fi echo "$color$name$action%f%b " } #プロンプト PROMPT="%B%F{cyan}%n@%M%f%b %# " RPROMPT='$(rprompt-git-current-branch)[%F{yellow}%~%f%b]' SPROMPT="%F{red}Correct %f> '%r' [%BY%bes %BN%bo %BA%bbort %BE%bdit] ? " setopt hist_ignore_dups #同じコマンドは履歴に入れない setopt share_history #履歴の共有 setopt hist_ignore_space #スペースだけのコマンドは履歴に入れない setopt notify #ジョブの状態を直ちに知らせる setopt print_eight_bit # 8ビット目を通す setopt auto_menu #tabで補完を切り替える setopt auto_list #候補が複数あるときその候補を自動で出す setopt correct #コマンドのスペルチェック setopt list_packed #補完候補を詰めて表示 setopt complete_aliases #aliasesを展開する setopt auto_param_keys #括弧の対応などを補完 setopt magic_equal_subst #equal以降でも補完できるようにする setopt auto_cd #cdを使わなくてもいいようにする setopt auto_pushd #ディレクトリ移動履歴を自動的にスタックにプッシュ setopt pushd_ignore_dups #重複するディレクトリはプッシュしない setopt append_history #履歴は上書きではなくて追加 setopt auto_param_slash #ディレクトリならスラッシュを補う setopt correct_all #ファイル名もスペルチェック setopt extended_glob #正規表現を拡張 setopt glob_dots # .で始まるファイル名にマッチさせる時明示的に.を書かなくても良い setopt hist_expire_dups_first #履歴に追加するとき、古いものと同じなら古いものを削除する setopt hist_reduce_blanks #履歴には余分な空白を記録しない setopt hist_no_store # historyコマンドは履歴に入れない setopt list_types # 補完するときファイルの種別を表示 setopt numeric_glob_sort # 数字を数値と解釈してソート setopt mark_dirs # ファイル名の展開でディレクトリにマッチした時スラッシュをつける setopt no_flow_control # disable C-q, C-s setopt always_last_prompt #無駄なスクロールをしない setopt auto_remove_slash #無駄な末尾のスラッシュは削除 alias vi="vim" alias ls="ls -G -w" alias ll="ls -alF" alias gd='dirs -v; echo -n "select number: "; read newdir;cd `eval echo ~+${newdir}`' zstyle ':completion:*:default' menu select true #補完候補を矢印で移動できるようにする zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} zstyle ':completion:*' use-cache true zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' #補完するとき大文字小文字を区別しない limit coredumpsize 102400 #コアダンプサイズを制限 }}} |
.vimrc
だいぶ前に書いたまま使ってるやつ。あまり参考にはならない系。
1 " display
2
3 syntax on
4
5 set number
6 set ruler
7 set cmdheight=2
8 set laststatus=2
9 set title
10 set linespace=4
11 set wildmenu
12 set showcmd
13 set list
14 set listchars=tab:>\
15 set shortmess+=I
16 set statusline=%<%f\ %m%r%h%w%{'['.(&fenc!=''?&fenc:&enc).']['.&ff.']'}%=%l,%c%V%8P
17
18 " search
19 set ignorecase
20 set smartcase
21 set wrapscan
22 set hlsearch
23 set incsearch
24
25 " edit
26 set autoindent
27 set cindent
28 set showmatch
29 set backspace=indent,eol,start
30 set clipboard=unnamed
31 set pastetoggle=<F12>
32 set guioptions+=a
33
34 " tab
35 set tabstop=4
36 set expandtab
37 set smarttab
38 set shiftwidth=4
39 set shiftround
40 set nowrap
41 set smartindent
42
43 " keymap
44 set bioskey
45 set timeout
46 set timeoutlen=500
47 let mapleader=','
48
49 noremap j gj
50 noremap k gk
51 noremap gj j
52 noremap gk k
53
54 inoremap <C-h> <Left>
55 inoremap <C-j> <Down>
56 inoremap <C-k> <Up>
57 inoremap <C-l> <Right>
58
59 inoremap <C-d> <Del>
60 noremap <CR> i<CR><ESC>
61
62 inoremap {} {}<LEFT>
63 inoremap [] []<LEFT>
64 inoremap () ()<LEFT>
65 inoremap "" ""<LEFT>
66 inoremap '' ''<LEFT>
67 inoremap <> <><LEFT>
68 inoremap []5 [% %]<LEFT><LEFT><LEFT>
69
70 nnoremap n nzz
71 nnoremap N Nzz
72 nnoremap * *zz
73 nnoremap # #zz
74 nnoremap g* g*zz
75 nnoremap g# g#zz
76
77 nnoremap <silent> <C-x>1 :only<CR>
78 nnoremap <silent> <C-x>2 :sp<CR>
79 nnoremap <silent> <C-x>3 :vsp<CR>
80
81 nnoremap <silent> bb :b#<CR>
82 nnoremap <silent> bp :bp<CR>
83 nnoremap <silent> bn :bn<CR>
84 nnoremap <silent> bd :bd<CR>
85 nnoremap ls :ls<CR>:b
86
87 noremap ; : "for US-Key
88 noremap : ;
89
90 set nobackup
91 set autoread
92 set noswapfile
93 set hidden
94 autocmd BufWritePre * :%s/\s\+$//ge
.zshrc
1 # alstamber's .zshrc file
2 # Ryutaro Yamamoto <alstamber@gmail.com>
3 # http://wiki.mma.club.uec.ac.jp/alstamber/
4
5 autoload colors
6 colors
7 autoload -U compinit
8 compinit
9
10 WORDCHARS='*?_-.[~=&;!#$%^({<>})]'
11
12 umask 022
13
14 #履歴による予測
15 autoload -U predict-on
16
17 #git-compを動作させるための記述
18 autoload -Uz VCS_INFO_get_data_git; VCS_INFO_get_data_git 2> /dev/null
19
20 #文字コード,Editor
21 export LANG=ja_JP.UTF-8
22 export EDITOR=vim
23
24
25 setopt prompt_subst #プロンプト変数を展開
26 setopt no_beep #音を鳴らさない
27 setopt no_list_beep
28
29 bindkey -e #emacsキーバインド
30
31 HISTFILE=~/.zsh_history
32 SAVEHIST=100000
33 HISTSIZE=100000
34
35
36 #gitのbranchの状況を表示する関数
37 function rprompt-git-current-branch() {
38 local name st color gitdir action
39
40 if [[ "$PWD" =~ '/\.git(/.*)?$' ]]; then
41 return
42 fi
43 name=`git branch 2> /dev/null | grep '^\*' | cut -b 3- `
44 if [[ -z $name ]]; then
45 return
46 fi
47
48 gitdir=`git rev-parse --git-dir 2> /dev/null`
49 action=`VCS_INFO_git_getaction "$gitdir"` && action="($action)"
50 st=`git status 2> /dev/null`
51 if [[ -n `echo "$st" | grep "^nothing to"` ]]; then
52 color=%F{green}
53 elif [[ -n `echo "$st" | grep "^nothing added"` ]]; then
54 color=%F{yellow}
55 elif [[ -n `echo "$st" | grep "^# Untracked"` ]]; then
56 color=%B%F{red}
57 else
58 color=%F{red}
59 fi
60
61 echo "$color$name$action%f%b "
62 }
63
64 #プロンプト
65 PROMPT="%B%F{cyan}%n@%M%f%b %# "
66 RPROMPT='$(rprompt-git-current-branch)[%F{yellow}%~%f%b]'
67 SPROMPT="%F{red}Correct %f> '%r' [%BY%bes %BN%bo %BA%bbort %BE%bdit] ? "
68
69
70
71 setopt hist_ignore_dups #同じコマンドは履歴に入れない
72 setopt share_history #履歴の共有
73 setopt hist_ignore_space #スペースだけのコマンドは履歴に入れない
74 setopt notify #ジョブの状態を直ちに知らせる
75 setopt print_eight_bit # 8ビット目を通す
76 setopt auto_menu #tabで補完を切り替える
77 setopt auto_list #候補が複数あるときその候補を自動で出す
78 setopt correct #コマンドのスペルチェック
79 setopt list_packed #補完候補を詰めて表示
80 setopt complete_aliases #aliasesを展開する
81 setopt auto_param_keys #括弧の対応などを補完
82 setopt magic_equal_subst #equal以降でも補完できるようにする
83 setopt auto_cd #cdを使わなくてもいいようにする
84 setopt auto_pushd #ディレクトリ移動履歴を自動的にスタックにプッシュ
85 setopt pushd_ignore_dups #重複するディレクトリはプッシュしない
86 setopt append_history #履歴は上書きではなくて追加
87 setopt auto_param_slash #ディレクトリならスラッシュを補う
88 setopt correct_all #ファイル名もスペルチェック
89 setopt extended_glob #正規表現を拡張
90 setopt glob_dots # .で始まるファイル名にマッチさせる時明示的に.を書かなくても良い
91 setopt hist_expire_dups_first #履歴に追加するとき、古いものと同じなら古いものを削除する
92 setopt hist_reduce_blanks #履歴には余分な空白を記録しない
93 setopt hist_no_store # historyコマンドは履歴に入れない
94 setopt list_types # 補完するときファイルの種別を表示
95 setopt numeric_glob_sort # 数字を数値と解釈してソート
96 setopt mark_dirs # ファイル名の展開でディレクトリにマッチした時スラッシュをつける
97 setopt no_flow_control # disable C-q, C-s
98 setopt always_last_prompt #無駄なスクロールをしない
99 setopt auto_remove_slash #無駄な末尾のスラッシュは削除
100
101
102
103
104 alias vi="vim"
105 alias ls="ls -G -w"
106 alias ll="ls -alF"
107 alias gd='dirs -v; echo -n "select number: "; read newdir;cd `eval echo ~+${newdir}`'
108
109
110 zstyle ':completion:*:default' menu select true #補完候補を矢印で移動できるようにする
111 zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
112 zstyle ':completion:*' use-cache true
113 zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' #補完するとき大文字小文字を区別しない
114
115 limit coredumpsize 102400 #コアダンプサイズを制限