commit | 8eab73132838e977092d7b46f70b4ecf6274fd6a | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Fri Mar 06 22:25:56 2020 +0100 |
committer | Bram Moolenaar <Bram@vim.org> | Fri Mar 06 22:25:56 2020 +0100 |
tree | 4e43087b980b1397dc397675c00055d7f1901a8c | |
parent | ba2920fe976b37326933afa820616523b509495f [diff] |
patch 8.2.0360: yaml files are only recognized by the file extension Problem: Yaml files are only recognized by the file extension. Solution: Check for a line starting with "%YAML". (Jason Franklin)
diff --git a/runtime/scripts.vim b/runtime/scripts.vim index a690431..c552f02 100644 --- a/runtime/scripts.vim +++ b/runtime/scripts.vim
@@ -376,6 +376,10 @@ elseif s:line1 =~? '-\*-.*erlang.*-\*-' set ft=erlang + " YAML + elseif s:line1 =~# '^%YAML' + set ft=yaml + " CVS diff else let s:lnum = 1