summaryrefslogtreecommitdiffstats
path: root/runtime/filetype.vim
diff options
context:
space:
mode:
authorWu, Zhenyu <wuzhenyu@ustc.edu>2024-05-09 20:35:13 +0200
committerChristian Brabandt <cb@256bit.org>2024-05-09 20:35:13 +0200
commit887a38cee78c472fe406da60751fbba4a6ec19dd (patch)
tree56d6b532a29e9147f4bdd1aea58364569cd049b4 /runtime/filetype.vim
parentce2ad9ffd79fe6b2307cd46b96af7d99c0dd646e (diff)
patch 9.1.0401: filetype: zsh module files are not recognizedv9.1.0401
Problem: filetype: zsh module files are not recognized Solution: Detect '*.mdh' and '*.epro' as C filetype, '*.mdd' as zsh filetype, determine zsh-modules '*.pro' from from it's content (Wu, Zhenyu) closes: #14737 Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu> Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime/filetype.vim')
-rw-r--r--runtime/filetype.vim9
1 files changed, 8 insertions, 1 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index f45866cb82..bc3a488ea6 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1072,7 +1072,7 @@ au BufNewFile,BufRead */.icewm/menu setf icemenu
au BufNewFile,BufRead .indent.pro setf indent
au BufNewFile,BufRead indent.pro call dist#ft#ProtoCheck('indent')
-" IDL (Interactive Data Language)
+" IDL (Interactive Data Language), Prolog, Cproto or zsh module C
au BufNewFile,BufRead *.pro call dist#ft#ProtoCheck('idlang')
" Indent RC
@@ -3093,6 +3093,13 @@ au BufNewFile,BufRead */etc/yum.repos.d/* call s:StarSetf('dosini')
au BufNewFile,BufRead .zsh*,.zlog*,.zcompdump* call s:StarSetf('zsh')
au BufNewFile,BufRead zsh*,zlog* call s:StarSetf('zsh')
+" Zsh module
+" *.mdd will generate *.mdh, *.pro and *.epro.
+" module's *.c will #include *.mdh containing module dependency information and
+" *.pro containing all static declarations of *.c
+" *.epro contains all external declarations of *.c
+au BufNewFile,BufRead *.mdh,*.epro setf c
+au BufNewFile,BufRead *.mdd setf zsh
" Help files match *.txt but should have a last line that is a modeline.
au BufNewFile,BufRead *.txt