Patch 8.2.2384
Problem: Turtle filetype not recognized.
Solution: Add a rule to detect turtle files. (closes #7722)
Files: runtime/filetype.vim, src/testdir/test_filetype.vim
*** ../vim-8.2.2383/runtime/filetype.vim 2021-01-15 13:35:26.763953669 +0100
--- runtime/filetype.vim 2021-01-21 14:43:29.611104848 +0100
***************
*** 1730,1737 ****
" Telix Salt
au BufNewFile,BufRead *.slt setf tsalt
! " Tera Term Language
! au BufRead,BufNewFile *.ttl setf teraterm
" Terminfo
au BufNewFile,BufRead *.ti setf terminfo
--- 1731,1743 ----
" Telix Salt
au BufNewFile,BufRead *.slt setf tsalt
! " Tera Term Language or Turtle
! au BufRead,BufNewFile *.ttl
! \ if getline(1) =~ '^@\?\(prefix\|base\)' |
! \ setf turtle |
! \ else |
! \ setf teraterm |
! \ endif
" Terminfo
au BufNewFile,BufRead *.ti setf terminfo
*** ../vim-8.2.2383/src/testdir/test_filetype.vim 2021-01-16 13:43:27.680058930 +0100
--- src/testdir/test_filetype.vim 2021-01-21 14:42:03.647303760 +0100
***************
*** 733,738 ****
--- 733,755 ----
filetype off
endfunc
+ func Test_ttl_file()
+ filetype on
+
+ call writefile(['@base <
http://example.org/> .'], 'Xfile.ttl')
+ split Xfile.ttl
+ call assert_equal('turtle', &filetype)
+ bwipe!
+
+ call writefile(['looks like Tera Term Language'], 'Xfile.ttl')
+ split Xfile.ttl
+ call assert_equal('teraterm', &filetype)
+ bwipe!
+
+ call delete('Xfile.ttl')
+ filetype off
+ endfunc
+
func Test_pp_file()
filetype on
*** ../vim-8.2.2383/src/version.c 2021-01-21 13:36:40.092474151 +0100
--- src/version.c 2021-01-21 14:43:03.931164389 +0100
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2384,
/**/
--
hundred-and-one symptoms of being an internet addict:
198. You read all the quotes at Netaholics Anonymous and keep thinking
"What's wrong with that?"
/// Bram Moolenaar -- Br...@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 ///