Patch 9.0.0602
Problem: New TypeScript extensions are not recognized.
Solution: Recognize .mts and .cts files. (closes #11237)
Files: runtime/filetype.vim, src/testdir/test_filetype.vim
*** ../vim-9.0.0601/runtime/filetype.vim 2022-09-27 11:35:06.095028109
+0100
--- runtime/filetype.vim 2022-09-27 11:53:34.417944382 +0100
***************
*** 770,777 ****
au BufNewFile,BufRead {,.}gitolite.rc,example.gitolite.rc setf perl
" Glimmer-flavored TypeScript and JavaScript
! au BufNewFile,BufRead *.gts setf typescript.glimmer
! au BufNewFile,BufRead *.gjs setf javascript.glimmer
" Gnuplot scripts
au BufNewFile,BufRead *.gpi,.gnuplot setf gnuplot
--- 770,777 ----
au BufNewFile,BufRead {,.}gitolite.rc,example.gitolite.rc setf perl
" Glimmer-flavored TypeScript and JavaScript
! au BufNewFile,BufRead *.gts setf typescript.glimmer
! au BufNewFile,BufRead *.gjs setf javascript.glimmer
" Gnuplot scripts
au BufNewFile,BufRead *.gpi,.gnuplot setf gnuplot
***************
*** 2086,2092 ****
" TWIG files
au BufNewFile,BufReadPost *.twig setf twig
! " Typescript or Qt translation file (which is XML)
au BufNewFile,BufReadPost *.ts
\ if getline(1) =~ '<?xml' |
\ setf xml |
--- 2086,2092 ----
" TWIG files
au BufNewFile,BufReadPost *.twig setf twig
! " TypeScript or Qt translation file (which is XML)
au BufNewFile,BufReadPost *.ts
\ if getline(1) =~ '<?xml' |
\ setf xml |
***************
*** 2094,2099 ****
--- 2094,2102 ----
\ setf typescript |
\ endif
+ " TypeScript module and common
+ au BufNewFile,BufRead *.mts,*.cts setf typescript
+
" TypeScript with React
au BufNewFile,BufRead *.tsx setf typescriptreact
***************
*** 2285,2291 ****
au BufNewFile,BufRead *.vbproj,*.vbproj.user setf xml
" Qt Linguist translation source and Qt User Interface Files are XML
! " However, for .ts Typescript is more common.
au BufNewFile,BufRead *.ui setf xml
" TPM's are RDF-based descriptions of TeX packages (Nikolai Weibull)
--- 2288,2294 ----
au BufNewFile,BufRead *.vbproj,*.vbproj.user setf xml
" Qt Linguist translation source and Qt User Interface Files are XML
! " However, for .ts TypeScript is more common.
au BufNewFile,BufRead *.ui setf xml
" TPM's are RDF-based descriptions of TeX packages (Nikolai Weibull)
*** ../vim-9.0.0601/src/testdir/test_filetype.vim 2022-09-27
11:35:06.095028109 +0100
--- src/testdir/test_filetype.vim 2022-09-27 11:52:31.738152335 +0100
***************
*** 584,589 ****
--- 584,590 ----
\ 'tssop': ['file.tssop'],
\ 'tsv': ['file.tsv'],
\ 'twig': ['file.twig'],
+ \ 'typescript': ['file.mts', 'file.cts'],
\ 'typescript.glimmer': ['file.gts'],
\ 'typescriptreact': ['file.tsx'],
\ 'uc': ['file.uc'],
*** ../vim-9.0.0601/src/version.c 2022-09-27 11:46:35.155438606 +0100
--- src/version.c 2022-09-27 11:55:33.125560756 +0100
***************
*** 701,702 ****
--- 701,704 ----
{ /* Add new patch number below this line */
+ /**/
+ 602,
/**/
--
What is the difference between a professional and an amateur?
The ark was built by an amateur; professionals gave us the Titanic.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ 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/20220927112350.1C5F91C071C%40moolenaar.net.