質問編集履歴
1
vimrcの中身
test
CHANGED
File without changes
|
test
CHANGED
@@ -15,3 +15,353 @@
|
|
15
15
|
全部が左端によってしまいます。
|
16
16
|
|
17
17
|
.vimrcに何かまずい設定を書いているのでしょうか?
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
↓vimrcの内容です
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
```vim
|
26
|
+
|
27
|
+
set background=dark
|
28
|
+
|
29
|
+
colorscheme solarized
|
30
|
+
|
31
|
+
let g:solarized_termcolors=256
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
" Note: Skip initialization for vim-tiny or vim-small.
|
36
|
+
|
37
|
+
if 0 | endif
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
if has('vim_starting')
|
42
|
+
|
43
|
+
if &compatible
|
44
|
+
|
45
|
+
set nocompatible " Be iMproved
|
46
|
+
|
47
|
+
endif
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
" Required:
|
52
|
+
|
53
|
+
set runtimepath+=~/.vim/bundle/neobundle.vim/
|
54
|
+
|
55
|
+
endif
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
" Required:
|
60
|
+
|
61
|
+
call neobundle#begin(expand('~/.vim/bundle/'))
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
" Let NeoBundle manage NeoBundle
|
66
|
+
|
67
|
+
" Required:
|
68
|
+
|
69
|
+
NeoBundleFetch 'Shougo/neobundle.vim'
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
" My Bundles here:
|
74
|
+
|
75
|
+
" Refer to |:NeoBundle-examples|.
|
76
|
+
|
77
|
+
" Note: You don't set neobundle setting in .gvimrc!
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
call neobundle#end()
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
" Required:
|
86
|
+
|
87
|
+
" filetype plugin indent on
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
" If there are uninstalled bundles found on startup,
|
92
|
+
|
93
|
+
" this will conveniently prompt you to install them.
|
94
|
+
|
95
|
+
NeoBundleCheck
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
if has('vim_starting')
|
100
|
+
|
101
|
+
set nocompatible " Be iMproved
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
" Required:
|
106
|
+
|
107
|
+
set runtimepath+=~/.vim/bundle/neobundle.vim/
|
108
|
+
|
109
|
+
endif
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
" Required:
|
114
|
+
|
115
|
+
call neobundle#begin(expand('~/.vim/bundle/'))
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
" Let NeoBundle manage NeoBundle
|
120
|
+
|
121
|
+
" Required:
|
122
|
+
|
123
|
+
NeoBundleFetch 'Shougo/neobundle.vim'
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
" My Bundles here:
|
128
|
+
|
129
|
+
NeoBundle 'Shougo/neosnippet.vim'
|
130
|
+
|
131
|
+
NeoBundle 'Shougo/neosnippet-snippets'
|
132
|
+
|
133
|
+
NeoBundle 'tpope/vim-fugitive'
|
134
|
+
|
135
|
+
NeoBundle 'kien/ctrlp.vim'
|
136
|
+
|
137
|
+
NeoBundle 'flazz/vim-colorschemes'
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
" You can specify revision/branch/tag.
|
144
|
+
|
145
|
+
NeoBundle 'Shougo/vimshell', { 'rev' : '3787e5' }
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
call neobundle#end()
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
" If there are uninstalled bundles found on startup,
|
154
|
+
|
155
|
+
" this will conveniently prompt you to install them.
|
156
|
+
|
157
|
+
NeoBundleCheck
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
NeoBundle 'scrooloose/nerdtree'
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
" 隠しファイルをデフォルトで表示させる
|
170
|
+
|
171
|
+
let NERDTreeShowHidden = 1
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
" デフォルトでツリーを表示させる
|
176
|
+
|
177
|
+
autocmd VimEnter * execute 'NERDTree'
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
" Gitを便利に使う
|
182
|
+
|
183
|
+
NeoBundle 'tpope/vim-fugitive'
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
" grep検索の実行後にQuickFix Listを表示する
|
188
|
+
|
189
|
+
autocmd QuickFixCmdPost *grep* cwindow
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
" ステータス行に現在のgitブランチを表示する
|
194
|
+
|
195
|
+
"set statusline+=%{fugitive#statusline()}
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
" Ruby向けにendを自動挿入してくれる
|
200
|
+
|
201
|
+
NeoBundle 'tpope/vim-endwise'
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
" コメントON/OFFを手軽に実行
|
206
|
+
|
207
|
+
NeoBundle 'tomtom/tcomment_vim'
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
" インデントの可視化
|
212
|
+
|
213
|
+
NeoBundle 'nathanaelkane/vim-indent-guides'
|
214
|
+
|
215
|
+
let g:indent_guides_enable_on_vim_startup=1
|
216
|
+
|
217
|
+
let g:indent_guides_start_level=2
|
218
|
+
|
219
|
+
let g:indent_guides_auto_colors=0
|
220
|
+
|
221
|
+
autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd ctermbg=235
|
222
|
+
|
223
|
+
autocmd VimEnter,Colorscheme * :hi IndentGuidesEven ctermbg=234
|
224
|
+
|
225
|
+
let g:indent_guides_color_change_percent = 30
|
226
|
+
|
227
|
+
let g:indent_guides_guide_size = 2
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
" 行番号を表示
|
236
|
+
|
237
|
+
set nu
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
" スワップファイルを作らない
|
242
|
+
|
243
|
+
set noswapfile
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
" 画面最下行にルーラーを表示する
|
248
|
+
|
249
|
+
set ruler
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
" ステータスラインを常に表示する
|
254
|
+
|
255
|
+
set laststatus=2
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
" ビープの代わりにビジュアルベル(画面フラッシュ)を使う
|
260
|
+
|
261
|
+
set visualbell
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
" そしてビジュアルベルも無効化する
|
266
|
+
|
267
|
+
set t_vb=
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
" 全モードでマウスを有効化
|
272
|
+
|
273
|
+
set mouse=a
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
" コマンドラインの高さを2行に
|
278
|
+
|
279
|
+
set cmdheight=2
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
"------------------------------------------------------------
|
286
|
+
|
287
|
+
" インデント関連のオプション {{{1
|
288
|
+
|
289
|
+
"
|
290
|
+
|
291
|
+
" タブ文字の代わりにスペース2個を使う場合の設定。
|
292
|
+
|
293
|
+
" この場合、'tabstop'はデフォルトの8から変えない。
|
294
|
+
|
295
|
+
set shiftwidth=2
|
296
|
+
|
297
|
+
set softtabstop=2
|
298
|
+
|
299
|
+
set expandtab
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
" オートインデントをしない
|
304
|
+
|
305
|
+
set noautoindent
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
autocmd FileType * setlocal formatoptions-=ro
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
set paste
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
syntax enable
|
318
|
+
|
319
|
+
syntax on
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
set hlsearch
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
"タブ、空白、改行の可視化
|
334
|
+
|
335
|
+
set list
|
336
|
+
|
337
|
+
set listchars=tab:>.,trail:_,eol:↲,extends:>,precedes:<,nbsp:%
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
"全角スペースをハイライト表示
|
342
|
+
|
343
|
+
function! ZenkakuSpace()
|
344
|
+
|
345
|
+
highlight ZenkakuSpace cterm=reverse ctermfg=DarkMagenta gui=reverse guifg=DarkMagenta
|
346
|
+
|
347
|
+
endfunction
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
if has('syntax')
|
352
|
+
|
353
|
+
augroup ZenkakuSpace
|
354
|
+
|
355
|
+
autocmd!
|
356
|
+
|
357
|
+
autocmd ColorScheme * call ZenkakuSpace()
|
358
|
+
|
359
|
+
autocmd VimEnter,WinEnter * match ZenkakuSpace / /
|
360
|
+
|
361
|
+
augroup END
|
362
|
+
|
363
|
+
call ZenkakuSpace()
|
364
|
+
|
365
|
+
endif
|
366
|
+
|
367
|
+
```
|