From f667a0e02ac5781a7b7e640b5dc9a7edcf2f4a0b Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Mon, 26 Aug 2019 19:49:40 -0400 Subject: vim-patch:8.1.1930: cannot recognize .jsx and .tsx files Problem: Cannot recognize .jsx and .tsx files. Solution: Recognize them as javascriptreact and typescriptreact. (closes vim/vim#4830) https://github.com/vim/vim/commit/92852cee3fcff1dc6ce12387b234634e73267b22 --- runtime/filetype.vim | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'runtime/filetype.vim') diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 4cc2f49a63..43e96f2049 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -791,7 +791,10 @@ au BufNewFile,BufRead *.java,*.jav setf java au BufNewFile,BufRead *.jj,*.jjt setf javacc " JavaScript, ECMAScript -au BufNewFile,BufRead *.js,*.javascript,*.es,*.jsx,*.mjs setf javascript +au BufNewFile,BufRead *.js,*.javascript,*.es,*.mjs setf javascript + +" JavaScript with React +au BufNewFile,BufRead *.jsx setf javascriptreact " Java Server Pages au BufNewFile,BufRead *.jsp setf jsp @@ -1705,6 +1708,9 @@ au BufNewFile,BufReadPost *.twig setf twig " Typescript au BufNewFile,BufReadPost *.ts setf typescript +" TypeScript with React +au BufNewFile,BufRead *.tsx setf typescriptreact + " Motif UIT/UIL files au BufNewFile,BufRead *.uit,*.uil setf uil -- cgit