To: vim_dev@googlegroups.com Subject: Patch 8.2.0360 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0360 Problem: Yaml files are only recognized by the file extension. Solution: Check for a line starting with "%YAML". (Jason Franklin) Files: runtime/scripts.vim, src/testdir/test_filetype.vim *** ../vim-8.2.0359/runtime/scripts.vim 2019-06-25 21:29:55.000000000 +0200 --- runtime/scripts.vim 2020-03-06 22:22:31.241087653 +0100 *************** *** 376,381 **** --- 376,385 ---- elseif s:line1 =~? '-\*-.*erlang.*-\*-' set ft=erlang + " YAML + elseif s:line1 =~# '^%YAML' + set ft=yaml + " CVS diff else let s:lnum = 1 *** ../vim-8.2.0359/src/testdir/test_filetype.vim 2020-02-21 17:54:41.830235712 +0100 --- src/testdir/test_filetype.vim 2020-03-06 22:21:58.753219999 +0100 *************** *** 601,606 **** --- 601,607 ---- \ 'haskell': [['#!/path/haskell']], \ 'cpp': [['// Standard iostream objects -*- C++ -*-'], \ ['// -*- C++ -*-']], + \ 'yaml': [['%YAML 1.2']], \ } func Test_script_detection() *** ../vim-8.2.0359/src/version.c 2020-03-06 21:43:14.414246402 +0100 --- src/version.c 2020-03-06 22:23:39.020813467 +0100 *************** *** 740,741 **** --- 740,743 ---- { /* Add new patch number below this line */ + /**/ + 360, /**/ -- hundred-and-one symptoms of being an internet addict: 182. You may not know what is happening in the world, but you know every bit of net-gossip there is. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///