Update runtime files
This commit is contained in:
11
runtime/autoload/dist/ft.vim
vendored
11
runtime/autoload/dist/ft.vim
vendored
@ -348,7 +348,7 @@ export def FTidl()
|
||||
setf idl
|
||||
enddef
|
||||
|
||||
# Distinguish between "default" and Cproto prototype file. */
|
||||
# Distinguish between "default", Prolog and Cproto prototype file.
|
||||
export def ProtoCheck(default: string)
|
||||
# Cproto files have a comment in the first line and a function prototype in
|
||||
# the second line, it always ends in ";". Indent files may also have
|
||||
@ -358,7 +358,14 @@ export def ProtoCheck(default: string)
|
||||
if getline(2) =~ '.;$'
|
||||
setf cpp
|
||||
else
|
||||
exe 'setf ' .. default
|
||||
# recognize Prolog by specific text in the first non-empty line
|
||||
# require a blank after the '%' because Perl uses "%list" and "%translate"
|
||||
var l = getline(nextnonblank(1))
|
||||
if l =~ '\<prolog\>' || l =~ '^\s*\(%\+\(\s\|$\)\|/\*\)' || l =~ ':-'
|
||||
setf prolog
|
||||
else
|
||||
exe 'setf ' .. default
|
||||
endif
|
||||
endif
|
||||
enddef
|
||||
|
||||
|
||||
Reference in New Issue
Block a user