forked from suztomo/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 53
/
.vimrc.indent
49 lines (45 loc) · 2.59 KB
/
.vimrc.indent
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
"-------------------------------------------------------------------------------
" インデント Indent
"-------------------------------------------------------------------------------
set autoindent " 自動でインデント
"set paste " ペースト時にautoindentを無効に(onにするとautocomplpop.vimが動かない)
set smartindent " 新しい行を開始したときに、新しい行のインデントを現在行と同じ量にする。
set cindent " Cプログラムファイルの自動インデントを始める
" softtabstopはTabキー押し下げ時の挿入される空白の量,0の場合はtabstopと同じ,BSにも影響する
set tabstop=2 shiftwidth=2 softtabstop=0
if has("autocmd")
"ファイルタイプの検索を有効にする
filetype plugin on
"そのファイルタイプにあわせたインデントを利用する
filetype indent on
" これらのftではインデントを無効に
"autocmd FileType php filetype indent off
autocmd FileType apache setlocal sw=4 sts=4 ts=4 et
autocmd FileType aspvbs setlocal sw=4 sts=4 ts=4 et
autocmd FileType c setlocal sw=4 sts=4 ts=4 et
autocmd FileType cpp setlocal sw=4 sts=4 ts=4 et
autocmd FileType cs setlocal sw=4 sts=4 ts=4 et
autocmd FileType css setlocal sw=2 sts=2 ts=2 et
autocmd FileType diff setlocal sw=4 sts=4 ts=4 et
autocmd FileType eruby setlocal sw=4 sts=4 ts=4 et
autocmd FileType html setlocal sw=2 sts=2 ts=2 et
autocmd FileType java setlocal sw=4 sts=4 ts=4 et
autocmd FileType javascript setlocal sw=2 sts=2 ts=2 et
autocmd FileType jsx setlocal sw=2 sts=2 ts=2 et
autocmd FileType perl setlocal sw=4 sts=4 ts=4 et
autocmd FileType php setlocal sw=4 sts=4 ts=4 et
autocmd FileType python setlocal sw=4 sts=4 ts=4 et
autocmd FileType ruby setlocal sw=2 sts=2 ts=2 et
autocmd FileType haml setlocal sw=2 sts=2 ts=2 et
autocmd FileType sh setlocal sw=4 sts=4 ts=4 et
autocmd FileType sql setlocal sw=4 sts=4 ts=4 et
autocmd FileType vb setlocal sw=4 sts=4 ts=4 et
autocmd FileType vim setlocal sw=2 sts=2 ts=2 et
autocmd FileType wsh setlocal sw=4 sts=4 ts=4 et
autocmd FileType xhtml setlocal sw=4 sts=4 ts=4 et
autocmd FileType xml setlocal sw=4 sts=4 ts=4 et
autocmd FileType yaml setlocal sw=2 sts=2 ts=2 et
autocmd FileType zsh setlocal sw=4 sts=4 ts=4 et
autocmd FileType scala setlocal sw=2 sts=2 ts=2 et
autocmd FileType go setlocal noexpandtab list tabstop=2 shiftwidth=2
endif