mirror of
https://github.com/neovim/neovim.git
synced 2025-11-30 06:00:42 +00:00
vim-patch:8.2.2085: Qt translation file is recognized as typescript
Problem: Qt translation file is recognized as typescript.
Solution: Check the first line for "<?xml". (closes vim/vim#7418)
c0d670ce16
This commit is contained in:
@@ -1768,8 +1768,13 @@ au BufNewFile,BufReadPost *.tutor setf tutor
|
||||
" TWIG files
|
||||
au BufNewFile,BufReadPost *.twig setf twig
|
||||
|
||||
" Typescript
|
||||
au BufNewFile,BufReadPost *.ts setf typescript
|
||||
" Typescript or Qt translation file (which is XML)
|
||||
au BufNewFile,BufReadPost *.ts
|
||||
\ if getline(1) =~ '<?xml' |
|
||||
\ setf xml |
|
||||
\ else |
|
||||
\ setf typescript |
|
||||
\ endif
|
||||
|
||||
" TypeScript with React
|
||||
au BufNewFile,BufRead *.tsx setf typescriptreact
|
||||
|
||||
Reference in New Issue
Block a user