mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 08:56:29 +00:00
vim-patch:8.2.2384: turtle filetype not recognized
Problem: Turtle filetype not recognized.
Solution: Add a rule to detect turtle files. (closes vim/vim#7722)
5e6a7aa2b2
This commit is contained in:
@@ -1733,8 +1733,13 @@ au BufNewFile,BufRead *.tli setf tli
|
|||||||
" Telix Salt
|
" Telix Salt
|
||||||
au BufNewFile,BufRead *.slt setf tsalt
|
au BufNewFile,BufRead *.slt setf tsalt
|
||||||
|
|
||||||
" Tera Term Language
|
" Tera Term Language or Turtle
|
||||||
au BufRead,BufNewFile *.ttl setf teraterm
|
au BufRead,BufNewFile *.ttl
|
||||||
|
\ if getline(1) =~ '^@\?\(prefix\|base\)' |
|
||||||
|
\ setf turtle |
|
||||||
|
\ else |
|
||||||
|
\ setf teraterm |
|
||||||
|
\ endif
|
||||||
|
|
||||||
" Terminfo
|
" Terminfo
|
||||||
au BufNewFile,BufRead *.ti setf terminfo
|
au BufNewFile,BufRead *.ti setf terminfo
|
||||||
|
@@ -692,6 +692,23 @@ func Test_ts_file()
|
|||||||
filetype off
|
filetype off
|
||||||
endfunc
|
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()
|
func Test_pp_file()
|
||||||
filetype on
|
filetype on
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user