mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 01:16:31 +00:00
vim-patch:partial: 48c3f4e0bff7 (#19684)
vim-patch:partial:48c3f4e0bff7
Update runtime files
48c3f4e0bf
partially skip `options.txt` (needs 9.0.0138)
This commit is contained in:
11
runtime/autoload/dist/ft.vim
vendored
11
runtime/autoload/dist/ft.vim
vendored
@@ -348,7 +348,7 @@ func dist#ft#FTidl()
|
||||
setf idl
|
||||
endfunc
|
||||
|
||||
" Distinguish between "default" and Cproto prototype file. */
|
||||
" Distinguish between "default", Prolog and Cproto prototype file. */
|
||||
func dist#ft#ProtoCheck(default)
|
||||
" 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 @@ func dist#ft#ProtoCheck(default)
|
||||
if getline(2) =~ '.;$'
|
||||
setf cpp
|
||||
else
|
||||
exe 'setf ' . a:default
|
||||
" recognize Prolog by specific text in the first non-empty line
|
||||
" require a blank after the '%' because Perl uses "%list" and "%translate"
|
||||
let l = getline(nextnonblank(1))
|
||||
if l =~ '\<prolog\>' || l =~ '^\s*\(%\+\(\s\|$\)\|/\*\)' || l =~ ':-'
|
||||
setf prolog
|
||||
else
|
||||
exe 'setf ' .. a:default
|
||||
endif
|
||||
endif
|
||||
endfunc
|
||||
|
||||
|
Reference in New Issue
Block a user