summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-07-27 21:57:21 +0200
committerBram Moolenaar <Bram@vim.org>2019-07-27 21:57:21 +0200
commitc273405188cc2f19e949089cda1f92bd81610dac (patch)
tree30572ce47362b287a09918394096e7a6f201052b
parent4248111497ab78f45d3d48576740949778a1e76b (diff)
patch 8.1.1762: some filetype rules are in the wrong placev8.1.1762
Problem: Some filetype rules are in the wrong place. Solution: Move to the right place. Add a few more tests.
-rw-r--r--runtime/filetype.vim15
-rw-r--r--src/testdir/test_filetype.vim14
-rw-r--r--src/version.c2
3 files changed, 16 insertions, 15 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 43c0858387..0a50c302b7 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2019 May 06
+" Last Change: 2019 Jul 27
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -707,12 +707,6 @@ au BufNewFile,BufRead *.t.html setf tilde
" HTML (.shtml and .stm for server side)
au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call dist#ft#FThtml()
-" Vue.js Single File Component
-au BufNewFile,BufRead *.vue setf vuejs
-
-" Vue.js Single File Component
-au BufNewFile,BufRead *.vue setf vue
-
" HTML with Ruby - eRuby
au BufNewFile,BufRead *.erb,*.rhtml setf eruby
@@ -1782,12 +1776,15 @@ au BufNewFile,BufRead *.wrl setf vrml
" Vroom (vim testing and executable documentation)
au BufNewFile,BufRead *.vroom setf vroom
-" Webmacro
-au BufNewFile,BufRead *.wm setf webmacro
+" Vue.js Single File Component
+au BufNewFile,BufRead *.vue setf vue
" WebAssembly
au BufNewFile,BufRead *.wast,*.wat setf wast
+" Webmacro
+au BufNewFile,BufRead *.wm setf webmacro
+
" Wget config
au BufNewFile,BufRead .wgetrc,wgetrc setf wget
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index c455c65a57..8b668c7a26 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -44,8 +44,10 @@ endfunc
" Filetypes detected just from matching the file name.
let s:filename_checks = {
+ \ '8th': ['file.8th'],
\ 'a2ps': ['/etc/a2ps.cfg', '/etc/a2ps/file.cfg', 'a2psrc', '.a2psrc'],
\ 'a65': ['file.a65'],
+ \ 'aap': ['file.aap'],
\ 'abap': ['file.abap'],
\ 'abc': ['file.abc'],
\ 'abel': ['file.abl'],
@@ -56,7 +58,8 @@ let s:filename_checks = {
\ 'aml': ['file.aml'],
\ 'ampl': ['file.run'],
\ 'ant': ['build.xml'],
- \ 'apache': ['.htaccess', '/etc/httpd/file.conf'],
+ \ 'apache': ['.htaccess', '/etc/httpd/file.conf', '/etc/apache2/sites-2/file.com', '/etc/apache2/some.config', '/etc/apache2/conf.file/conf', '/etc/apache2/mods-some/file', '/etc/apache2/sites-some/file', '/etc/httpd/conf.d/file.config'],
+ \ 'apachestyle': ['/etc/proftpd/file.config,/etc/proftpd/conf.file/file'],
\ 'applescript': ['file.scpt'],
\ 'aptconf': ['apt.conf', '/.aptitude/config'],
\ 'arch': ['.arch-inventory'],
@@ -81,7 +84,7 @@ let s:filename_checks = {
\ 'c': ['enlightenment/file.cfg', 'file.qc', 'file.c'],
\ 'cabal': ['file.cabal'],
\ 'calendar': ['calendar'],
- \ 'catalog': ['catalog'],
+ \ 'catalog': ['catalog', 'sgml.catalogfile'],
\ 'cdl': ['file.cdl'],
\ 'cdrdaoconf': ['/etc/cdrdao.conf', '/etc/defaults/cdrdao', '/etc/default/cdrdao', '.cdrdao'],
\ 'cdrtoc': ['file.toc'],
@@ -425,7 +428,7 @@ let s:filename_checks = {
\ 'svg': ['file.svg'],
\ 'svn': ['svn-commitfile.tmp'],
\ 'sysctl': ['/etc/sysctl.conf', '/etc/sysctl.d/file.conf'],
- \ 'systemd': ['any/systemd/file.automount', 'any/systemd/file.mount', 'any/systemd/file.path', 'any/systemd/file.service', 'any/systemd/file.socket', 'any/systemd/file.swap', 'any/systemd/file.target', 'any/systemd/file.timer'],
+ \ 'systemd': ['any/systemd/file.automount', 'any/systemd/file.mount', 'any/systemd/file.path', 'any/systemd/file.service', 'any/systemd/file.socket', 'any/systemd/file.swap', 'any/systemd/file.target', 'any/systemd/file.timer', '/etc/systemd/system/some.d/file.conf', '/etc/systemd/system/some.d/.#file'],
\ 'systemverilog': ['file.sv', 'file.svh'],
\ 'tags': ['tags'],
\ 'tak': ['file.tak'],
@@ -468,7 +471,7 @@ let s:filename_checks = {
\ 'verilog': ['file.v'],
\ 'verilogams': ['file.va', 'file.vams'],
\ 'vgrindefs': ['vgrindefs'],
- \ 'vhdl': ['file.hdl', 'file.vhd', 'file.vhdl', 'file.vbe', 'file.vst'],
+ \ 'vhdl': ['file.hdl', 'file.vhd', 'file.vhdl', 'file.vbe', 'file.vst', 'file.vhdl_123'],
\ 'vim': ['file.vim', 'file.vba', '.exrc', '_exrc'],
\ 'viminfo': ['.viminfo', '_viminfo'],
\ 'vmasm': ['file.mar'],
@@ -503,7 +506,6 @@ let s:filename_checks = {
\ 'zimbutempl': ['file.zut'],
\ 'zsh': ['.zprofile', '/etc/zprofile', '.zfbfmarks', 'file.zsh'],
\
- \ 'aap': ['file.aap'],
\ 'help': [$VIMRUNTIME . '/doc/help.txt'],
\ 'xpm': ['file.xpm'],
\ }
@@ -517,7 +519,7 @@ func CheckItems(checks)
for i in range(0, len(names) - 1)
new
try
- exe 'edit ' . names[i]
+ exe 'edit ' . fnameescape(names[i])
catch
call assert_report('cannot edit "' . names[i] . '": ' . v:errmsg)
endtry
diff --git a/src/version.c b/src/version.c
index b1d7fea6fb..6d2c89c94f 100644
--- a/src/version.c
+++ b/src/version.c
@@ -778,6 +778,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1762,
+/**/
1761,
/**/
1760,