Mercurial > hg > RemoteEditor > vim7
annotate runtime/indent.vim @ 39:c16898406ff2
synchorinize version 7.3.081
author | one@zeus.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Fri, 17 Dec 2010 17:43:06 +0900 |
parents | e170173ecb68 |
children |
rev | line source |
---|---|
0 | 1 " Vim support file to switch on loading indent files for file types |
2 " | |
3 " Maintainer: Bram Moolenaar <Bram@vim.org> | |
34
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
4 " Last Change: 2008 Feb 22 |
0 | 5 |
6 if exists("did_indent_on") | |
7 finish | |
8 endif | |
9 let did_indent_on = 1 | |
10 | |
11 augroup filetypeindent | |
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 | |
34
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
18 let s = expand("<amatch>") |
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
19 if s != "" |
0 | 20 if exists("b:did_indent") |
21 unlet b:did_indent | |
22 endif | |
34
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
23 |
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
24 " When there is a dot it is used to separate filetype names. Thus for |
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
25 " "aaa.bbb" load "indent/aaa.vim" and then "indent/bbb.vim". |
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
26 for name in split(s, '\.') |
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
27 exe 'runtime! indent/' . name . '.vim' |
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
28 endfor |
0 | 29 endif |
30 endfunc | |
31 augroup END |