diff options
author | Wu, Zhenyu <wuzhenyu@ustc.edu> | 2024-04-09 22:09:30 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-04-09 22:09:30 +0200 |
commit | 61ee833a504ae73bc6b3e2527a81582263f02afd (patch) | |
tree | 82aa919567a6739c2720bfd810f42e819f9ec1ff /runtime/autoload | |
parent | 72a156b4edfdf1502d421370cf38281c258e3c4a (diff) |
patch 9.1.0289: filetype: some TeX files are not recognizedv9.1.0289
Problem: filetype: some TeX files are not recognized
Solution: Add more patterns for TeX files and inspect
a few more files for being TeX files
(Wu, Zhenyu)
closes: #14456
Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime/autoload')
-rw-r--r-- | runtime/autoload/dist/ft.vim | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim index 14628308ee..05f1611b22 100644 --- a/runtime/autoload/dist/ft.vim +++ b/runtime/autoload/dist/ft.vim @@ -10,7 +10,9 @@ vim9script # faster. export def Check_inp() - if getline(1) =~ '^\*' + if getline(1) =~ '%%' + setf tex + elseif getline(1) =~ '^\*' setf abaqus else var n = 1 @@ -280,6 +282,10 @@ export def DtraceCheck() enddef export def FTdef() + # LaTeX def files are usually generated by docstrip, which will output '%%' in first line + if getline(1) =~ '%%' + setf tex + endif if get(g:, "filetype_def", "") == "modula2" || IsModula2() SetFiletypeModula2() return |