Mercurial > vim
changeset 19607:d24e6844aabd v8.2.0360
patch 8.2.0360: yaml files are only recognized by the file extension
Commit: https://github.com/vim/vim/commit/8eab73132838e977092d7b46f70b4ecf6274fd6a
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Mar 6 22:25:56 2020 +0100
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 06 Mar 2020 22:30:04 +0100 |
parents | 53ee30ecdacf |
children | 2f6e8d14ad36 |
files | runtime/scripts.vim src/testdir/test_filetype.vim src/version.c |
diffstat | 3 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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