aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-02-03 12:03:43 +0100
committerJustin M. Keyes <justinkz@gmail.com>2018-02-11 19:03:26 +0100
commit9baf60c6170489d3e7ba159d6391f88fed15b9a9 (patch)
tree7c8d3b92c795b4041afdc4dd5f094cae60f53c1c /runtime
parent16a416836464d64f3054aeb727c773ebe5ac7124 (diff)
downloadrneovim-9baf60c6170489d3e7ba159d6391f88fed15b9a9.tar.gz
rneovim-9baf60c6170489d3e7ba159d6391f88fed15b9a9.tar.bz2
rneovim-9baf60c6170489d3e7ba159d6391f88fed15b9a9.zip
vim-patch:8.0.0894: there is no test for runtime filetype detection
Problem: There is no test for runtime filetype detection. Solution: Test a list of filetypes from patterns. https://github.com/vim/vim/commit/0a0217abfabcee8b0779df2e18a186a4b41e18ce
Diffstat (limited to 'runtime')
-rw-r--r--runtime/filetype.vim6
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 90b4fdaa74..fb2fad1220 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1019,7 +1019,7 @@ au BufNewFile,BufRead *.java,*.jav setf java
au BufNewFile,BufRead *.jj,*.jjt setf javacc
" JavaScript, ECMAScript
-au BufNewFile,BufRead *.js,*.javascript,*.es,*.jsx setf javascript
+au BufNewFile,BufRead *.js,*.javascript,*.es,*.jsx,*.mjs setf javascript
" Java Server Pages
au BufNewFile,BufRead *.jsp setf jsp
@@ -2265,6 +2265,8 @@ func! s:FTtex()
elseif format == 'plaintex'
let format = 'plain'
endif
+ elseif expand('%') =~ 'tex/context/.*/.*.tex'
+ let format = 'context'
else
" Default value, may be changed later:
let format = exists("g:tex_flavor") ? g:tex_flavor : 'plain'
@@ -2306,7 +2308,7 @@ func! s:FTtex()
endfunc
" ConTeXt
-au BufNewFile,BufRead tex/context/*/*.tex,*.mkii,*.mkiv,*.mkvi setf context
+au BufNewFile,BufRead *.mkii,*.mkiv,*.mkvi setf context
" Texinfo
au BufNewFile,BufRead *.texinfo,*.texi,*.txi setf texinfo