7
|
1 " Vim support file to switch on loading indent files for file types
|
|
2 "
|
|
3 " Maintainer: Bram Moolenaar <Bram@vim.org>
|
233
|
4 " Last Change: 2005 Mar 28
|
7
|
5
|
|
6 if exists("did_indent_on")
|
|
7 finish
|
|
8 endif
|
|
9 let did_indent_on = 1
|
|
10
|
|
11 augroup filetypeindent
|
233
|
12 au FileType * call s:LoadIndent()
|
|
13 func! s:LoadIndent()
|
|
14 if exists("b:undo_indent")
|
|
15 exe b:undo_indent
|
|
16 unlet! b:undo_indent b:did_indent
|
|
17 endif
|
|
18 if expand("<amatch>") != ""
|
|
19 if exists("b:did_indent")
|
|
20 unlet b:did_indent
|
|
21 endif
|
|
22 runtime! indent/<amatch>.vim
|
|
23 endif
|
|
24 endfunc
|
7
|
25 augroup END
|