From 43c88bb58c32ebed173c2dc892b5c982021ec5f1 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 18 Sep 2018 20:31:15 -0400 Subject: [PATCH 01/36] vim-patch:8.0.1438: filetype detection test not updated for change Problem: Filetype detection test not updated for change. Solution: Update the test. https://github.com/vim/vim/commit/0479e910c423d71e2b96bc721feffad5808e767a --- src/nvim/testdir/test_filetype.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index 43dc383f3d..770ee812ba 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -322,7 +322,9 @@ let s:filename_checks = { \ 'pf': ['pf.conf'], \ 'pfmain': ['main.cf'], \ 'php': ['file.php', 'file.php9', 'file.phtml', 'file.ctp'], - \ 'pike': ['file.pike', 'file.lpc', 'file.ulpc', 'file.pmod'], + \ 'lpc': ['file.lpc', 'file.ulpc'], + \ 'pike': ['file.pike', 'file.pmod'], + \ 'cmod': ['file.cmod'], \ 'pilrc': ['file.rcp'], \ 'pine': ['.pinerc', 'pinerc', '.pinercex', 'pinercex'], \ 'pinfo': ['/etc/pinforc', '/.pinforc'], From a71a180df9c3be88a033dcaee6b64c20b66d446a Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 18 Sep 2018 21:18:55 -0400 Subject: [PATCH 02/36] vim-patch:8.0.1457: clojure now supports a shebang line Problem: Clojure now supports a shebang line. Solution: Detect clojure script from the shebang line. (David Burgin, closes vim/vim#2570) https://github.com/vim/vim/commit/8fd2ffc530f8f01afac53903e6ff95867afd94d7 --- runtime/scripts.vim | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/runtime/scripts.vim b/runtime/scripts.vim index 18263e2842..3279b58a47 100644 --- a/runtime/scripts.vim +++ b/runtime/scripts.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types in scripts " " Maintainer: Bram Moolenaar -" Last change: 2017 Nov 11 +" Last change: 2018 Feb 03 " This file is called by an autocommand for every file that has just been " loaded into a buffer. It checks if the type of file can be recognized by @@ -100,6 +100,10 @@ if s:line1 =~# "^#!" elseif s:name =~# 'make\>' set ft=make + " Pike + elseif s:name =~# '^pike\%(\>\|[0-9]\)' + set ft=pike + " Lua elseif s:name =~# 'lua' set ft=lua @@ -172,6 +176,10 @@ if s:line1 =~# "^#!" elseif s:name =~# 'scala\>' set ft=scala + " Clojure + elseif s:name =~# 'clojure' + set ft=clojure + endif unlet s:name From 5ec671d541da52bf98b3410f9750ab9da540153b Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 18 Sep 2018 21:19:45 -0400 Subject: [PATCH 03/36] vim-patch:8.0.1458: filetype detection test does not check all scripts Problem: Filetype detection test does not check all scripts. Solution: Add most scripts to the test https://github.com/vim/vim/commit/ddb349369d107c14fad9c38baf2f0e2b8514fbf0 --- src/nvim/testdir/test_filetype.vim | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index 770ee812ba..eab9af1d76 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -541,6 +541,40 @@ let s:script_checks = { \ 'strace': [['execve("/usr/bin/pstree", ["pstree"], 0x7ff0 /* 63 vars */) = 0'], \ ['15:17:47 execve("/usr/bin/pstree", ["pstree"], ... "_=/usr/bin/strace"]) = 0'], \ ['__libc_start_main and something']], + \ 'clojure': [['#!/path/clojure']], + \ 'scala': [['#!/path/scala']], + \ 'tcsh': [['#!/path/tcsh']], + \ 'zsh': [['#!/path/zsh']], + \ 'tcl': [['#!/path/tclsh'], + \ ['#!/path/wish'], + \ ['#!/path/expectk'], + \ ['#!/path/itclsh'], + \ ['#!/path/itkwish']], + \ 'expect': [['#!/path/expect']], + \ 'gnuplot': [['#!/path/gnuplot']], + \ 'make': [['#!/path/make']], + \ 'pike': [['#!/path/pike'], + \ ['#!/path/pike0'], + \ ['#!/path/pike9']], + \ 'lua': [['#!/path/lua']], + \ 'perl6': [['#!/path/perl6']], + \ 'perl': [['#!/path/perl']], + \ 'php': [['#!/path/php']], + \ 'python': [['#!/path/python']], + \ 'groovy': [['#!/path/groovy']], + \ 'ruby': [['#!/path/ruby']], + \ 'javascript': [['#!/path/node'], + \ ['#!/path/nodejs'], + \ ['#!/path/rhino']], + \ 'bc': [['#!/path/bc']], + \ 'sed': [['#!/path/sed']], + \ 'ocaml': [['#!/path/ocaml']], + \ 'awk': [['#!/path/awk']], + \ 'wml': [['#!/path/wml']], + \ 'scheme': [['#!/path/scheme']], + \ 'cfengine': [['#!/path/cfengine']], + \ 'erlang': [['#!/path/escript']], + \ 'haskell': [['#!/path/haskell']], \ } func Test_script_detection() From f1f036740a89d7bece1fa7754bfeaad51220e5c7 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 18 Sep 2018 21:20:51 -0400 Subject: [PATCH 04/36] vim-patch:8.0.1465: python2 and python3 detection not tested Problem: Python2 and python3 detection not tested. (Matej Cepl) Solution: Add test for detecting python2 and python3. Also detect a script using "js" as javascript. https://github.com/vim/vim/commit/4bc0bed53695ac67db8d601f2a15e48e7a196688 --- runtime/scripts.vim | 2 +- src/nvim/testdir/test_filetype.vim | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/runtime/scripts.vim b/runtime/scripts.vim index 3279b58a47..ab66c0c0a1 100644 --- a/runtime/scripts.vim +++ b/runtime/scripts.vim @@ -133,7 +133,7 @@ if s:line1 =~# "^#!" set ft=ruby " JavaScript - elseif s:name =~# 'node\(js\)\=\>' || s:name =~# 'rhino\>' + elseif s:name =~# 'node\(js\)\=\>\|js\>' || s:name =~# 'rhino\>' set ft=javascript " BC calculator diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index eab9af1d76..cfdd4b889d 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -560,10 +560,13 @@ let s:script_checks = { \ 'perl6': [['#!/path/perl6']], \ 'perl': [['#!/path/perl']], \ 'php': [['#!/path/php']], - \ 'python': [['#!/path/python']], + \ 'python': [['#!/path/python'], + \ ['#!/path/python2'], + \ ['#!/path/python3']], \ 'groovy': [['#!/path/groovy']], \ 'ruby': [['#!/path/ruby']], \ 'javascript': [['#!/path/node'], + \ ['#!/path/js'], \ ['#!/path/nodejs'], \ ['#!/path/rhino']], \ 'bc': [['#!/path/bc']], From b9204123065f55f022796943bcb77099a00f5e24 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Fri, 19 Oct 2018 19:56:36 -0400 Subject: [PATCH 05/36] vim-patch:8.1.0484: some file types are not recognized Problem: Some file types are not recognized. Solution: Update the file type detection. https://github.com/vim/vim/commit/38654503b04dd5ff4813f81892d9f62db1ff01b9 --- runtime/filetype.vim | 8 ++++---- src/nvim/testdir/test_filetype.vim | 9 +++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 3c158d9012..4390fc878e 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1250,9 +1250,9 @@ au BufNewFile,BufRead */etc/protocols setf protocols " Pyrex au BufNewFile,BufRead *.pyx,*.pxd setf pyrex -" Python, Python Shell Startup Files +" Python, Python Shell Startup and Python Stub Files " Quixote (Python-based web framework) -au BufNewFile,BufRead *.py,*.pyw,.pythonstartup,.pythonrc,*.ptl setf python +au BufNewFile,BufRead *.py,*.pyw,.pythonstartup,.pythonrc,*.ptl,*.pyi setf python " Radiance au BufNewFile,BufRead *.rad,*.mat setf radiance @@ -1401,8 +1401,8 @@ au BufNewFile,BufRead *.sdl,*.pr setf sdl " sed au BufNewFile,BufRead *.sed setf sed -" Sieve (RFC 3028) -au BufNewFile,BufRead *.siv setf sieve +" Sieve (RFC 3028, 5228) +au BufNewFile,BufRead *.siv,*.sieve setf sieve " Sendmail au BufNewFile,BufRead sendmail.cf setf sm diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index cfdd4b889d..5bb8bcd10d 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -162,7 +162,7 @@ let s:filename_checks = { \ 'fetchmail': ['.fetchmailrc'], \ 'fgl': ['file.4gl', 'file.4gh', 'file.m4gl'], \ 'focexec': ['file.fex', 'file.focexec'], - \ 'forth': ['file.fs', 'file.ft'], + \ 'forth': ['file.fs', 'file.ft', 'file.fth'], \ 'fortran': ['file.f', 'file.for', 'file.fortran', 'file.fpp', 'file.ftn', 'file.f77', 'file.f90', 'file.f95', 'file.f03', 'file.f08'], \ 'framescript': ['file.fsl'], \ 'freebasic': ['file.fb', 'file.bi'], @@ -349,7 +349,7 @@ let s:filename_checks = { \ 'protocols': ['/etc/protocols'], \ 'psf': ['file.psf'], \ 'pyrex': ['file.pyx', 'file.pxd'], - \ 'python': ['file.py', 'file.pyw', '.pythonstartup', '.pythonrc', 'file.ptl'], + \ 'python': ['file.py', 'file.pyw', '.pythonstartup', '.pythonrc', 'file.ptl', 'file.pyi'], \ 'quake': ['anybaseq2/file.cfg', 'anyid1/file.cfg', 'quake3/file.cfg'], \ 'radiance': ['file.rad', 'file.mat'], \ 'ratpoison': ['.ratpoisonrc', 'ratpoisonrc'], @@ -388,7 +388,7 @@ let s:filename_checks = { \ 'services': ['/etc/services'], \ 'setserial': ['/etc/serial.conf'], \ 'sh': ['/etc/udev/cdsymlinks.conf'], - \ 'sieve': ['file.siv'], + \ 'sieve': ['file.siv', 'file.sieve'], \ 'simula': ['file.sim'], \ 'sinda': ['file.sin', 'file.s85'], \ 'sisu': ['file.sst', 'file.ssm', 'file.ssi', 'file.-sst', 'file._sst', 'file.sst.meta', 'file.-sst.meta', 'file._sst.meta'], @@ -473,6 +473,7 @@ let s:filename_checks = { \ 'voscm': ['file.cm'], \ 'vrml': ['file.wrl'], \ 'vroom': ['file.vroom'], + \ 'wast': ['file.wast', 'file.wat'], \ 'webmacro': ['file.wm'], \ 'wget': ['.wgetrc', 'wgetrc'], \ 'winbatch': ['file.wbt'], @@ -483,7 +484,7 @@ let s:filename_checks = { \ 'xhtml': ['file.xhtml', 'file.xht'], \ 'xinetd': ['/etc/xinetd.conf'], \ 'xmath': ['file.msc', 'file.msf'], - \ 'xml': ['/etc/blkid.tab', '/etc/blkid.tab.old', 'file.xmi', 'file.csproj', 'file.csproj.user', 'file.ts', 'file.ui', 'file.tpm', '/etc/xdg/menus/file.menu', 'fglrxrc', 'file.xlf', 'file.xliff', 'file.xul'], + \ 'xml': ['/etc/blkid.tab', '/etc/blkid.tab.old', 'file.xmi', 'file.csproj', 'file.csproj.user', 'file.ts', 'file.ui', 'file.tpm', '/etc/xdg/menus/file.menu', 'fglrxrc', 'file.xlf', 'file.xliff', 'file.xul', 'file.wsdl'], \ 'xmodmap': ['anyXmodmap'], \ 'xf86conf': ['xorg.conf', 'xorg.conf-4'], \ 'xpm2': ['file.xpm2'], From e101cdb3d7849761f331c19039b122bf4b77424d Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 27 Oct 2018 19:54:11 -0400 Subject: [PATCH 06/36] vim-patch:8.1.0498: /etc/gitconfig not recognized at a gitconfig file Problem: /etc/gitconfig not recognized at a gitconfig file. Solution: Add pattern to filetype detection. (closes vim/vim#3568) https://github.com/vim/vim/commit/d474686a09ef3f7529e65abe00cf8cd2ea8a95eb --- runtime/filetype.vim | 10 +++++----- src/nvim/testdir/test_filetype.vim | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 4390fc878e..046dee95d6 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -601,12 +601,12 @@ au BufNewFile,BufRead *.mo,*.gdmo setf gdmo au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom " Git -au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG setf gitcommit -au BufNewFile,BufRead *.git/config,.gitconfig,.gitmodules setf gitconfig -au BufNewFile,BufRead *.git/modules/*/config setf gitconfig -au BufNewFile,BufRead */.config/git/config setf gitconfig +au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG setf gitcommit +au BufNewFile,BufRead *.git/config,.gitconfig,/etc/gitconfig setf gitconfig +au BufNewFile,BufRead */.config/git/config setf gitconfig +au BufNewFile,BufRead .gitmodules,*.git/modules/*/config setf gitconfig if !empty($XDG_CONFIG_HOME) - au BufNewFile,BufRead $XDG_CONFIG_HOME/git/config setf gitconfig + au BufNewFile,BufRead $XDG_CONFIG_HOME/git/config setf gitconfig endif au BufNewFile,BufRead git-rebase-todo setf gitrebase au BufRead,BufNewFile .gitsendemail.msg.?????? setf gitsendemail diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index 5bb8bcd10d..4403d89121 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -171,7 +171,7 @@ let s:filename_checks = { \ 'gdmo': ['file.mo', 'file.gdmo'], \ 'gedcom': ['file.ged', 'lltxxxxx.txt'], \ 'gitcommit': ['COMMIT_EDITMSG', 'MERGE_MSG', 'TAG_EDITMSG'], - \ 'gitconfig': ['file.git/config', '.gitconfig', '.gitmodules', 'file.git/modules//config', '/.config/git/config'], + \ 'gitconfig': ['file.git/config', '.gitconfig', '.gitmodules', 'file.git/modules//config', '/.config/git/config', '/etc/gitconfig'], \ 'gitolite': ['gitolite.conf'], \ 'gitrebase': ['git-rebase-todo'], \ 'gitsendemail': ['.gitsendemail.msg.xxxxxx'], From 542513fd8aa5590e9dce67511aeeff611d312843 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 28 Oct 2018 13:44:08 +0100 Subject: [PATCH 07/36] vim-patch:a2a80162deb1 Update runtime files. https://github.com/vim/vim/commit/a2a80162deb1e96e16b097dfe48b61b6eb0824bf --- runtime/doc/editing.txt | 5 +- runtime/doc/eval.txt | 2 + runtime/doc/quickref.txt | 3 +- runtime/doc/remote.txt | 3 +- runtime/doc/usr_41.txt | 1 + runtime/filetype.vim | 4 +- runtime/optwin.vim | 12 +++- runtime/syntax/doxygen.vim | 128 ++++++++++++++++++++++--------------- 8 files changed, 100 insertions(+), 58 deletions(-) diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt index 5aa09503cd..75db5a529c 100644 --- a/runtime/doc/editing.txt +++ b/runtime/doc/editing.txt @@ -825,7 +825,7 @@ Note: When the 'write' option is off, you are not able to write any file. *:w* *:write* *E502* *E503* *E504* *E505* - *E512* *E514* *E667* *E796* + *E512* *E514* *E667* *E796* *E949* :w[rite] [++opt] Write the whole buffer to the current file. This is the normal way to save changes to a file. It fails when the 'readonly' option is set or when there is @@ -881,6 +881,9 @@ used, for example, when the write fails and you want to try again later with ":w #". This can be switched off by removing the 'A' flag from the 'cpoptions' option. +Note that the 'fsync' option matters here. If it's set it may make writes +slower (but safer). + *:sav* *:saveas* :sav[eas][!] [++opt] {file} Save the current buffer under the name {file} and set diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 3f02365dab..6e678790bb 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2611,6 +2611,8 @@ bufexists({expr}) *bufexists()* The result is a Number, which is |TRUE| if a buffer called {expr} exists. If the {expr} argument is a number, buffer numbers are used. + Number zero is the alternate buffer for the current window. + If the {expr} argument is a string it must match a buffer name exactly. The name can be: - Relative to the current directory. diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt index 7067c60d2f..da0bc84fa5 100644 --- a/runtime/doc/quickref.txt +++ b/runtime/doc/quickref.txt @@ -614,7 +614,8 @@ Short explanation of each option: *option-list* 'backupext' 'bex' extension used for the backup file 'backupskip' 'bsk' no backup for files that match these patterns 'balloondelay' 'bdlay' delay in mS before a balloon may pop up -'ballooneval' 'beval' switch on balloon evaluation +'ballooneval' 'beval' switch on balloon evaluation in the GUI +'balloonevalterm' 'bevalterm' switch on balloon evaluation in the terminal 'balloonexpr' 'bexpr' expression to show in balloon 'belloff' 'bo' do not ring the bell for these reasons 'binary' 'bin' read/write/edit file in binary mode diff --git a/runtime/doc/remote.txt b/runtime/doc/remote.txt index 039d8b582e..48ed9d16fc 100644 --- a/runtime/doc/remote.txt +++ b/runtime/doc/remote.txt @@ -169,7 +169,8 @@ name on the 'VimRegistry' property on the root window. A non GUI Vim with access to the X11 display (|xterm-clipboard| enabled), can also act as a command server if a server name is explicitly given with the ---servername argument. +--servername argument, or when Vim was build with the |+autoservername| +feature. An empty --servername argument will cause the command server to be disabled. diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index 7978074550..83d3106bf9 100644 --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -885,6 +885,7 @@ GUI: *gui-functions* getwinposx() X position of the GUI Vim window getwinposy() Y position of the GUI Vim window balloon_show() set the balloon content + balloon_split() split a message for a balloon Vim server: *server-functions* serverlist() return the list of server names diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 3c158d9012..deab1f0f58 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -227,10 +227,10 @@ au BufNewFile,BufRead *.bl setf blank au BufNewFile,BufRead */etc/blkid.tab,*/etc/blkid.tab.old setf xml " Bazel (http://bazel.io) -autocmd BufRead,BufNewFile *.bzl,WORKSPACE setf bzl +autocmd BufRead,BufNewFile *.bzl,WORKSPACE,BUILD.bazel setf bzl if has("fname_case") " There is another check for BUILD further below. - autocmd BufRead,BufNewFile BUILD setf bzl + autocmd BufRead,BufNewFile BUILD setf bzl endif " C or lpc diff --git a/runtime/optwin.vim b/runtime/optwin.vim index 0c9f0ed45e..c3a17d3e94 100644 --- a/runtime/optwin.vim +++ b/runtime/optwin.vim @@ -614,11 +614,17 @@ if has("gui") endif call append("$", "linespace\tnumber of pixel lines to use between characters") call append("$", " \tset lsp=" . &lsp) - if has("balloon_eval") + if has("balloon_eval") || has("balloon_eval_term") call append("$", "balloondelay\tdelay in milliseconds before a balloon may pop up") call append("$", " \tset bdlay=" . &bdlay) - call append("$", "ballooneval\twhether the balloon evaluation is to be used") - call BinOptionG("beval", &beval) + if has("balloon_eval") + call append("$", "ballooneval\tuse balloon evaluation in the GUI") + call BinOptionG("beval", &beval) + endif + if has("balloon_eval_term") + call append("$", "balloonevalterm\tuse balloon evaluation in the terminal") + call BinOptionG("bevalterm", &beval) + endif if has("eval") call append("$", "balloonexpr\texpression to show in balloon eval") call append("$", " \tset bexpr=" . &bexpr) diff --git a/runtime/syntax/doxygen.vim b/runtime/syntax/doxygen.vim index 6bd3726279..adc0c41dd6 100644 --- a/runtime/syntax/doxygen.vim +++ b/runtime/syntax/doxygen.vim @@ -2,11 +2,10 @@ " Language: doxygen on top of c, cpp, idl, java, php " Maintainer: Michael Geddes " Author: Michael Geddes -" Last Changes: Jan 2009 (\tparam by Domnique Pelle, Aug 2013) -" Nov 2017 (@throws by Domnique Pelle) -" Version: 1.23 +" Last Change: November 2017 (\throws by Candy Gumdrop) +" Version: 1.27 " -" Copyright 2004-2008 Michael Geddes +" Copyright 2004-2017 Michael Geddes " Please feel free to use, modify & distribute all or part of this script, " providing this copyright message remains. " I would appreciate being acknowledged in any derived scripts, and would @@ -59,52 +58,76 @@ try " " C/C++ Style line comments - syn region doxygenComment start=+/\*\(\*/\)\@![*!]+ end=+\*/+ contains=doxygenSyncStart,doxygenStart,doxygenTODO keepend fold containedin=phpRegion - syn region doxygenCommentL start=+//[/!]<\@!+me=e-1 end=+$+ contains=doxygenStartL,@Spell keepend skipwhite skipnl nextgroup=doxygenComment2 fold containedin=phpRegion + syn match doxygenCommentWhite +\s*\ze/\*\(\*/\)\@![*!]+ containedin=phpRegion + syn match doxygenCommentWhite +\s*\ze//[/!]+ containedin=phpRegion + syn match doxygenCommentWhite +\s*\ze/\*\(\*/\)\@![*!]+ + syn match doxygenCommentWhite +\s*\ze//[/!]+ containedin=phpRegion + + syn region doxygenComment start=+/\*\(\*/\)\@![*!]+ end=+\*/+ contains=doxygenSyncStart,doxygenStart,doxygenTODO,doxygenLeadingWhite keepend fold containedin=phpRegion + syn region doxygenCommentL start=+//[/!]<\@!+me=e-1 end=+$+ contains=doxygenLeadingLWhite,doxygenStartL,@Spell keepend skipwhite skipnl nextgroup=doxygenCommentWhite2 fold containedin=phpRegion syn region doxygenCommentL start=+//[/!]<+me=e-2 end=+$+ contains=doxygenStartL,@Spell keepend skipwhite skipnl fold containedin=phpRegion syn region doxygenCommentL start=+//@\ze[{}]+ end=+$+ contains=doxygenGroupDefine,doxygenGroupDefineSpecial,@Spell fold containedin=phpRegion + syn region doxygenComment start=+/\*@\ze[{}]+ end=+\*/+ contains=doxygenGroupDefine,doxygenGroupDefineSpecial,@Spell fold containedin=phpRegion " Single line brief followed by multiline comment. + syn match doxygenCommentWhite2 +\_s*\ze/\*\(\*/\)\@![*!]+ contained nextgroup=doxygenComment2 syn region doxygenComment2 start=+/\*\(\*/\)\@![*!]+ end=+\*/+ contained contains=doxygenSyncStart2,doxygenStart2,doxygenTODO keepend fold " This helps with sync-ing as for some reason, syncing behaves differently to a normal region, and the start pattern does not get matched. syn match doxygenSyncStart2 +[^*/]+ contained nextgroup=doxygenBody,doxygenPrev,doxygenStartSpecial,doxygenSkipComment,doxygenStartSkip2 skipwhite skipnl " Skip empty lines at the start for when comments start on the 2nd/3rd line. - syn match doxygenStartSkip2 +^\s*\*[^/]+me=e-1 contained nextgroup=doxygenBody,doxygenStartSpecial,doxygenStartSkip skipwhite skipnl - syn match doxygenStartSkip2 +^\s*\*$+ contained nextgroup=doxygenBody,doxygenStartSpecial,,doxygenStartSkip skipwhite skipnl + syn match doxygenStartSkip2 +^\s*\*[^/]+me=e-1 contained nextgroup=doxygenBody,doxygenStartSpecial,doxygenStartSkipWhite skipwhite skipnl + syn match doxygenStartSkip2 +^\s*\*$+ contained nextgroup=doxygenBody,doxygenStartSpecial,doxygenStartSkipWhite skipwhite skipnl syn match doxygenStart2 +/\*[*!]+ contained nextgroup=doxygenBody,doxygenPrev,doxygenStartSpecial,doxygenStartSkip2 skipwhite skipnl " Match the Starting pattern (effectively creating the start of a BNF) if !exists('g:doxygen_javadoc_autobrief') || g:doxygen_javadoc_autobrief - syn match doxygenStart +/\*[*!]+ contained nextgroup=doxygenBrief,doxygenPrev,doxygenFindBriefSpecial,doxygenStartSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl - syn match doxygenStartL +//[/!]+ contained nextgroup=doxygenPrevL,doxygenBriefL,doxygenSpecial skipwhite + syn match doxygenStart +/\*[*!]+ contained nextgroup=doxygenBrief,doxygenPrev,doxygenFindBriefSpecial,doxygenStartSpecial,doxygenStartSkipWhite,doxygenPage skipwhite skipnl + syn match doxygenLeadingLWhite +\s\++ contained nextgroup=doxygenPrevL,doxygenBriefL,doxygenSpecial + syn match doxygenStartL +//[/!]+ contained nextgroup=doxygenLeaingLWhite,doxygenPrevL,doxygenBriefL,doxygenSpecial " Match the first sentence as a brief comment if ! exists('g:doxygen_end_punctuation') let g:doxygen_end_punctuation='[.]' endif - exe 'syn region doxygenBrief contained start=+[\\@]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]+ start=+\(^\s*\)\@\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\@=+ contains=doxygenSmallSpecial,doxygenContinueComment,doxygenBriefEndComment,doxygenFindBriefSpecial,doxygenSmallSpecial,@doxygenHtmlGroup,doxygenTODO,doxygenHyperLink,doxygenHashLink,@Spell skipnl nextgroup=doxygenBody' + exe 'syn region doxygenBrief contained start=+[\\@]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]+ start=+\(^\s*\)\@\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\@=+ contains=doxygenSmallSpecial,doxygenContinueCommentWhite,doxygenLeadingWhite,doxygenBriefEndComment,doxygenFindBriefSpecial,doxygenSmallSpecial,@doxygenHtmlGroup,doxygenTODO,doxygenHyperLink,doxygenHashLink,@Spell skipnl nextgroup=doxygenBody' syn match doxygenBriefEndComment +\*/+ contained exe 'syn region doxygenBriefL start=+@\k\@!\|[\\@]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@]+ start=+\<+ skip=+'.doxygen_end_punctuation.'\S+ end=+'.doxygen_end_punctuation.'\|$+ contained contains=doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup,@Spell keepend' syn match doxygenPrevL +<+ contained nextgroup=doxygenBriefL,doxygenSpecial skipwhite else - syn match doxygenStart +/\*[*!]+ contained nextgroup=doxygenBody,doxygenPrev,doxygenFindBriefSpecial,doxygenStartSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl - syn match doxygenStartL +//[/!]+ contained nextgroup=doxygenPrevL,doxygenLine,doxygenSpecial skipwhite + syn match doxygenStart +/\*[*!]+ contained nextgroup=doxygenBody,doxygenPrev,doxygenFindBriefSpecial,doxygenStartSpecial,doxygenStartSkipWhite,doxygenPage skipwhite skipnl + syn match doxygenStartL +//[/!]+ contained nextgroup=doxygenLeadingLWhite,doxygenPrevL,doxygenLine,doxygenSpecial + syn match doxygenLeadingLWhite +\s\++ contained nextgroup=doxygenPrevL,doxygenLine,doxygenSpecial syn region doxygenLine start=+@\k\@!\|[\\@]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@<]+ start=+\<+ end='$' contained contains=doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup,@Spell keepend syn match doxygenPrevL +<+ contained nextgroup=doxygenLine,doxygenSpecial skipwhite endif " This helps with sync-ing as for some reason, syncing behaves differently to a normal region, and the start pattern does not get matched. - syn match doxygenSyncStart +\ze[^*/]+ contained nextgroup=doxygenBrief,doxygenPrev,doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl + syn match doxygenSyncStart +\ze[^*/]+ contained nextgroup=doxygenBrief,doxygenPrev,doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkipWhite,doxygenPage skipwhite skipnl + " Match an [@\]brief so that it moves to body-mode. + " + " + " syn match doxygenBriefLine contained + syn match doxygenBriefSpecial contained +[@\\]+ nextgroup=doxygenBriefWord skipwhite + " syn region doxygenFindBriefSpecial start=+[@\\]brief\>+ end=+\(\n\s*\*\=\s*\([@\\]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\|\s*$\)\@=+ keepend contains=doxygenBriefSpecial nextgroup=doxygenBody keepend skipwhite skipnl contained + syn region doxygenFindBriefSpecial start=+[@\\]brief\>+ skip=+^\s*\(\*/\@!\s*\)\=\(\<\|[@\\]\<\([npcbea]\>\|em\>\|ref\|link\>\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]\)+ end=+^+ keepend contains=doxygenBriefSpecial nextgroup=doxygenBody keepend skipwhite skipnl contained + + + +" end=+\(\n\s*\*\=\s*\([@\\]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\|\s*$\)\@=+ +"syn region doxygenBriefLine contained start=+\<\k+ skip=+^\s*\(\*/\@!\s*\)\=\(\<\|[@\\]\<\([npcbea]\>\|em\>\|ref\|link\>\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]\)+ end=+^+ contains=doxygenContinueCommentWhite,doxygenSmallSpecial,@doxygenHtmlGroup,doxygenTODO,doxygenHyperLink,doxygenHashLink,@Spell skipwhite keepend matchgroup=xxx +syn region doxygenBriefLine contained start=+\<\k+ skip=+^\s*\(\*/\@!\s*\)\=\(\<\|[@\\]\<\([npcbea]\>\|em\>\|ref\|link\>\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]\)+ end=+^+ skipwhite keepend matchgroup=xxx +" syn region doxygenBriefLine matchgroup=xxxy contained start=+\<\k.\++ skip=+^\s*\k+ end=+end+ skipwhite keepend +"doxygenFindBriefSpecial, + "" syn region doxygenSpecialMultilineDesc start=+.\++ contained contains=doxygenSpecialContinueCommentWhite,doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup,@Spell skipwhite keepend - syn region doxygenBriefLine contained start=+\<\k+ end=+\(\n\s*\*\=\s*\([@\\]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\|\s*$\)\@=+ contains=doxygenContinueComment,doxygenFindBriefSpecial,doxygenSmallSpecial,@doxygenHtmlGroup,doxygenTODO,doxygenHyperLink,doxygenHashLink,@Spell skipwhite keepend " Match a '<' for applying a comment to the previous element. - syn match doxygenPrev +<+ contained nextgroup=doxygenBrief,doxygenBody,doxygenSpecial,doxygenStartSkip skipwhite + syn match doxygenPrev +<+ contained nextgroup=doxygenBrief,doxygenBody,doxygenSpecial,doxygenStartSkipWhite skipwhite if exists("c_comment_strings") " These are anti-Doxygen comments. If there are more than two asterisks or 3 '/'s @@ -123,10 +146,11 @@ endif "syn region doxygenBodyBit contained start=+$+ " The main body of a doxygen comment. - syn region doxygenBody contained start=+\(/\*[*!]\)\@+ end=+\(\n\s*\*\=\s*\([@\\]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\|\s*$\)\@=+ keepend contains=doxygenBriefSpecial nextgroup=doxygenBody keepend skipwhite skipnl contained - - " Create the single word matching special identifiers. fun! s:DxyCreateSmallSpecial( kword, name ) let mx='[-:0-9A-Za-z_%=&+*/!~>|]\@|#]\+[-0-9A-Za-z_%=+*/!~>|]\@!\|\\[\\<>&.]@\|[.,][0-9a-zA-Z_]\@=\|::\|([^)]*)\|&[0-9a-zA-Z]\{2,7};\)\+' - exe 'syn region doxygenSpecial'.a:name.'Word contained start=+'.a:kword.'+ end=+\(\_s\+'.mx.'\)\@<=[-a-zA-Z_0-9+*/^%|~!=&\\]\@!+ skipwhite contains=doxygenContinueComment,doxygen'.a:name.'Word' + exe 'syn region doxygenSpecial'.a:name.'Word contained start=+'.a:kword.'+ end=+\(\_s\+'.mx.'\)\@<=[-a-zA-Z_0-9+*/^%|~!=&\\]\@!+ skipwhite contains=doxygenContinueCommentWhite,doxygen'.a:name.'Word' exe 'syn match doxygen'.a:name.'Word contained "\_s\@<='.mx.'" contains=doxygenHtmlSpecial,@Spell keepend' endfun call s:DxyCreateSmallSpecial('p', 'Code') @@ -180,40 +196,42 @@ endif " Match parameters and retvals (highlighting the first word as special). syn match doxygenParamDirection contained "\v\[(\s*in>((]\s*\[|\s*,\s*)out>)=|out>((]\s*\[|\s*,\s*)in>)=)\]" nextgroup=doxygenParamName skipwhite - syn keyword doxygenParam contained param tparam nextgroup=doxygenParamName,doxygenParamDirection skipwhite + syn keyword doxygenParam contained param nextgroup=doxygenParamName,doxygenParamDirection skipwhite + syn keyword doxygenTParam contained tparam nextgroup=doxygenParamName skipwhite syn match doxygenParamName contained +[A-Za-z0-9_:]\++ nextgroup=doxygenSpecialMultilineDesc skipwhite syn keyword doxygenRetval contained retval throw throws exception nextgroup=doxygenParamName skipwhite " Match one line identifiers. syn keyword doxygenOther contained addindex anchor \ dontinclude endhtmlonly endlatexonly showinitializer hideinitializer - \ example htmlonly image include ingroup internal latexonly line - \ overload related relates relatedalso relatesalso sa skip skipline + \ example htmlonly image include includelineno ingroup internal latexonly line + \ overload relates relatesalso sa skip skipline \ until verbinclude version addtogroup htmlinclude copydoc dotfile \ xmlonly endxmlonly - \ nextgroup=doxygenSpecialOnelineDesc + \ nextgroup=doxygenSpecialOnelineDesc copybrief copydetails copyright dir extends + \ implements - syn region doxygenCodeRegion contained matchgroup=doxygenOther start=+\+ matchgroup=doxygenOther end=+[\\@]\@<=\+ contains=doxygenCodeRegionSpecial,doxygenContinueComment,doxygenErrorComment,@NoSpell + syn region doxygenCodeRegion contained matchgroup=doxygenOther start=+\+ matchgroup=doxygenOther end=+[\\@]\@<=\+ contains=doxygenCodeRegionSpecial,doxygenContinueCommentWhite,doxygenErrorComment,@NoSpell syn match doxygenCodeRegionSpecial contained +[\\@]\(endcode\>\)\@=+ - syn region doxygenVerbatimRegion contained matchgroup=doxygenOther start=+\+ matchgroup=doxygenOther end=+[\\@]\@<=\+ contains=doxygenVerbatimRegionSpecial,doxygenContinueComment,doxygenErrorComment,@NoSpell + syn region doxygenVerbatimRegion contained matchgroup=doxygenOther start=+\+ matchgroup=doxygenOther end=+[\\@]\@<=\+ contains=doxygenVerbatimRegionSpecial,doxygenContinueCommentWhite,doxygenErrorComment,@NoSpell syn match doxygenVerbatimRegionSpecial contained +[\\@]\(endverbatim\>\)\@=+ - if exists('b:current_syntax') + if exists('b:current_syntax') let b:doxygen_syntax_save=b:current_syntax unlet b:current_syntax endif syn include @Dotx syntax/dot.vim - if exists('b:doxygen_syntax_save') + if exists('b:doxygen_syntax_save') let b:current_syntax=b:doxygen_syntax_save unlet b:doxygen_syntax_save else unlet b:current_syntax endif - syn region doxygenDotRegion contained matchgroup=doxygenOther start=+\+ matchgroup=doxygenOther end=+[\\@]\@<=\+ contains=doxygenDotRegionSpecial,doxygenErrorComment,doxygenContinueComment,@NoSpell,@Dotx + syn region doxygenDotRegion contained matchgroup=doxygenOther start=+\+ matchgroup=doxygenOther end=+[\\@]\@<=\+ contains=doxygenDotRegionSpecial,doxygenErrorComment,doxygenContinueCommentWhite,@NoSpell,@Dotx syn match doxygenDotRegionSpecial contained +[\\@]\(enddot\>\)\@=+ " Match single line identifiers. @@ -224,13 +242,13 @@ endif syn keyword doxygenOther contained par nextgroup=doxygenHeaderLine syn region doxygenHeaderLine start=+.+ end=+^+ contained skipwhite nextgroup=doxygenSpecialMultilineDesc - syn keyword doxygenOther contained arg author authors date deprecated li result return returns see invariant note post pre remark remarks since test nextgroup=doxygenSpecialMultilineDesc + syn keyword doxygenOther contained arg author authors date deprecated li return returns see invariant note post pre remarks since test nextgroup=doxygenSpecialMultilineDesc syn keyword doxygenOtherTODO contained todo attention nextgroup=doxygenSpecialMultilineDesc syn keyword doxygenOtherWARN contained warning nextgroup=doxygenSpecialMultilineDesc syn keyword doxygenOtherBUG contained bug nextgroup=doxygenSpecialMultilineDesc " Handle \link, \endlink, highlighting the link-to and the link text bits separately. - syn region doxygenOtherLink matchgroup=doxygenOther start=+\+ end=+[\@]\@<=endlink\>+ contained contains=doxygenLinkWord,doxygenContinueComment,doxygenLinkError,doxygenEndlinkSpecial + syn region doxygenOtherLink matchgroup=doxygenOther start=+\+ end=+[\@]\@<=endlink\>+ contained contains=doxygenLinkWord,doxygenContinueCommentWhite,doxygenLinkError,doxygenEndlinkSpecial syn match doxygenEndlinkSpecial contained +[\\@]\zeendlink\>+ syn match doxygenLinkWord "[_a-zA-Z:#()][_a-z0-9A-Z:#()]*\>" contained skipnl nextgroup=doxygenLinkRest,doxygenContinueLinkComment @@ -250,7 +268,7 @@ endif " Handle section syn keyword doxygenOther defgroup section subsection subsubsection weakgroup contained skipwhite nextgroup=doxygenSpecialIdent - syn region doxygenSpecialSectionDesc start=+.\++ end=+$+ contained skipwhite contains=doxygenSmallSpecial,@doxygenHtmlGroup keepend skipwhite skipnl nextgroup=doxygenContinueComment + syn region doxygenSpecialSectionDesc start=+.\++ end=+$+ contained skipwhite contains=doxygenSmallSpecial,@doxygenHtmlGroup keepend skipwhite skipnl nextgroup=doxygenContinueCommentWhite syn match doxygenSpecialIdent "\<[a-zA-Z_0-9]\+\>" contained nextgroup=doxygenSpecialSectionDesc " Does the one-line description for the one-line type identifiers. @@ -260,8 +278,12 @@ endif " Handle the multiline description for the multiline type identifiers. " Continue until an 'empty' line (can contain a '*' continuation) or until the " next whole-line @ command \ command. - syn region doxygenSpecialMultilineDesc start=+.\++ skip=+^\s*\(\*/\@!\s*\)\=\(\<\|[@\\]\<\([npcbea]\>\|em\>\|ref\|link\>\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]\)+ end=+^+ contained contains=doxygenSpecialContinueComment,doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup,@Spell skipwhite keepend - syn match doxygenSpecialContinueComment contained +^\s*\*/\@!\s*+ nextgroup=doxygenSpecial skipwhite + syn region doxygenSpecialMultilineDesc start=+.\++ skip=+^\s*\(\*/\@!\s*\)\=\(\<\|[@\\]\<\([npcbea]\>\|em\>\|ref\|link\>\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]\)+ end=+^+ contained contains=doxygenSpecialContinueCommentWhite,doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup,@Spell skipwhite keepend + +" syn match doxygenSpecialContinueComment contained +^\s*\*/\@!\s*+ nextgroup=doxygenSpecial skipwhite + syn match doxygenSpecialContinueCommentWhite contained +^\s*\ze\*+ nextgroup=doxygenSpecialContinueComment + syn match doxygenSpecialContinueComment contained +\*/\@!+ + " Handle special cases 'bold' and 'group' syn keyword doxygenBold contained bold nextgroup=doxygenSpecialHeading @@ -288,7 +310,7 @@ endif " Supported HTML subset. Not perfect, but okay. syn case ignore - syn region doxygenHtmlTag contained matchgroup=doxygenHtmlCh start=+\v\+ skip=+\\<\|\<\k\+=\("[^"]*"\|'[^']*\)+ end=+>+ contains=doxygenHtmlCmd,doxygenContinueComment,doxygenHtmlVar + syn region doxygenHtmlTag contained matchgroup=doxygenHtmlCh start=+\v\+ skip=+\\<\|\<\k\+=\("[^"]*"\|'[^']*\)+ end=+>+ contains=doxygenHtmlCmd,doxygenContinueCommentWhite,doxygenHtmlVar syn keyword doxygenHtmlCmd contained b i em strong u img a br p center code dfn dl dd dt hr h1 h2 h3 li ol ul pre small sub sup table tt var caption nextgroup=doxygenHtmlVar skipwhite syn keyword doxygenHtmlVar contained src alt longdesc name height width usemap ismap href type nextgroup=doxygenHtmlEqu skipwhite syn match doxygenHtmlEqu contained +=+ nextgroup=doxygenHtmlExpr skipwhite @@ -298,7 +320,7 @@ endif syn cluster doxygenHtmlGroup contains=doxygenHtmlCode,doxygenHtmlBold,doxygenHtmlUnderline,doxygenHtmlItalic,doxygenHtmlSpecial,doxygenHtmlTag,doxygenHtmlLink - syn cluster doxygenHtmlTop contains=@Spell,doxygenHtmlSpecial,doxygenHtmlTag,doxygenContinueComment + syn cluster doxygenHtmlTop contains=@Spell,doxygenHtmlSpecial,doxygenHtmlTag,doxygenContinueCommentWhite " Html Support syn region doxygenHtmlLink contained start=+<[aA]\>\s*\(\n\s*\*\s*\)\=\(\(name\|href\)=\("[^"]*"\|'[^']*'\)\)\=\s*>+ end=++me=e-4 contains=@doxygenHtmlTop hi link doxygenHtmlLink Underlined @@ -343,7 +365,7 @@ endif syn cluster rcGroup add=doxygen.* let s:my_syncolor=0 - if !exists(':SynColor') + if !exists(':SynColor') command -nargs=+ SynColor hi def let s:my_syncolor=1 endif @@ -469,6 +491,8 @@ endif call s:Doxygen_Hilights() + syn match doxygenLeadingWhite +\(^\s*\*\)\@<=\s*+ contained + " This is still a proposal, but won't do any harm. aug doxygengroup au! @@ -483,6 +507,7 @@ endif SynLink doxygenOtherTODO Todo SynLink doxygenOtherWARN Todo SynLink doxygenOtherBUG Todo + SynLink doxygenLeadingLWhite doxygenBody SynLink doxygenErrorSpecial Error SynLink doxygenErrorEnd Error @@ -517,7 +542,10 @@ endif SynLink doxygenBriefL doxygenBrief SynLink doxygenBriefLine doxygenBrief SynLink doxygenHeaderLine doxygenSpecialHeading - SynLink doxygenStartSkip doxygenContinueComment + SynLink doxygenCommentWhite Normal + SynLink doxygenCommentWhite2 doxygenCommentWhite + SynLink doxygenContinueCommentWhite doxygenCommentWhite + SynLink doxygenStartSkipWhite doxygenContinueCommentWhite SynLink doxygenLinkWord doxygenParamName SynLink doxygenLinkRest doxygenSpecialMultilineDesc SynLink doxygenHyperLink doxygenLinkWord @@ -591,5 +619,5 @@ finally let &cpo = s:cpo_save unlet s:cpo_save endtry - +let suppress_doxygen=1 " vim:et sw=2 sts=2 From f29c2fc4a8adae35d277b6eb815aee6f5ecb6bf1 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 28 Oct 2018 13:48:54 +0100 Subject: [PATCH 08/36] vim-patch:461fe50fea24 patch 8.0.1367: terminal test hangs, executing abcde Problem: terminal test hangs, executing abcde. (Stucki) Solution: Rename abcde to abxde. https://github.com/vim/vim/commit/461fe50fea245b2b199d92ebce4d9875d856bd27 From b9a6df58cc7674153728605f48029c4c7bbe1a84 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 28 Oct 2018 13:50:36 +0100 Subject: [PATCH 09/36] vim-patch:4697399e8c80 move netrw back to the previous version https://github.com/vim/vim/commit/4697399e8c805325009351a2488e3da530d0af38 From dae1213e57da36aaa805425636d11712c746fe49 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 28 Oct 2018 13:51:36 +0100 Subject: [PATCH 10/36] vim-patch:f0b03c4e98f8 Update runtime files https://github.com/vim/vim/commit/f0b03c4e98f8a7184d8b4a5d702cbcd602426923 Note: haskell changes were included in 942f3587c38a83cf6486a0b779765b54a1648493 --- runtime/autoload/dist/ft.vim | 8 +- runtime/doc/eval.txt | 27 +++++ runtime/doc/filetype.txt | 19 ++++ runtime/doc/repeat.txt | 4 + runtime/doc/usr_41.txt | 1 + runtime/filetype.vim | 3 + runtime/ftplugin/vim.vim | 32 +++--- runtime/ftplugin/zimbu.vim | 8 +- runtime/indent/javascript.vim | 183 +++++++++++++++++++-------------- runtime/syntax/apachestyle.vim | 8 +- runtime/syntax/html.vim | 14 +-- runtime/syntax/tex.vim | 23 ++--- runtime/syntax/vim.vim | 7 +- 13 files changed, 213 insertions(+), 124 deletions(-) diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim index 2603c6822f..81fdc9d956 100644 --- a/runtime/autoload/dist/ft.vim +++ b/runtime/autoload/dist/ft.vim @@ -1,7 +1,7 @@ " Vim functions for file type detection " " Maintainer: Bram Moolenaar -" Last Change: 2017 Nov 11 +" Last Change: 2017 Dec 05 " These functions are moved here from runtime/filetype.vim to make startup " faster. @@ -618,7 +618,11 @@ func dist#ft#FTperl() setf perl return 1 endif - if search('^use\s\s*\k', 'nc', 30) + let save_cursor = getpos('.') + call cursor(1,1) + let has_use = search('^use\s\s*\k', 'c', 30) + call setpos('.', save_cursor) + if has_use setf perl return 1 endif diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 6e678790bb..7b1857883b 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2194,6 +2194,8 @@ msgpackdump({list}) List dump a list of objects to msgpack msgpackparse({list}) List parse msgpack to a list of objects nextnonblank({lnum}) Number line nr of non-blank line >= {lnum} nr2char({expr}[, {utf8}]) String single char with ASCII/UTF8 value {expr} +option_restore({list}) none restore options saved by option_save() +option_save({list}) List save options values nvim_...({args}...) any call nvim |api| functions or({expr}, {expr}) Number bitwise OR pathshorten({expr}) String shorten directory names in a path @@ -5882,6 +5884,31 @@ nvim_...({...}) *nvim_...()* *eval-api* also take the numerical value 0 to indicate the current (focused) object. +option_restore({list}) *option_restore()* + Restore options previously saved by option_save(). + When buffer-local options have been saved, this function must + be called when the same buffer is the current buffer. + When window-local options have been saved, this function must + be called when the same window is the current window. + When in the wrong buffer and/or window an error is given and + the local options won't be restored. + NOT IMPLEMENTED YET! + +option_save({list}) *option_save()* + Saves the options named in {list}. The returned value can be + passed to option_restore(). Example: > + let s:saved_options = option_save([ + \ 'ignorecase', + \ 'iskeyword', + \ ]) + au BufLeave * + \ call option_restore(s:saved_options) +< The advantage over using `:let` is that global and local + values are handled and the script ID is restored, so that + `:verbose set` will show where the option was originally set, + not where it was restored. + NOT IMPLEMENTED YET! + or({expr}, {expr}) *or()* Bitwise OR on the two arguments. The arguments are converted to a number. A List, Dict or Float argument causes an error. diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt index 6ac14e4122..4d16a2eaf6 100644 --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -750,4 +750,23 @@ You can change the default by defining the variable g:tex_flavor to the format Currently no other formats are recognized. +VIM *ft-vim-plugin* + +The Vim filetype plugin defines mappings to move to the start and end of +functions with [[ and ]]. Move around comments with ]" and [". + +The mappings can be disabled with: > + let g:no_vim_maps = 1 + + +ZIMBU *ft-zimbu-plugin* + +The Zimbu filetype plugin defines mappings to move to the start and end of +functions with [[ and ]]. + +The mappings can be disabled with: > + let g:no_zimbu_maps = 1 +< + + vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt index 42889cca50..b63ece7d2d 100644 --- a/runtime/doc/repeat.txt +++ b/runtime/doc/repeat.txt @@ -226,6 +226,10 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|. If the directory pack/*/opt/{name}/after exists it is added at the end of 'runtimepath'. + If loading packages from "pack/*/start" was skipped, + then this directory is searched first: + pack/*/start/{name} ~ + Note that {name} is the directory name, not the name of the .vim file. All the files matching the pattern pack/*/opt/{name}/plugin/**/*.vim ~ diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index 83d3106bf9..95d1813104 100644 --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -901,6 +901,7 @@ Vim server: *server-functions* Window size and position: *window-size-functions* winheight() get height of a specific window winwidth() get width of a specific window + win_screenpos() get screen position of a window winrestcmd() return command to restore window sizes winsaveview() get view of current window winrestview() restore saved view of current window diff --git a/runtime/filetype.vim b/runtime/filetype.vim index deab1f0f58..bb8d210539 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1924,6 +1924,9 @@ au StdinReadPost * if !did_filetype() | runtime! scripts.vim | endif " Most of these should call s:StarSetf() to avoid names ending in .gz and the " like are used. +" More Apache style config files +au BufNewFile,BufRead */etc/proftpd/*.conf*,*/etc/proftpd/conf.*/* call s:StarSetf('apachestyle') + " More Apache config files au BufNewFile,BufRead access.conf*,apache.conf*,apache2.conf*,httpd.conf*,srm.conf* call s:StarSetf('apache') au BufNewFile,BufRead */etc/apache2/*.conf*,*/etc/apache2/conf.*/*,*/etc/apache2/mods-*/*,*/etc/apache2/sites-*/*,*/etc/httpd/conf.d/*.conf* call s:StarSetf('apache') diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim index f34655f330..59ea349710 100644 --- a/runtime/ftplugin/vim.vim +++ b/runtime/ftplugin/vim.vim @@ -1,7 +1,7 @@ " Vim filetype plugin " Language: Vim " Maintainer: Bram Moolenaar -" Last Change: 2017 Nov 06 +" Last Change: 2017 Dec 05 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -42,21 +42,23 @@ setlocal commentstring=\"%s " Prefer Vim help instead of manpages. setlocal keywordprg=:help -" Move around functions. -nnoremap [[ m':call search('^\s*fu\%[nction]\>', "bW") -vnoremap [[ m':exe "normal! gv"call search('^\s*fu\%[nction]\>', "bW") -nnoremap ]] m':call search('^\s*fu\%[nction]\>', "W") -vnoremap ]] m':exe "normal! gv"call search('^\s*fu\%[nction]\>', "W") -nnoremap [] m':call search('^\s*endf*\%[unction]\>', "bW") -vnoremap [] m':exe "normal! gv"call search('^\s*endf*\%[unction]\>', "bW") -nnoremap ][ m':call search('^\s*endf*\%[unction]\>', "W") -vnoremap ][ m':exe "normal! gv"call search('^\s*endf*\%[unction]\>', "W") +if !exists("no_plugin_maps") && !exists("no_vim_maps") + " Move around functions. + nnoremap [[ m':call search('^\s*fu\%[nction]\>', "bW") + vnoremap [[ m':exe "normal! gv"call search('^\s*fu\%[nction]\>', "bW") + nnoremap ]] m':call search('^\s*fu\%[nction]\>', "W") + vnoremap ]] m':exe "normal! gv"call search('^\s*fu\%[nction]\>', "W") + nnoremap [] m':call search('^\s*endf*\%[unction]\>', "bW") + vnoremap [] m':exe "normal! gv"call search('^\s*endf*\%[unction]\>', "bW") + nnoremap ][ m':call search('^\s*endf*\%[unction]\>', "W") + vnoremap ][ m':exe "normal! gv"call search('^\s*endf*\%[unction]\>', "W") -" Move around comments -nnoremap ]" :call search('^\(\s*".*\n\)\@ -vnoremap ]" :exe "normal! gv"call search('^\(\s*".*\n\)\@ -nnoremap [" :call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW") -vnoremap [" :exe "normal! gv"call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW") + " Move around comments + nnoremap ]" :call search('^\(\s*".*\n\)\@ + vnoremap ]" :exe "normal! gv"call search('^\(\s*".*\n\)\@ + nnoremap [" :call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW") + vnoremap [" :exe "normal! gv"call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW") +endif " Let the matchit plugin know what items can be matched. if exists("loaded_matchit") diff --git a/runtime/ftplugin/zimbu.vim b/runtime/ftplugin/zimbu.vim index 558aea7df0..24674776cb 100644 --- a/runtime/ftplugin/zimbu.vim +++ b/runtime/ftplugin/zimbu.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: Zimbu " Maintainer: Bram Moolenaar -" Last Change: 2012 Sep 08 +" Last Change: 2017 Dec 05 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -135,8 +135,10 @@ iabbr until GCUpperSpace("until") iabbr while GCUpperSpace("while") iabbr repeat GCUpper("repeat") -nnoremap [[ m`:call ZimbuGoStartBlock() -nnoremap ]] m`:call ZimbuGoEndBlock() +if !exists("no_plugin_maps") && !exists("no_zimbu_maps") + nnoremap [[ m`:call ZimbuGoStartBlock() + nnoremap ]] m`:call ZimbuGoEndBlock() +endif " Using a function makes sure the search pattern is restored func! ZimbuGoStartBlock() diff --git a/runtime/indent/javascript.vim b/runtime/indent/javascript.vim index 2861716287..f3bf96aa97 100644 --- a/runtime/indent/javascript.vim +++ b/runtime/indent/javascript.vim @@ -2,7 +2,7 @@ " Language: Javascript " Maintainer: Chris Paul ( https://github.com/bounceme ) " URL: https://github.com/pangloss/vim-javascript -" Last Change: September 18, 2017 +" Last Change: December 4, 2017 " Only load this indent file when no other was loaded. if exists('b:did_indent') @@ -10,10 +10,6 @@ if exists('b:did_indent') endif let b:did_indent = 1 -" indent correctly if inside