Mercurial > vim
annotate runtime/ftplugin.vim @ 32220:8f4aa24617c2 v9.0.1441
patch 9.0.1441: MacOS: Python 3 using framework do not set dll name properly
Commit: https://github.com/vim/vim/commit/b6ebe5af74a965d703eb8ee66a07c97b0bbe6e58
Author: Yee Cheng Chin <ychin.git@gmail.com>
Date: Wed Apr 5 18:24:50 2023 +0100
patch 9.0.1441: MacOS: Python 3 using framework do not set dll name properly
Problem: MacOS: Python 3 using framework do not set dll name properly.
Solution: Use the framework prefix. (Yee Cheng Chin, closes https://github.com/vim/vim/issues/12189)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 05 Apr 2023 19:30:07 +0200 |
parents | 9fe2fed9bb4b |
children | 4027cefc2aab |
rev | line source |
---|---|
27623 | 1 vim9script noclear |
7 | 2 |
27623 | 3 # Vim support file to switch on loading plugins for file types |
4 # | |
5 # Maintainer: Bram Moolenaar <Bram@vim.org> | |
27634
9fe2fed9bb4b
Update runtime files. (closes #9741)
Bram Moolenaar <Bram@vim.org>
parents:
27623
diff
changeset
|
6 # Last change: 2022 Feb 11 |
27623 | 7 |
8 if exists("g:did_load_ftplugin") | |
7 | 9 finish |
10 endif | |
27623 | 11 g:did_load_ftplugin = 1 |
7 | 12 |
13 augroup filetypeplugin | |
27623 | 14 au FileType * call LoadFTPlugin() |
27538
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
15 augroup END |
856 | 16 |
27623 | 17 if exists('*LoadFTPlugin') |
18 # No need to define the function again. | |
19 finish | |
20 endif | |
21 | |
22 def LoadFTPlugin() | |
27538
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
23 if exists("b:undo_ftplugin") |
27634
9fe2fed9bb4b
Update runtime files. (closes #9741)
Bram Moolenaar <Bram@vim.org>
parents:
27623
diff
changeset
|
24 # We assume b:undo_ftplugin is using legacy script syntax |
9fe2fed9bb4b
Update runtime files. (closes #9741)
Bram Moolenaar <Bram@vim.org>
parents:
27623
diff
changeset
|
25 legacy exe b:undo_ftplugin |
27538
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
26 unlet! b:undo_ftplugin b:did_ftplugin |
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
27 endif |
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
28 |
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
29 var s = expand("<amatch>") |
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
30 if s != "" |
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
31 if &cpo =~# "S" && exists("b:did_ftplugin") |
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
32 # In compatible mode options are reset to the global values, need to |
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
33 # set the local values also when a plugin was already used. |
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
34 unlet b:did_ftplugin |
230 | 35 endif |
856 | 36 |
27538
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
37 # When there is a dot it is used to separate filetype names. Thus for |
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
38 # "aaa.bbb" load "aaa" and then "bbb". |
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
39 for name in split(s, '\.') |
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
40 exe 'runtime! ftplugin/' .. name .. '.vim ftplugin/' .. name .. '_*.vim ftplugin/' .. name .. '/*.vim' |
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
41 endfor |
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
42 endif |
f37561549ec2
Update runtime files; use compiled functions
Bram Moolenaar <Bram@vim.org>
parents:
856
diff
changeset
|
43 enddef |