質問編集履歴
1
vimrcの中身
title
CHANGED
File without changes
|
body
CHANGED
@@ -6,4 +6,179 @@
|
|
6
6
|
3.=を入力
|
7
7
|
|
8
8
|
全部が左端によってしまいます。
|
9
|
-
.vimrcに何かまずい設定を書いているのでしょうか?
|
9
|
+
.vimrcに何かまずい設定を書いているのでしょうか?
|
10
|
+
|
11
|
+
↓vimrcの内容です
|
12
|
+
|
13
|
+
```vim
|
14
|
+
set background=dark
|
15
|
+
colorscheme solarized
|
16
|
+
let g:solarized_termcolors=256
|
17
|
+
|
18
|
+
" Note: Skip initialization for vim-tiny or vim-small.
|
19
|
+
if 0 | endif
|
20
|
+
|
21
|
+
if has('vim_starting')
|
22
|
+
if &compatible
|
23
|
+
set nocompatible " Be iMproved
|
24
|
+
endif
|
25
|
+
|
26
|
+
" Required:
|
27
|
+
set runtimepath+=~/.vim/bundle/neobundle.vim/
|
28
|
+
endif
|
29
|
+
|
30
|
+
" Required:
|
31
|
+
call neobundle#begin(expand('~/.vim/bundle/'))
|
32
|
+
|
33
|
+
" Let NeoBundle manage NeoBundle
|
34
|
+
" Required:
|
35
|
+
NeoBundleFetch 'Shougo/neobundle.vim'
|
36
|
+
|
37
|
+
" My Bundles here:
|
38
|
+
" Refer to |:NeoBundle-examples|.
|
39
|
+
" Note: You don't set neobundle setting in .gvimrc!
|
40
|
+
|
41
|
+
call neobundle#end()
|
42
|
+
|
43
|
+
" Required:
|
44
|
+
" filetype plugin indent on
|
45
|
+
|
46
|
+
" If there are uninstalled bundles found on startup,
|
47
|
+
" this will conveniently prompt you to install them.
|
48
|
+
NeoBundleCheck
|
49
|
+
|
50
|
+
if has('vim_starting')
|
51
|
+
set nocompatible " Be iMproved
|
52
|
+
|
53
|
+
" Required:
|
54
|
+
set runtimepath+=~/.vim/bundle/neobundle.vim/
|
55
|
+
endif
|
56
|
+
|
57
|
+
" Required:
|
58
|
+
call neobundle#begin(expand('~/.vim/bundle/'))
|
59
|
+
|
60
|
+
" Let NeoBundle manage NeoBundle
|
61
|
+
" Required:
|
62
|
+
NeoBundleFetch 'Shougo/neobundle.vim'
|
63
|
+
|
64
|
+
" My Bundles here:
|
65
|
+
NeoBundle 'Shougo/neosnippet.vim'
|
66
|
+
NeoBundle 'Shougo/neosnippet-snippets'
|
67
|
+
NeoBundle 'tpope/vim-fugitive'
|
68
|
+
NeoBundle 'kien/ctrlp.vim'
|
69
|
+
NeoBundle 'flazz/vim-colorschemes'
|
70
|
+
|
71
|
+
|
72
|
+
" You can specify revision/branch/tag.
|
73
|
+
NeoBundle 'Shougo/vimshell', { 'rev' : '3787e5' }
|
74
|
+
|
75
|
+
call neobundle#end()
|
76
|
+
|
77
|
+
" If there are uninstalled bundles found on startup,
|
78
|
+
" this will conveniently prompt you to install them.
|
79
|
+
NeoBundleCheck
|
80
|
+
|
81
|
+
|
82
|
+
NeoBundle 'scrooloose/nerdtree'
|
83
|
+
|
84
|
+
|
85
|
+
" 隠しファイルをデフォルトで表示させる
|
86
|
+
let NERDTreeShowHidden = 1
|
87
|
+
|
88
|
+
" デフォルトでツリーを表示させる
|
89
|
+
autocmd VimEnter * execute 'NERDTree'
|
90
|
+
|
91
|
+
" Gitを便利に使う
|
92
|
+
NeoBundle 'tpope/vim-fugitive'
|
93
|
+
|
94
|
+
" grep検索の実行後にQuickFix Listを表示する
|
95
|
+
autocmd QuickFixCmdPost *grep* cwindow
|
96
|
+
|
97
|
+
" ステータス行に現在のgitブランチを表示する
|
98
|
+
"set statusline+=%{fugitive#statusline()}
|
99
|
+
|
100
|
+
" Ruby向けにendを自動挿入してくれる
|
101
|
+
NeoBundle 'tpope/vim-endwise'
|
102
|
+
|
103
|
+
" コメントON/OFFを手軽に実行
|
104
|
+
NeoBundle 'tomtom/tcomment_vim'
|
105
|
+
|
106
|
+
" インデントの可視化
|
107
|
+
NeoBundle 'nathanaelkane/vim-indent-guides'
|
108
|
+
let g:indent_guides_enable_on_vim_startup=1
|
109
|
+
let g:indent_guides_start_level=2
|
110
|
+
let g:indent_guides_auto_colors=0
|
111
|
+
autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd ctermbg=235
|
112
|
+
autocmd VimEnter,Colorscheme * :hi IndentGuidesEven ctermbg=234
|
113
|
+
let g:indent_guides_color_change_percent = 30
|
114
|
+
let g:indent_guides_guide_size = 2
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
" 行番号を表示
|
119
|
+
set nu
|
120
|
+
|
121
|
+
" スワップファイルを作らない
|
122
|
+
set noswapfile
|
123
|
+
|
124
|
+
" 画面最下行にルーラーを表示する
|
125
|
+
set ruler
|
126
|
+
|
127
|
+
" ステータスラインを常に表示する
|
128
|
+
set laststatus=2
|
129
|
+
|
130
|
+
" ビープの代わりにビジュアルベル(画面フラッシュ)を使う
|
131
|
+
set visualbell
|
132
|
+
|
133
|
+
" そしてビジュアルベルも無効化する
|
134
|
+
set t_vb=
|
135
|
+
|
136
|
+
" 全モードでマウスを有効化
|
137
|
+
set mouse=a
|
138
|
+
|
139
|
+
" コマンドラインの高さを2行に
|
140
|
+
set cmdheight=2
|
141
|
+
|
142
|
+
|
143
|
+
"------------------------------------------------------------
|
144
|
+
" インデント関連のオプション {{{1
|
145
|
+
"
|
146
|
+
" タブ文字の代わりにスペース2個を使う場合の設定。
|
147
|
+
" この場合、'tabstop'はデフォルトの8から変えない。
|
148
|
+
set shiftwidth=2
|
149
|
+
set softtabstop=2
|
150
|
+
set expandtab
|
151
|
+
|
152
|
+
" オートインデントをしない
|
153
|
+
set noautoindent
|
154
|
+
|
155
|
+
autocmd FileType * setlocal formatoptions-=ro
|
156
|
+
|
157
|
+
set paste
|
158
|
+
|
159
|
+
syntax enable
|
160
|
+
syntax on
|
161
|
+
|
162
|
+
set hlsearch
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
"タブ、空白、改行の可視化
|
168
|
+
set list
|
169
|
+
set listchars=tab:>.,trail:_,eol:↲,extends:>,precedes:<,nbsp:%
|
170
|
+
|
171
|
+
"全角スペースをハイライト表示
|
172
|
+
function! ZenkakuSpace()
|
173
|
+
highlight ZenkakuSpace cterm=reverse ctermfg=DarkMagenta gui=reverse guifg=DarkMagenta
|
174
|
+
endfunction
|
175
|
+
|
176
|
+
if has('syntax')
|
177
|
+
augroup ZenkakuSpace
|
178
|
+
autocmd!
|
179
|
+
autocmd ColorScheme * call ZenkakuSpace()
|
180
|
+
autocmd VimEnter,WinEnter * match ZenkakuSpace / /
|
181
|
+
augroup END
|
182
|
+
call ZenkakuSpace()
|
183
|
+
endif
|
184
|
+
```
|