Mercurial > vim
comparison runtime/ftplugin.vim @ 7:3fc0f57ecb91 v7.0001
updated for version 7.0001
author | vimboss |
---|---|
date | Sun, 13 Jun 2004 20:20:40 +0000 |
parents | |
children | 125e80798a85 |
comparison
equal
deleted
inserted
replaced
6:c2daee826b8f | 7:3fc0f57ecb91 |
---|---|
1 " Vim support file to switch on loading plugins for file types | |
2 " | |
3 " Maintainer: Bram Moolenaar <Bram@vim.org> | |
4 " Last change: 2003 May 10 | |
5 | |
6 if exists("did_load_ftplugin") | |
7 finish | |
8 endif | |
9 let did_load_ftplugin = 1 | |
10 | |
11 augroup filetypeplugin | |
12 au FileType * call s:LoadFTPlugin() | |
13 func! s:LoadFTPlugin() | |
14 if expand("<amatch>") != "" | |
15 if exists("b:undo_ftplugin") | |
16 exe b:undo_ftplugin | |
17 unlet b:undo_ftplugin b:did_ftplugin | |
18 endif | |
19 if &cpo =~# "S" && exists("b:did_ftplugin") | |
20 " In compatible mode options are reset to the global values, need to | |
21 " set the local values also when a plugin was already used. | |
22 unlet b:did_ftplugin | |
23 endif | |
24 runtime! ftplugin/<amatch>.vim ftplugin/<amatch>_*.vim ftplugin/<amatch>/*.vim | |
25 endif | |
26 endfunc | |
27 augroup END |