Mercurial > vim
comparison runtime/ftplugin.vim @ 856:8cd729851562 v7.0g
updated for version 7.0g
author | vimboss |
---|---|
date | Sun, 30 Apr 2006 18:54:39 +0000 |
parents | d20041a02ee5 |
children | f37561549ec2 |
comparison
equal
deleted
inserted
replaced
855:d2a4f08396fe | 856:8cd729851562 |
---|---|
1 " Vim support file to switch on loading plugins for file types | 1 " Vim support file to switch on loading plugins for file types |
2 " | 2 " |
3 " Maintainer: Bram Moolenaar <Bram@vim.org> | 3 " Maintainer: Bram Moolenaar <Bram@vim.org> |
4 " Last change: 2006 Mar 18 | 4 " Last change: 2006 Apr 30 |
5 | 5 |
6 if exists("did_load_ftplugin") | 6 if exists("did_load_ftplugin") |
7 finish | 7 finish |
8 endif | 8 endif |
9 let did_load_ftplugin = 1 | 9 let did_load_ftplugin = 1 |
10 | 10 |
11 augroup filetypeplugin | 11 augroup filetypeplugin |
12 au FileType * call s:LoadFTPlugin() | 12 au FileType * call s:LoadFTPlugin() |
13 | 13 |
14 func! s:LoadFTPlugin() | 14 func! s:LoadFTPlugin() |
15 if exists("b:undo_ftplugin") | 15 if exists("b:undo_ftplugin") |
16 exe b:undo_ftplugin | 16 exe b:undo_ftplugin |
17 unlet! b:undo_ftplugin b:did_ftplugin | 17 unlet! b:undo_ftplugin b:did_ftplugin |
18 endif | 18 endif |
19 | 19 |
20 let s = expand("<amatch>") | 20 let s = expand("<amatch>") |
21 if s != "" | 21 if s != "" |
22 if &cpo =~# "S" && exists("b:did_ftplugin") | 22 if &cpo =~# "S" && exists("b:did_ftplugin") |
23 " In compatible mode options are reset to the global values, need to | 23 " In compatible mode options are reset to the global values, need to |
24 " set the local values also when a plugin was already used. | 24 " set the local values also when a plugin was already used. |