patch 9.1.0289: filetype: some TeX files are not recognized
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>
This commit is contained in:
committed by
Christian Brabandt
parent
72a156b4ed
commit
61ee833a50
8
runtime/autoload/dist/ft.vim
vendored
8
runtime/autoload/dist/ft.vim
vendored
@ -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
|
||||
|
||||
Reference in New Issue
Block a user