From c8356e1151cf6db8cad93f74973a7452e62d6be0 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 1 Feb 2018 23:32:43 +0100 Subject: vim-patch:8.0.0440: not enough test coverage in Insert mode [Nvim note: test_override() omitted] Problem: Not enough test coverage in Insert mode. Solution: Add lots of tests. Add test_override(). (Christian Brabandt, closes vim/vim#1521) https://github.com/vim/vim/commit/eb992cb90fd79c77ad2743459ac898e6ac3de939 --- runtime/doc/vim_diff.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime') diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index d61c4d0c06..7426cd0940 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -376,7 +376,6 @@ MS-DOS support: Test functions: test_alloc_fail() test_autochdir() - test_disable_char_avail() test_garbagecollect_now() test_null_channel() test_null_dict() @@ -384,6 +383,7 @@ Test functions: test_null_list() test_null_partial() test_null_string() + test_override() test_settime() Other options: -- cgit From bbdb074aec4f5ae1f61c451fb059e83d790e173e Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 2 Feb 2018 22:27:43 +0100 Subject: vim-patch:8.0.0721: :argedit can only have one argument Problem: :argedit can only have one argument. Solution: Allow for multiple arguments. (Christian Brabandt) https://github.com/vim/vim/commit/90305c66a8637ea43a6509c7ab597734dd218365 --- runtime/doc/editing.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'runtime') diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt index 1b9a1b38fb..5939cb8a8b 100644 --- a/runtime/doc/editing.txt +++ b/runtime/doc/editing.txt @@ -562,16 +562,16 @@ list of the current window. buffer. Also see |++opt| and |+cmd|. -:[count]arge[dit][!] [++opt] [+cmd] {name} *:arge* *:argedit* - Add {name} to the argument list and edit it. +:[count]arge[dit][!] [++opt] [+cmd] {name} .. *:arge* *:argedit* + Add {name}s to the argument list and edit it. When {name} already exists in the argument list, this entry is edited. This is like using |:argadd| and then |:edit|. - Note that only one file name is allowed, and spaces - inside the file name are allowed, like with |:edit|. + Spaces in filenames have to be escaped with "\". [count] is used like with |:argadd|. - [!] is required if the current file cannot be - |abandon|ed. + If the current file cannot be |abandon|ed {name}s will + still be added to the argument list, but won't be + edited. No check for duplicates is done. Also see |++opt| and |+cmd|. :[count]arga[dd] {name} .. *:arga* *:argadd* *E479* -- cgit From 16a416836464d64f3054aeb727c773ebe5ac7124 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 3 Feb 2018 11:58:44 +0100 Subject: vim-patch:8.0.0613: the conf filetype is used before ftdetect from packages Problem: The conf filetype detection is done before ftdetect scripts from packages that are added later. Solution: Add the FALLBACK argument to :setfiletype. (closes vim/vim#1679, closes vim/vim#1693) https://github.com/vim/vim/commit/3e54569b17683318e0cb6693ab0024c2ad1e3e8f --- runtime/filetype.vim | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) (limited to 'runtime') diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 76f76af345..90b4fdaa74 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1183,14 +1183,21 @@ au BufNewFile,BufRead *.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,*.md setf markdown " Mason au BufNewFile,BufRead *.mason,*.mhtml,*.comp setf mason -" Matlab or Objective C +" Mathematica, Matlab, Murphi or Objective C au BufNewFile,BufRead *.m call s:FTm() func! s:FTm() let n = 1 - while n < 10 + let saw_comment = 0 " Whether we've seen a multiline comment leader. + while n < 100 let line = getline(n) - if line =~ '^\s*\(#\s*\(include\|import\)\>\|@import\>\|/\*\|//\)' + if line =~ '^\s*/\*' + " /* ... */ is a comment in Objective C and Murphi, so we can't conclude + " it's either of them yet, but track this as a hint in case we don't see + " anything more definitive. + let saw_comment = 1 + endif + if line =~ '^\s*\(#\s*\(include\|import\)\>\|@import\>\|//\)' setf objc return endif @@ -1202,11 +1209,23 @@ func! s:FTm() setf mma return endif + if line =~ '^\c\s*\(\(type\|var\)\>\|--\)' + setf murphi + return + endif let n = n + 1 endwhile - if exists("g:filetype_m") + + if saw_comment + " We didn't see anything definitive, but this looks like either Objective C + " or Murphi based on the comment leader. Assume the former as it is more + " common. + setf objc + elseif exists("g:filetype_m") + " Use user specified default filetype for .m exe "setf " . g:filetype_m else + " Default is matlab setf matlab endif endfunc @@ -2792,12 +2811,12 @@ runtime! ftdetect/*.vim " state. augroup END -" Generic configuration file (check this last, it's just guessing!) +" Generic configuration file. Use FALLBACK, it's just guessing! au filetypedetect BufNewFile,BufRead,StdinReadPost * \ if !did_filetype() && expand("") !~ g:ft_ignore_pat \ && (getline(1) =~ '^#' || getline(2) =~ '^#' || getline(3) =~ '^#' \ || getline(4) =~ '^#' || getline(5) =~ '^#') | - \ setf conf | + \ setf FALLBACK conf | \ endif -- cgit From 9baf60c6170489d3e7ba159d6391f88fed15b9a9 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 3 Feb 2018 12:03:43 +0100 Subject: 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 --- runtime/filetype.vim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'runtime') 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 -- cgit From e15f2b4b9623df739ca38f1115286b2a4d4956cd Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 3 Feb 2018 12:07:59 +0100 Subject: vim-patch:8.0.0906: don't recognize Couchbase files Problem: Don't recognize Couchbase files. Solution: Add filetype detection. (Eugene Ciurana, closes vim/vim#1951) https://github.com/vim/vim/commit/d9bc8a801aeaffa77d4094d43bf97f0ced3db92b --- runtime/filetype.vim | 3 +++ 1 file changed, 3 insertions(+) (limited to 'runtime') diff --git a/runtime/filetype.vim b/runtime/filetype.vim index fb2fad1220..a2e1f23bf1 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1334,6 +1334,9 @@ au BufNewFile,BufRead *.mush setf mush " Mutt setup file (also for Muttng) au BufNewFile,BufRead Mutt{ng,}rc setf muttrc +" N1QL +au BufRead,BufNewfile *.n1ql,*.nql setf n1ql + " Nano au BufNewFile,BufRead */etc/nanorc,*.nanorc setf nanorc -- cgit