summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-03-06 22:25:56 +0100
committerBram Moolenaar <Bram@vim.org>2020-03-06 22:25:56 +0100
commit8eab73132838e977092d7b46f70b4ecf6274fd6a (patch)
tree4e43087b980b1397dc397675c00055d7f1901a8c /runtime
parentba2920fe976b37326933afa820616523b509495f (diff)
downloadvim-git-8eab73132838e977092d7b46f70b4ecf6274fd6a.tar.gz
patch 8.2.0360: yaml files are only recognized by the file extensionv8.2.0360
Problem: Yaml files are only recognized by the file extension. Solution: Check for a line starting with "%YAML". (Jason Franklin)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/scripts.vim4
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/scripts.vim b/runtime/scripts.vim
index a69043101..c552f0202 100644
--- a/runtime/scripts.vim
+++ b/runtime/scripts.vim
@@ -376,6 +376,10 @@ else
elseif s:line1 =~? '-\*-.*erlang.*-\*-'
set ft=erlang
+ " YAML
+ elseif s:line1 =~# '^%YAML'
+ set ft=yaml
+
" CVS diff
else
let s:lnum = 1