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,
  /**/

-- 
Wizards had always known that the act of observation changed the thing that
was observed, and sometimes forgot that it also changed the observer too.
                        Terry Pratchett  -  Interesting times

 /// Bram Moolenaar -- [email protected] -- 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    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202003062131.026LVhxd001709%40masaka.moolenaar.net.

Raspunde prin e-mail lui