annotate vimrc @ 3:8812f32e6124

09/05/25
author kent <kent@cr.ie.u-ryukyu.ac.jp>
date Mon, 25 May 2009 11:42:07 +0900
parents 6d5c73fe5744
children 4bf4065677ef
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 ""vim6.x用の設定ファイル
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 ""jvim3.xは .jvimrcを参照
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 " 1で改行を超えて削除可能、2で元からある字も削除可能
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 set backspace=2
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 " 括弧入力時の対応する括弧を表示
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 set showmatch
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 " ステータスラインを常に表示
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 set laststatus=2
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 " 長い行を折り返さない
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 set nowrap
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 " 新しいファイルを開いたとき、前のバッファを保存しなくても開ける。
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 set hid
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 " インクリメンタルサーチ
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 set incsearch
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 " 現在実行中のcommandを表示
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 set showcmd
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 " 現在のモードを表示
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 set showmode
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 " ステータスバーにrow,column表示
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 set ruler
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 " 行番号表示
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 set nonumber
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 " 検索文字列をハイライト
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 set hlsearch
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 " コマンドで行を越える
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 " <BS>,<SPACE>,h,l,←,→,~,←,→(insert)
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 set whichwrap=b,s,h,l,<,>,~,[,]
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 " マルチバイト文字なら自動改行を空白に関係なく行う
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 set formatoptions+=mB
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
31
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 " OSX用 C&P
3
8812f32e6124 09/05/25
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
33 map <F2> :w !nkf -s\|pbcopy<CR><CR>
8812f32e6124 09/05/25
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
34 map <F3> :r !pbpaste \|nkf -w<CR>
0
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
35
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 "文字コード
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 """vimが内部で使用する文字コード
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 """(編集中に変えてはいけない!起動時にのみ変更すること!)
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 """utf-8にするべき。そうすれば文字コード変換しても情報は失われない
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 set encoding=utf-8
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 """
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 """ターミナル及びキーボードに使われる文字コード
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 set termencoding=utf-8
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 """
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 """ファイル読み書き時の文字コード
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 set fileencoding=utf-8
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 """
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
48 """ファイルを読み込むときに試す文字コード
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 """順番に読み、成功したものがfileencodingに設定される。
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 """なければfileencodingは空になり、encodingがそのまま使われる。
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 set fileencodings=utf-8,iso-2022-jp,sjis,euc-jp,cp932,utf-8
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
52
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 """ファイルを開くときにエンコードを指定する方法
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 "" :e ++enc=utf-8 [filename] #省略したら開いてるファイルを開き直す
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
55
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
56
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
57
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 "改行コード
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 """ファイル読み書き時に使われる改行コード
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
60 set fileformat=unix
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
61 """ファイル読み込み時に試す改行コード、info参照。下手に変えない方が良い?
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
62 """新しいファイルを作成したときは最初のコードが使われる
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
63 set fileformats=unix,mac,dos
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
64
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
65
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
66 " タブ文字の見かけの幅
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
67 set tabstop=8
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
68 " autoindentや'>'のインデント幅(tab幅はかわらない)
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
69 set shiftwidth=4
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
70 " TABを入力した時のインデント幅(8以下ならSpaceが入る)
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
71 "set softtabstop
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
72 " 改行時にオートでインデントを行う
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
73 set autoindent """noautoindent
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
74 " C言語に特化したオートインデント
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
75 set nocindent """cindent
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
76 " タブの変わりにスペースを使用する
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
77 "set expandtab """noexpandtab
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
78 set noexpandtab
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
79
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
80 autocmd BufReadPost *.cbc set filetype=cbc
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
81
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
82 "map
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
83 " C-b でバック
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
84 "map D
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
85 " C-f でフォワード
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 "map C
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
87
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
88 """ステータスバー表示
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
89 set statusline=%<%f\ %m%r%h%w%{'['.(&fenc!=''?&fenc:&enc).']['.&ff.']'}%=%l,%c%V%8P
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
90
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
91 " バックグラウンドがどちらかを知らせる
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
92 "set background={dark,light}
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
93 """カラー表示オフ
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
94 syntax on
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
95 """カラースキーマの指定
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
96 """/usr/share/vim/vim62/colors/*
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
97 """~/.vim/colors/*
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
98 """内のスクリプト名を指定
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
99 "colorscheme zellner
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
100 colorscheme desert
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
101
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
102
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
103 """GLOBAL設定
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
104 """/usr/local/share/vim/vim70/plugin/にgtags.vimをいれる
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
105 """
3
8812f32e6124 09/05/25
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
106 map <C-]> :Gtags<CR>
8812f32e6124 09/05/25
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
107 "map <C-]> :GtagsCursor<CR>
0
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
108 "map <C-n> :cn<CR>
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
109 "map <C-p> :cp<CR>
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
110
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
111
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
112 """ vim-latex
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
113 " REQUIRED. This makes vim invoke latex-suite when you open a tex file.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
114 filetype plugin on
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
115 " IMPORTANT: win32 users will need to have 'shellslash' set so that latex
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
116 " can be called correctly.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
117 "set shellslash
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
118 " IMPORTANT: grep will sometimes skip displaying the file name if you
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
119 " search in a singe file. This will confuse latex-suite. Set your grep
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
120 " program to alway generate a file-name.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
121 set grepprg=grep\ -nH\ $*
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
122 " OPTIONAL: This enables automatic indentation as you type.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
123 filetype indent on
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
124 " when open empty file named *.tex
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
125 let g:tex_flavor = "latex"
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
126 """ vim-latex end
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
127
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
128
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
129
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
130
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
131
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
132
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
133
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
134 """ VIM commands
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
135 "
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
136 " **FOLDING**
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
137 " zf :fold some lines.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
138 " zfap : fold a paragraph.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
139 " zf2j : fold two lines under cursor.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
140 " zo :open the folded lines.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
141 " zc :re-fold (close).
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
142 " zr :reduce the fold level. zR: reduce all.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
143 " zm :increase fold level. zM: fold all.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
144 " :set foldmethod :syntax, indent, ...
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
145 " :set foldcolumn : show folding state in left of window.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
146 "
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
147 " **WINDOWING**" CTRL-W s (split [file]) : separate window horizontaly.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
148 " CTRL-W v (vsplit [file]) : separate window verticaly.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
149 " CTRL-W c : close current window.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
150 " CTRL-W CTRL-W :move cursor to next window.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
151 " CTRL-W {hjkl} :move cursor to [lbtr].
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
152 " CTRL-W {+-} :{in,de}crease window space.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
153 " CTRL-W = :set window space equality.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
154 " CTRL-W {HJKL} :move `window' to the far [lbtr]
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
155 "
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
156 "
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
157 " **MOVING COMMAND**
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
158 " w :move to the start of the next word.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
159 " e :move to the end of the next word.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
160 " b :move to the start of the previous word.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
161 " ge :move to the end of the next word.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
162 "
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
163 " ^ :move to the first non-blank character.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
164 " 0 :move to the very first character.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
165 " $ :move to the end of a line
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
166 "
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
167 " fx :move to the first find 'x' character.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
168 " Fx :search toward left.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
169 " tx :move to before one, the first find 'x' character.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
170 " Tx :search toward left.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
171 " ; :repeat f,F,t,T
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
172 " , :reverse repeat f,F,t,T
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
173 "
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
174 " % :move to the matching parentisis.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
175 " n% :move to the line on n-% of a file.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
176 "
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
177 " G :move to the end of a file.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
178 " gg :move to the start of a file.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
179 " ngg | nG :move to the n-th line.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
180 "
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
181 " H :move to first line of the window.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
182 " M :move to the line on half window.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
183 " L :move to final line of the window.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
184 "
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
185 " CTRL-F :scroll up the window.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
186 " CTRL-B :scroll down the window.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
187 " CTRL-U :scroll up the window half.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
188 " CTRL-D :scroll down the window half.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
189 " CTRL-Y :scroll up the window by one line.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
190 " CTRL-E :scroll down the window by one line.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
191 "
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
192 " zz :SCROLl the window until the cursor is center of the window.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
193 " zt :scroll the window until the cursor is top of the window.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
194 " zb :scroll the window until the cursor is bottom of the window.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
195 "
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
196 " /string :search 'string'
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
197 " ?string :search 'string' toward left.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
198 " * :search string under the cursor.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
199 " # :search string under the cursor toward left.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
200 " n :repeat / or ?.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
201 " N :reverse repeat / or ?.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
202 "
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
203 " CTRL-O :move to before jump position.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
204 " CTRL-I :back to the position before CTRL-O.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
205 " '' | `` :CTRL-O and CTRL-I.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
206 "
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
207 "
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
208 " **EDITTING COMMAND**
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
209 " i :start insert-mode on the cursor.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
210 " I :start insert-mode on the start of the line.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
211 " a :start insert-mode on the next character of one cursor pointing.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
212 " A :start insert-mode on the end of the line.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
213 "
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
214 " d[c] :delete from current location to the place where the cursor move to.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
215 " [c] is moving command.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
216 " c[c] :delete as like d comamnd and start insert-mode.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
217 "
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
218 " x : dl
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
219 " X : dh
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
220 " D : d$
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
221 " C : c$
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
222 " s : cl
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
223 " S : cc
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
224 " r[x] : replace a character under the cursor with [x]
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
225 " R :replace mode
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
226 "
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
227 " . :repeats the last change command except for UNDO, REDO and :-COMMAND.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
228 "
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
229 " p :places the text below or after the cursor.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
230 " P :places the text abobe or before the cursor.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
231 " y :yank text (similar d)
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
232 "
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
233 " ~ :change case of the character under the cursor, and move the cursor to next character.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
234 "
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
235 "
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
236 "
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
237 " **VISUAL MODE**
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
238 " v or V or CTRL-V start visual mode.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
239 " v : delete from the place that mode started to place where press d key.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
240 " V : delete lines that is selected.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
241 " CTRL-V : delete rectangular block
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
242 "
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
243 " d :delete from the place where visual-mode started to current position.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
244 " o | O :switch cursor with the place where visual mode started.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
245 "
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
246 "
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
247 " **TEXT OBJECT**
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
248 " aw :A word.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
249 " as :A sentence.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
250 " iw :Inner word.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
251 " is :Inner sentence.
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
252 "
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
253 "
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
254