annotate runtime/ftplugin.vim @ 638:593092a5362b

updated for version 7.0185
author vimboss
date Sun, 22 Jan 2006 23:22:22 +0000
parents 9281a51ca7a2
children d20041a02ee5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim support file to switch on loading plugins for file types
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Bram Moolenaar <Bram@vim.org>
230
9281a51ca7a2 updated for version 7.0064
vimboss
parents: 36
diff changeset
4 " Last change: 2005 Mar 25
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 if exists("did_load_ftplugin")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 let did_load_ftplugin = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 augroup filetypeplugin
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 au FileType * call s:LoadFTPlugin()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 func! s:LoadFTPlugin()
230
9281a51ca7a2 updated for version 7.0064
vimboss
parents: 36
diff changeset
14 if exists("b:undo_ftplugin")
9281a51ca7a2 updated for version 7.0064
vimboss
parents: 36
diff changeset
15 exe b:undo_ftplugin
9281a51ca7a2 updated for version 7.0064
vimboss
parents: 36
diff changeset
16 unlet! b:undo_ftplugin b:did_ftplugin
9281a51ca7a2 updated for version 7.0064
vimboss
parents: 36
diff changeset
17 endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 if expand("<amatch>") != ""
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 if &cpo =~# "S" && exists("b:did_ftplugin")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 " In compatible mode options are reset to the global values, need to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 " set the local values also when a plugin was already used.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 unlet b:did_ftplugin
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 runtime! ftplugin/<amatch>.vim ftplugin/<amatch>_*.vim ftplugin/<amatch>/*.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 endfunc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 augroup END