KRL files are easiely recognized. Even if the user does set
g:filetype_src or g:filetype_dat he may very well profit from file
content inspection. New files will always default to g:filetype_* if
present.
https://github.com/vim/vim/pull/10103
(2 files)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
The global variables are intended to overrule the automatic detection, not as a fallback.
See :help filetype-overrule
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Sorry, I was mislead by FTr(), where it is the other way around.
export def FTr()
var max = line("$") > 50 ? 50 : line("$")
for n in range(1, max)
# Rebol is easy to recognize, check for that first
if getline(n) =~? '<REBOL>'
setf rebol
return
endif
... and so on...
# Nothing recognized, use user default or assume Rexx
if exists("g:filetype_r")
exe "setf " .. g:filetype_r
else
# Rexx used to be the default, but R appears to be much more popular.
setf r
endif
enddef
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Closed #10103.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()