annotate runtime/ftplugin.vim @ 17700:97b859062d67 v8.1.1847

patch 8.1.1847: suspend test is failing commit https://github.com/vim/vim/commit/185d68a9d08f18440af93dd0f232e38f1819ddb2 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Aug 15 11:21:15 2019 +0200 patch 8.1.1847: suspend test is failing Problem: Suspend test is failing. Solution: Do not use GetVimCommandClean().
author Bram Moolenaar <Bram@vim.org>
date Thu, 15 Aug 2019 11:30:04 +0200
parents 8cd729851562
children f37561549ec2
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>
856
8cd729851562 updated for version 7.0g
vimboss
parents: 782
diff changeset
4 " Last change: 2006 Apr 30
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()
856
8cd729851562 updated for version 7.0g
vimboss
parents: 782
diff changeset
13
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 func! s:LoadFTPlugin()
230
9281a51ca7a2 updated for version 7.0064
vimboss
parents: 36
diff changeset
15 if exists("b:undo_ftplugin")
9281a51ca7a2 updated for version 7.0064
vimboss
parents: 36
diff changeset
16 exe b:undo_ftplugin
9281a51ca7a2 updated for version 7.0064
vimboss
parents: 36
diff changeset
17 unlet! b:undo_ftplugin b:did_ftplugin
9281a51ca7a2 updated for version 7.0064
vimboss
parents: 36
diff changeset
18 endif
856
8cd729851562 updated for version 7.0g
vimboss
parents: 782
diff changeset
19
782
d20041a02ee5 updated for version 7.0228
vimboss
parents: 230
diff changeset
20 let s = expand("<amatch>")
d20041a02ee5 updated for version 7.0228
vimboss
parents: 230
diff changeset
21 if s != ""
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 if &cpo =~# "S" && exists("b:did_ftplugin")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " In compatible mode options are reset to the global values, need to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 " set the local values also when a plugin was already used.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 unlet b:did_ftplugin
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 endif
782
d20041a02ee5 updated for version 7.0228
vimboss
parents: 230
diff changeset
27
d20041a02ee5 updated for version 7.0228
vimboss
parents: 230
diff changeset
28 " When there is a dot it is used to separate filetype names. Thus for
d20041a02ee5 updated for version 7.0228
vimboss
parents: 230
diff changeset
29 " "aaa.bbb" load "aaa" and then "bbb".
d20041a02ee5 updated for version 7.0228
vimboss
parents: 230
diff changeset
30 for name in split(s, '\.')
d20041a02ee5 updated for version 7.0228
vimboss
parents: 230
diff changeset
31 exe 'runtime! ftplugin/' . name . '.vim ftplugin/' . name . '_*.vim ftplugin/' . name . '/*.vim'
d20041a02ee5 updated for version 7.0228
vimboss
parents: 230
diff changeset
32 endfor
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 endfunc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 augroup END