Mercurial > vim
changeset 26148:624439a39432
Update runtime files
Commit: https://github.com/vim/vim/commit/519cc559b08b800edc429688aece7ad6a00d41eb
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Nov 16 19:18:26 2021 +0000
Update runtime files
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 16 Nov 2021 20:30:04 +0100 |
parents | cf4170238232 |
children | b5f535645258 |
files | .github/CODEOWNERS runtime/autoload/zip.vim runtime/doc/eval.txt runtime/doc/helphelp.txt runtime/doc/if_pyth.txt runtime/doc/map.txt runtime/doc/options.txt runtime/doc/pi_zip.txt runtime/doc/syntax.txt runtime/doc/tags runtime/doc/terminal.txt runtime/doc/todo.txt runtime/doc/usr_20.txt runtime/filetype.vim runtime/ftplugin/aap.vim runtime/ftplugin/diff.vim runtime/ftplugin/lua.vim runtime/ftplugin/routeros.vim runtime/ftplugin/zimbu.vim runtime/pack/dist/opt/matchit/doc/matchit.txt runtime/pack/dist/opt/termdebug/plugin/termdebug.vim runtime/plugin/zipPlugin.vim runtime/syntax/autoit.vim runtime/syntax/gdb.vim runtime/syntax/gnuplot.vim runtime/syntax/lisp.vim runtime/syntax/routeros.vim runtime/syntax/tcl.vim runtime/syntax/vim.vim |
diffstat | 29 files changed, 365 insertions(+), 141 deletions(-) [+] |
line wrap: on
line diff
--- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -93,6 +93,7 @@ runtime/ftplugin/javascript.vim @dkearn runtime/ftplugin/javascriptreact.vim @dkearns runtime/ftplugin/kconfig.vim @chrisbra runtime/ftplugin/liquid.vim @tpope +runtime/ftplugin/lua.vim @dkearns runtime/ftplugin/m3build.vim @dkearns runtime/ftplugin/m3quake.vim @dkearns runtime/ftplugin/markdown.vim @tpope @@ -108,6 +109,7 @@ runtime/ftplugin/pbtxt.vim @lakshayg runtime/ftplugin/pdf.vim @tpope runtime/ftplugin/ps1.vim @heaths runtime/ftplugin/ps1xml.vim @heaths +runtime/ftplugin/routeros.vim @zainin runtime/ftplugin/ruby.vim @tpope @dkearns runtime/ftplugin/sass.vim @tpope runtime/ftplugin/scss.vim @tpope @@ -233,6 +235,7 @@ runtime/syntax/ps1.vim @heaths runtime/syntax/ps1xml.vim @heaths runtime/syntax/psl.vim @danielkho runtime/syntax/rc.vim @chrisbra +runtime/syntax/routeros.vim @zainin runtime/syntax/rpcgen.vim @cecamp runtime/syntax/ruby.vim @dkearns runtime/syntax/sass.vim @tpope
--- a/runtime/autoload/zip.vim +++ b/runtime/autoload/zip.vim @@ -1,7 +1,7 @@ " zip.vim: Handles browsing zipfiles " AUTOLOAD PORTION -" Date: Jan 07, 2020 -" Version: 31 +" Date: Nov 08, 2021 +" Version: 32 " Maintainer: Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM> " License: Vim License (see vim's :help license) " Copyright: Copyright (C) 2005-2019 Charles E. Campbell {{{1 @@ -20,7 +20,7 @@ if &cp || exists("g:loaded_zip") finish endif -let g:loaded_zip= "v31" +let g:loaded_zip= "v32" if v:version < 702 echohl WarningMsg echo "***warning*** this version of zip needs vim 7.2 or later" @@ -115,7 +115,13 @@ fun! zip#Browse(zipfile) setlocal bufhidden=hide setlocal nobuflisted setlocal nowrap - set ft=tar + + " Oct 12, 2021: need to re-use Bram's syntax/tar.vim. + " Setting the filetype to zip doesn't do anything (currently), + " but it is perhaps less confusing to curious perusers who do + " a :echo &ft + setf zip + run! syntax/tar.vim " give header call append(0, ['" zip.vim version '.g:loaded_zip, @@ -187,8 +193,8 @@ fun! s:ZipBrowseSelect() wincmd _ endif let s:zipfile_{winnr()}= curfile -" call Decho("exe e ".fnameescape("zipfile:".zipfile.'::'.fname)) - exe "noswapfile e ".fnameescape("zipfile:".zipfile.'::'.fname) +" call Decho("exe e ".fnameescape("zipfile://".zipfile.'::'.fname)) + exe "noswapfile e ".fnameescape("zipfile://".zipfile.'::'.fname) filetype detect let &report= repkeep @@ -203,11 +209,11 @@ fun! zip#Read(fname,mode) set report=10 if has("unix") - let zipfile = substitute(a:fname,'zipfile:\(.\{-}\)::[^\\].*$','\1','') - let fname = substitute(a:fname,'zipfile:.\{-}::\([^\\].*\)$','\1','') + let zipfile = substitute(a:fname,'zipfile://\(.\{-}\)::[^\\].*$','\1','') + let fname = substitute(a:fname,'zipfile://.\{-}::\([^\\].*\)$','\1','') else - let zipfile = substitute(a:fname,'^.\{-}zipfile:\(.\{-}\)::[^\\].*$','\1','') - let fname = substitute(a:fname,'^.\{-}zipfile:.\{-}::\([^\\].*\)$','\1','') + let zipfile = substitute(a:fname,'^.\{-}zipfile://\(.\{-}\)::[^\\].*$','\1','') + let fname = substitute(a:fname,'^.\{-}zipfile://.\{-}::\([^\\].*\)$','\1','') let fname = substitute(fname, '[', '[[]', 'g') endif " call Decho("zipfile<".zipfile.">") @@ -224,7 +230,7 @@ fun! zip#Read(fname,mode) " the following code does much the same thing as " exe "keepj sil! r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fnameescape(fname),1) - " but allows zipfile:... entries in quickfix lists + " but allows zipfile://... entries in quickfix lists let temp = tempname() " call Decho("using temp file<".temp.">") let fn = expand('%:p') @@ -296,11 +302,11 @@ fun! zip#Write(fname) " call Decho("current directory now: ".getcwd()) if has("unix") - let zipfile = substitute(a:fname,'zipfile:\(.\{-}\)::[^\\].*$','\1','') - let fname = substitute(a:fname,'zipfile:.\{-}::\([^\\].*\)$','\1','') + let zipfile = substitute(a:fname,'zipfile://\(.\{-}\)::[^\\].*$','\1','') + let fname = substitute(a:fname,'zipfile://.\{-}::\([^\\].*\)$','\1','') else - let zipfile = substitute(a:fname,'^.\{-}zipfile:\(.\{-}\)::[^\\].*$','\1','') - let fname = substitute(a:fname,'^.\{-}zipfile:.\{-}::\([^\\].*\)$','\1','') + let zipfile = substitute(a:fname,'^.\{-}zipfile://\(.\{-}\)::[^\\].*$','\1','') + let fname = substitute(a:fname,'^.\{-}zipfile://.\{-}::\([^\\].*\)$','\1','') endif " call Decho("zipfile<".zipfile.">") " call Decho("fname <".fname.">")
--- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 8.2. Last change: 2021 Nov 07 +*eval.txt* For Vim version 8.2. Last change: 2021 Nov 14 VIM REFERENCE MANUAL by Bram Moolenaar @@ -11900,9 +11900,9 @@ wildmenumode() *wildmenumode()* win_execute({id}, {command} [, {silent}]) *win_execute()* Like `execute()` but in the context of window {id}. The window will temporarily be made the current window, - without triggering autocommands. When executing {command} - autocommands will be triggered, this may have unexpected side - effects. Use |:noautocmd| if needed. + without triggering autocommands or changing directory. When + executing {command} autocommands will be triggered, this may + have unexpected side effects. Use |:noautocmd| if needed. Example: > call win_execute(winid, 'set syntax=python') < Doing the same with `setwinvar()` would not trigger
--- a/runtime/doc/helphelp.txt +++ b/runtime/doc/helphelp.txt @@ -1,4 +1,4 @@ -*helphelp.txt* For Vim version 8.2. Last change: 2020 Dec 29 +*helphelp.txt* For Vim version 8.2. Last change: 2021 Nov 13 VIM REFERENCE MANUAL by Bram Moolenaar @@ -323,21 +323,25 @@ Hints for translators: 3. Writing help files *help-writing* For ease of use, a Vim help file for a plugin should follow the format of the -standard Vim help files. If you are writing a new help file it's best to copy -one of the existing files and use it as a template. +standard Vim help files, except fot the fist line. If you are writing a new +help file it's best to copy one of the existing files and use it as a +template. The first line in a help file should have the following format: -*helpfile_name.txt* For Vim version 7.3 Last change: 2010 June 4 +*plugin_name.txt* {short description of the plugin} -The first field is a link to the help file name. The second field describes -the applicable Vim version. The last field specifies the last modification -date of the file. Each field is separated by a tab. +The first field is a help tag where ":help plugin_name" will jump to. The +remainder of the line, after a Tab, describes the plugin purpose in a short +way. This will show up in the "LOCAL ADDITIONS" section of the main help +file. Check there that it shows up properly: |local-additions|. + +If you want to add a version number of last modification date, put it in the +second line, right aligned. At the bottom of the help file, place a Vim modeline to set the 'textwidth' and 'tabstop' options and the 'filetype' to "help". Never set a global option -in such a modeline, that can have consequences undesired by whoever reads that -help. +in such a modeline, that can have undesired consequences. TAGS
--- a/runtime/doc/if_pyth.txt +++ b/runtime/doc/if_pyth.txt @@ -1,4 +1,4 @@ -*if_pyth.txt* For Vim version 8.2. Last change: 2019 Dec 07 +*if_pyth.txt* For Vim version 8.2. Last change: 2021 Nov 12 VIM REFERENCE MANUAL by Paul Moore @@ -63,6 +63,11 @@ To see what version of Python you have: There is no need to import sys, it's done by default. + *python-environment* +Environment variables set in Vim are not always available in Python. This +depends on how Vim and Python were build. Also see +https://docs.python.org/3/library/os.html#os.environ + Note: Python is very sensitive to the indenting. Make sure the "class" line and "EOF" do not have any indent.
--- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1,4 +1,4 @@ -*map.txt* For Vim version 8.2. Last change: 2021 Oct 19 +*map.txt* For Vim version 8.2. Last change: 2021 Nov 15 VIM REFERENCE MANUAL by Bram Moolenaar @@ -61,6 +61,8 @@ modes. where the map command applies. The result, including {rhs}, is then further scanned for mappings. This allows for nested and recursive use of mappings. + Note: Trailing spaces are included in the {rhs}, + because space is a valid Normal mode command. *:nore* *:norem* :no[remap] {lhs} {rhs} |mapmode-nvo| *:no* *:noremap* *:nor* @@ -1560,6 +1562,7 @@ Possible values are (second column is th Special cases ~ *:command-bang* *:command-bar* *:command-register* *:command-buffer* + *:command-keepscript* There are some special cases as well: -bang The command can take a ! modifier (like :q or :w)
--- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 8.2. Last change: 2021 Nov 06 +*options.txt* For Vim version 8.2. Last change: 2021 Nov 15 VIM REFERENCE MANUAL by Bram Moolenaar
--- a/runtime/doc/pi_zip.txt +++ b/runtime/doc/pi_zip.txt @@ -1,4 +1,4 @@ -*pi_zip.txt* For Vim version 8.2. Last change: 2020 Jan 07 +*pi_zip.txt* For Vim version 8.2. Last change: 2021 Nov 08 +====================+ | Zip File Interface | @@ -102,6 +102,9 @@ 3. Additional Extensions *zip-extens ============================================================================== 4. History *zip-history* {{{1 + v32 Oct 22, 2021 * to avoid an issue with a vim 8.2 patch, zipfile: has + been changed to zipfile:// . This often shows up + as zipfile:/// with zipped files that are root-based. v29 Apr 02, 2017 * (Klartext) reported that an encrypted zip file could opened but the swapfile held unencrypted contents. The solution is to edit the contents of a zip file
--- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -4880,7 +4880,7 @@ in their own color. :hi[ghlight] [default] {group-name} {key}={arg} .. Add a highlight group, or change the highlighting for an existing group. If a given color name is not - receognized, each `colors/lists/default.vim` found on + recognized, each `colors/lists/default.vim` found on |'runtimepath'| will be loaded. See |highlight-args| for the {key}={arg} arguments. See |:highlight-default| for the optional [default]
--- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -2307,6 +2307,7 @@ 90.5 usr_90.txt /*90.5* :command-completion-custom map.txt /*:command-completion-custom* :command-completion-customlist map.txt /*:command-completion-customlist* :command-count map.txt /*:command-count* +:command-keepscript map.txt /*:command-keepscript* :command-modifiers map.txt /*:command-modifiers* :command-nargs map.txt /*:command-nargs* :command-range map.txt /*:command-range* @@ -5036,7 +5037,6 @@ N: cmdline.txt /*N:* N<Del> various.txt /*N<Del>* NFA pattern.txt /*NFA* NL-used-for-Nul pattern.txt /*NL-used-for-Nul* -NOT eval.txt /*NOT* Neovim intro.txt /*Neovim* NetBSD-backspace options.txt /*NetBSD-backspace* NetBeans netbeans.txt /*NetBeans* @@ -5243,6 +5243,7 @@ WORD motion.txt /*WORD* WWW intro.txt /*WWW* Win32 os_win32.txt /*Win32* WinBar gui.txt /*WinBar* +WinClosed autocmd.txt /*WinClosed* WinEnter autocmd.txt /*WinEnter* WinLeave autocmd.txt /*WinLeave* WinNew autocmd.txt /*WinNew* @@ -7273,7 +7274,6 @@ help-translated helphelp.txt /*help-tran help-writing helphelp.txt /*help-writing* help-xterm-window helphelp.txt /*help-xterm-window* help.txt help.txt /*help.txt* -helpfile_name.txt helphelp.txt /*helpfile_name.txt* helphelp helphelp.txt /*helphelp* helphelp.txt helphelp.txt /*helphelp.txt* hex-editing tips.txt /*hex-editing* @@ -8543,6 +8543,7 @@ plugin usr_05.txt /*plugin* plugin-details filetype.txt /*plugin-details* plugin-filetype usr_41.txt /*plugin-filetype* plugin-special usr_41.txt /*plugin-special* +plugin_name.txt helphelp.txt /*plugin_name.txt* pmbcs-option print.txt /*pmbcs-option* pmbfn-option print.txt /*pmbfn-option* popt-option print.txt /*popt-option* @@ -8695,6 +8696,7 @@ python-command if_pyth.txt /*python-comm python-commands if_pyth.txt /*python-commands* python-current if_pyth.txt /*python-current* python-dynamic if_pyth.txt /*python-dynamic* +python-environment if_pyth.txt /*python-environment* python-error if_pyth.txt /*python-error* python-eval if_pyth.txt /*python-eval* python-examples if_pyth.txt /*python-examples*
--- a/runtime/doc/terminal.txt +++ b/runtime/doc/terminal.txt @@ -1,4 +1,4 @@ -*terminal.txt* For Vim version 8.2. Last change: 2021 Aug 15 +*terminal.txt* For Vim version 8.2. Last change: 2021 Nov 13 VIM REFERENCE MANUAL by Bram Moolenaar @@ -240,7 +240,7 @@ Command syntax ~ ++shell Instead of executing {command} directly, use a shell, like with `:!command` *E279* - {only works on Unix currently} + {only works on Unix and MS-Windows} ++kill={how} When trying to close the terminal window kill the job with {how}. See |term_setkill()| for the values.
--- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 8.2. Last change: 2021 Nov 04 +*todo.txt* For Vim version 8.2. Last change: 2021 Nov 14 VIM REFERENCE MANUAL by Bram Moolenaar @@ -277,6 +277,9 @@ Request to use "." for the cursor column Remove SPACE_IN_FILENAME ? It is only used for completion. +When 'term' starts with "foot" then default t_TI and t_TE to the values used +for the builtin xterm termcap. + Adding "10" to 'spellsuggest' causes spell suggestions to become very slow. (#4087) Did patch 8.2.2379 help? Also, z= in German on a long word can take a very long time, but CTRL-C to @@ -658,14 +661,6 @@ http://vimawesome.com/?q=tag:color-schem Bug: "vipgw" does not put cursor back where it belongs. (Jason Franklin, 2019 Mar 5) -Many users don't like 'thesaurus' to match so many words. (#4667, #1611) -- when the match with the first word is partial, don't add other words on that - line. -- support other file formats, such as comma separated. Indicate by a prefix - to the file in the 'thesaurus' option. -- 'threglookexp' option: only match with first word in thesaurus file. - (Jakson A. Aquino, 2006 Jun 14) - Some composing characters actually add a cell width to the character they are on top off, making the whole thing two characters wide. (#4526)
--- a/runtime/doc/usr_20.txt +++ b/runtime/doc/usr_20.txt @@ -1,4 +1,4 @@ -*usr_20.txt* For Vim version 8.2. Last change: 2006 Apr 24 +*usr_20.txt* For Vim version 8.2. Last change: 2021 Nov 13 VIM USER MANUAL - by Bram Moolenaar @@ -289,11 +289,11 @@ In chapter 3 we briefly mentioned the hi use the <Up> key to recall an older command line. <Down> then takes you back to newer commands. -There are actually four histories. The ones we will mention here are for ":" +There are actually five histories. The ones we will mention here are for ":" commands and for "/" and "?" search commands. The "/" and "?" commands share -the same history, because they are both search commands. The two other -histories are for expressions and input lines for the input() function. -|cmdline-history| +the same history, because they are both search commands. The three other +histories are for expressions, debug more commands and input lines for the +input() function. |cmdline-history| Suppose you have done a ":set" command, typed ten more colon commands and then want to repeat that ":set" command again. You could press ":" and then ten
--- 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: 2021 Oct 03 +" Last Change: 2021 Nov 16 " Listen very carefully, I will say this only once if exists("did_load_filetypes")
--- a/runtime/ftplugin/aap.vim +++ b/runtime/ftplugin/aap.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: Aap recipe " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2013 Apr 05 +" Last Change: 2021 Nov 14 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -11,8 +11,9 @@ endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 -" Reset 'formatoptions', 'comments' and 'expandtab' to undo this plugin. -let b:undo_ftplugin = "setl fo< com< et<" +" Reset 'formatoptions', 'comments', 'commentstring' and 'expandtab' to undo +" this plugin. +let b:undo_ftplugin = "setl fo< com< cms< et<" " Set 'formatoptions' to break comment lines but not other lines, " and insert the comment leader when hitting <CR> or using "o". @@ -20,6 +21,12 @@ setlocal fo-=t fo+=croql " Set 'comments' to format dashed lists in comments. setlocal comments=s:#\ -,m:#\ \ ,e:#,n:#,fb:- +setlocal commentstring=#\ %s " Expand tabs to spaces to avoid trouble. setlocal expandtab + +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") + let b:browsefilter = "Aap Recipe Files (*.aap)\t*.aap\nAll Files (*.*)\t*.*\n" + let b:undo_ftplugin ..= " | unlet! b:browsefilter" +endif
--- a/runtime/ftplugin/diff.vim +++ b/runtime/ftplugin/diff.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: Diff " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2020 Jul 18 +" Last Change: 2021 Nov 14 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -9,10 +9,15 @@ if exists("b:did_ftplugin") endif let b:did_ftplugin = 1 -let b:undo_ftplugin = "setl modeline<" +let b:undo_ftplugin = "setl modeline< commentstring<" " Don't use modelines in a diff, they apply to the diffed file setlocal nomodeline " If there are comments they start with # -let &commentstring = "# %s" +let &l:commentstring = "# %s" + +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") + let b:browsefilter = "Diff Files (*.diff)\t*.diff\nPatch Files (*.patch)\t*.h\nAll Files (*.*)\t*.*\n" + let b:undo_ftplugin ..= " | unlet! b:browsefilter" +endif
--- a/runtime/ftplugin/lua.vim +++ b/runtime/ftplugin/lua.vim @@ -1,7 +1,8 @@ " Vim filetype plugin file. -" Language: Lua 4.0+ -" Maintainer: Max Ischenko <mfi@ukr.net> -" Last Change: 2012 Mar 07 +" Language: Lua +" Maintainer: Doug Kearns <dougkearns@gmail.com> +" Previous Maintainer: Max Ischenko <mfi@ukr.net> +" Last Change: 2021 Nov 15 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -16,27 +17,30 @@ set cpo&vim " Set 'formatoptions' to break comment lines but not other lines, and insert " the comment leader when hitting <CR> or using "o". -setlocal fo-=t fo+=croql +setlocal formatoptions-=t formatoptions+=croql -setlocal com=:-- -setlocal cms=--%s +setlocal comments=:-- +setlocal commentstring=--%s setlocal suffixesadd=.lua +let b:undo_ftplugin = "setlocal fo< com< cms< sua<" -" The following lines enable the macros/matchit.vim plugin for -" extended matching with the % key. -if exists("loaded_matchit") - +if exists("loaded_matchit") && !exists("b:match_words") let b:match_ignorecase = 0 let b:match_words = - \ '\<\%(do\|function\|if\)\>:' . - \ '\<\%(return\|else\|elseif\)\>:' . - \ '\<end\>,' . - \ '\<repeat\>:\<until\>' + \ '\<\%(do\|function\|if\)\>:' . + \ '\<\%(return\|else\|elseif\)\>:' . + \ '\<end\>,' . + \ '\<repeat\>:\<until\>,' . + \ '\%(--\)\=\[\(=*\)\[:]\1]' + let b:undo_ftplugin .= " | unlet! b:match_words b:match_ignorecase" +endif -endif " exists("loaded_matchit") +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") + let b:browsefilter = "Lua Source Files (*.lua)\t*.lua\n" . + \ "All Files (*.*)\t*.*\n" + let b:undo_ftplugin .= " | unlet! b:browsefilter" +endif let &cpo = s:cpo_save unlet s:cpo_save - -let b:undo_ftplugin = "setlocal fo< com< cms< suffixesadd<"
new file mode 100644 --- /dev/null +++ b/runtime/ftplugin/routeros.vim @@ -0,0 +1,29 @@ +" Vim filetype plugin file +" Language: MikroTik RouterOS Script +" Maintainer: zainin <z@wintr.dev> +" Last Change: 2021 Nov 14 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:save_cpo = &cpo +set cpo-=C + +setlocal comments=:# +setlocal commentstring=#\ %s +setlocal formatoptions-=t formatoptions+=croql + +let b:undo_ftplugin = "setlocal com< cms< fo<" + +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") + let b:browsefilter = "RouterOS Script Files (*.rsc)\t*.rsc\n" .. + \ "All Files (*.*)\t*.*\n" + let b:undo_ftplugin ..= " | unlet! b:browsefilter" +endif + +let &cpo = s:save_cpo +unlet! s:save_cpo + +" vim: nowrap sw=2 sts=2 ts=8 noet:
--- a/runtime/ftplugin/zimbu.vim +++ b/runtime/ftplugin/zimbu.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: Zimbu " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2017 Dec 05 +" Last Change: 2021 Nov 12 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -34,9 +34,11 @@ setlocal errorformat^=%f\ line\ %l\ col\ " When the matchit plugin is loaded, this makes the % command skip parens and " braces in comments. -let b:match_words = '\(^\s*\)\@<=\(MODULE\|CLASS\|INTERFACE\|BITS\|ENUM\|SHARED\|FUNC\|REPLACE\|DEFINE\|PROC\|EQUAL\|MAIN\|IF\|GENERATE_IF\|WHILE\|REPEAT\|WITH\|DO\|FOR\|SWITCH\|TRY\)\>\|{\s*$:\(^\s*\)\@<=\(ELSE\|ELSEIF\|GENERATE_ELSE\|GENERATE_ELSEIF\|CATCH\|FINALLY\)\>:\(^\s*\)\@<=\(}\|\<UNTIL\>\)' - -let b:match_skip = 's:comment\|string\|zimbuchar' +if exists("loaded_matchit") && !exists("b:match_words") + let b:match_words = '\(^\s*\)\@<=\(MODULE\|CLASS\|INTERFACE\|BITS\|ENUM\|SHARED\|FUNC\|REPLACE\|DEFINE\|PROC\|EQUAL\|MAIN\|IF\|GENERATE_IF\|WHILE\|REPEAT\|WITH\|DO\|FOR\|SWITCH\|TRY\)\>\|{\s*$:\(^\s*\)\@<=\(ELSE\|ELSEIF\|GENERATE_ELSE\|GENERATE_ELSEIF\|CATCH\|FINALLY\)\>:\(^\s*\)\@<=\(}\|\<UNTIL\>\)' + let b:match_skip = 's:comment\|string\|zimbuchar' + let b:undo_ftplugin ..= " | unlet! b:match_words b:match_skip" +endif setlocal tw=78 setlocal et sts=2 sw=2 @@ -135,9 +137,60 @@ iabbr <buffer> <expr> until GCUpperSpace iabbr <buffer> <expr> while GCUpperSpace("while") iabbr <buffer> <expr> repeat GCUpper("repeat") +let b:undo_ftplugin ..= + \ " | iunabbr <buffer> alias" .. + \ " | iunabbr <buffer> arg" .. + \ " | iunabbr <buffer> break" .. + \ " | iunabbr <buffer> case" .. + \ " | iunabbr <buffer> catch" .. + \ " | iunabbr <buffer> check" .. + \ " | iunabbr <buffer> class" .. + \ " | iunabbr <buffer> interface" .. + \ " | iunabbr <buffer> implements" .. + \ " | iunabbr <buffer> shared" .. + \ " | iunabbr <buffer> continue" .. + \ " | iunabbr <buffer> default" .. + \ " | iunabbr <buffer> extends" .. + \ " | iunabbr <buffer> do" .. + \ " | iunabbr <buffer> else" .. + \ " | iunabbr <buffer> elseif" .. + \ " | iunabbr <buffer> enum" .. + \ " | iunabbr <buffer> exit" .. + \ " | iunabbr <buffer> false" .. + \ " | iunabbr <buffer> fail" .. + \ " | iunabbr <buffer> finally" .. + \ " | iunabbr <buffer> for" .. + \ " | iunabbr <buffer> func" .. + \ " | iunabbr <buffer> if" .. + \ " | iunabbr <buffer> import" .. + \ " | iunabbr <buffer> in" .. + \ " | iunabbr <buffer> io" .. + \ " | iunabbr <buffer> main" .. + \ " | iunabbr <buffer> module" .. + \ " | iunabbr <buffer> new" .. + \ " | iunabbr <buffer> nil" .. + \ " | iunabbr <buffer> ok" .. + \ " | iunabbr <buffer> proc" .. + \ " | iunabbr <buffer> proceed" .. + \ " | iunabbr <buffer> return" .. + \ " | iunabbr <buffer> step" .. + \ " | iunabbr <buffer> switch" .. + \ " | iunabbr <buffer> sys" .. + \ " | iunabbr <buffer> this" .. + \ " | iunabbr <buffer> throw" .. + \ " | iunabbr <buffer> try" .. + \ " | iunabbr <buffer> to" .. + \ " | iunabbr <buffer> true" .. + \ " | iunabbr <buffer> until" .. + \ " | iunabbr <buffer> while" .. + \ " | iunabbr <buffer> repeat" + if !exists("no_plugin_maps") && !exists("no_zimbu_maps") nnoremap <silent> <buffer> [[ m`:call ZimbuGoStartBlock()<CR> nnoremap <silent> <buffer> ]] m`:call ZimbuGoEndBlock()<CR> + let b:undo_ftplugin ..= + \ " | silent! exe 'nunmap <buffer> [['" .. + \ " | silent! exe 'nunmap <buffer> ]]'" endif " Using a function makes sure the search pattern is restored
--- a/runtime/pack/dist/opt/matchit/doc/matchit.txt +++ b/runtime/pack/dist/opt/matchit/doc/matchit.txt @@ -1,10 +1,10 @@ -*matchit.txt* Extended "%" matching +*matchit.txt* Extended "%" matching For instructions on installing this file, type `:help matchit-install` inside Vim. -For Vim version 8.1. Last change: 2021 May 17 +For Vim version 8.1. Last change: 2021 Nov 13 VIM REFERENCE MANUAL by Benji Fisher et al
--- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim +++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim @@ -2,7 +2,7 @@ " " Author: Bram Moolenaar " Copyright: Vim license applies, see ":help license" -" Last Change: 2021 Oct 26 +" Last Change: 2021 Nov 14 " " WORK IN PROGRESS - Only the basics work " Note: On MS-Windows you need a recent version of gdb. The one included with @@ -1098,6 +1098,7 @@ func s:GotoAsmwinOrCreateIt() setlocal number setlocal noswapfile setlocal buftype=nofile + setlocal modifiable let asmbuf = bufnr('Termdebug-asm-listing') if asmbuf > 0 @@ -1180,6 +1181,7 @@ func s:HandleCursor(msg) endif endif exe lnum + normal! zv exe 'sign unplace ' . s:pc_id exe 'sign place ' . s:pc_id . ' line=' . lnum . ' name=debugPC priority=110 file=' . fname if !exists('b:save_signcolumn')
--- a/runtime/plugin/zipPlugin.vim +++ b/runtime/plugin/zipPlugin.vim @@ -20,7 +20,7 @@ if &cp || exists("g:loaded_zipPlugin") finish endif -let g:loaded_zipPlugin = "v31" +let g:loaded_zipPlugin = "v32" let s:keepcpo = &cpo set cpo&vim
--- a/runtime/syntax/autoit.vim +++ b/runtime/syntax/autoit.vim @@ -5,6 +5,7 @@ " Authored By: Riccardo Casini <ric@libero.it> " Script URL: http://www.vim.org/scripts/script.php?script_id=1239 " ChangeLog: Please visit the script URL for detailed change information +" Included change from #970. " Quit when a syntax file was already loaded. if exists("b:current_syntax") @@ -932,7 +933,7 @@ syn match autoitConst "\$SD_POWERDOWN" " constants - string syn match autoitConst "\$STR_NOCASESENSE" syn match autoitConst "\$STR_CASESENSE" -syn match autoitConst "\STR_STRIPLEADING" +syn match autoitConst "\$STR_STRIPLEADING" syn match autoitConst "\$STR_STRIPTRAILING" syn match autoitConst "\$STR_STRIPSPACES" syn match autoitConst "\$STR_STRIPALL"
--- a/runtime/syntax/gdb.vim +++ b/runtime/syntax/gdb.vim @@ -2,7 +2,8 @@ " Language: GDB command files " Maintainer: Claudio Fleiner <claudio@fleiner.com> " URL: http://www.fleiner.com/vim/syntax/gdb.vim -" Last Change: 2012 Oct 05 +" Last Change: 2021 Nov 15 +" Additional changes by Simon Sobisch " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -21,19 +22,19 @@ syn match gdbInfo contained "all-registe syn keyword gdbStatement contained actions apply attach awatch backtrace break bt call catch cd clear collect commands -syn keyword gdbStatement contained complete condition continue delete detach directory disable disassemble display down +syn keyword gdbStatement contained complete condition continue delete detach directory disable disas[semble] disp[lay] down syn keyword gdbStatement contained echo else enable end file finish frame handle hbreak help if ignore syn keyword gdbStatement contained inspect jump kill list load maintenance make next nexti ni output overlay -syn keyword gdbStatement contained passcount path print printf ptype pwd quit rbreak remote return run rwatch -syn keyword gdbStatement contained search section set sharedlibrary shell show si signal source step stepi stepping +syn keyword gdbStatement contained passcount path print printf ptype python pwd quit rbreak remote return run rwatch +syn keyword gdbStatement contained search section set sharedlibrary shell show si signal skip source step stepi stepping syn keyword gdbStatement contained stop target tbreak tdump tfind thbreak thread tp trace tstart tstatus tstop -syn keyword gdbStatement contained tty undisplay unset until up watch whatis where while ws x +syn keyword gdbStatement contained tty und[isplay] unset until up watch whatis where while ws x syn match gdbFuncDef "\<define\>.*" syn match gdbStatmentContainer "^\s*\S\+" contains=gdbStatement,gdbFuncDef syn match gdbStatement "^\s*info" nextgroup=gdbInfo skipwhite skipempty " some commonly used abbreviations -syn keyword gdbStatement c disp undisp disas p +syn keyword gdbStatement c cont p py syn region gdbDocument matchgroup=gdbFuncDef start="\<document\>.*$" matchgroup=gdbFuncDef end="^end\s*$"
--- a/runtime/syntax/gnuplot.vim +++ b/runtime/syntax/gnuplot.vim @@ -3,7 +3,8 @@ " Maintainer: Josh Wainwright <wainwright DOT ja AT gmail DOT com> " Last Maintainer: Andrew Rasmussen andyras@users.sourceforge.net " Original Maintainer: John Hoelzel johnh51@users.sourceforge.net -" Last Change: 2020 May 12 +" Last Change: 2021 Nov 16 +" additional changes from PR #8949 " Filenames: *.gnu *.plt *.gpi *.gih *.gp *.gnuplot scripts: #!*gnuplot " URL: http://www.vim.org/scripts/script.php?script_id=4873 " Original URL: http://johnh51.get.to/vim/syntax/gnuplot.vim @@ -32,22 +33,22 @@ syn match gnuplotSpecial "\\." contained " syn match gnuplotSpecial "\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[a-z\\]" contained " measurements in the units in, cm and pt are special -syn match gnuplotUnit "[0-9]+in" -syn match gnuplotUnit "[0-9]+cm" -syn match gnuplotUnit "[0-9]+pt" +syn match gnuplotUnit "\d+in" +syn match gnuplotUnit "\d+cm" +syn match gnuplotUnit "\d+pt" " external (shell) commands are special -syn region gnuplotExternal start="!" end="$" +syn region gnuplotExternal start="^\s*!" end="$" " ---- Comments ---- " -syn region gnuplotComment start="#" end="$" contains=gnuplotTodo +syn region gnuplotComment start="#" end="$" contains=gnuplotTodo,@Spell " ---- Constants ---- " " strings -syn region gnuplotString start=+"+ skip=+\\"+ end=+"+ contains=gnuplotSpecial -syn region gnuplotString start="'" end="'" +syn region gnuplotString start=+"+ skip=+\\"+ end=+"+ contains=gnuplotSpecial,@Spell +syn region gnuplotString start="'" end="'" contains=@Spell " built-in variables syn keyword gnuplotNumber GNUTERM GPVAL_TERM GPVAL_TERMOPTIONS GPVAL_SPLOT @@ -76,7 +77,7 @@ syn keyword gnuplotNumber GPVAL_TERM_YSI syn keyword gnuplotNumber GPVAL_VIEW_ROT_Z GPVAL_VIEW_SCALE " function name variables -syn match gnuplotNumber "GPFUN_[a-zA-Z_]*" +syn match gnuplotNumber "GPFUN_\h*" " stats variables syn keyword gnuplotNumber STATS_records STATS_outofrange STATS_invalid @@ -104,23 +105,23 @@ syn keyword gnuplotError FIT_LAMBDA_FACT " integer number, or floating point number without a dot and with "f". syn case ignore -syn match gnuplotNumber "\<[0-9]\+\(u\=l\=\|lu\|f\)\>" +syn match gnuplotNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" " floating point number, with dot, optional exponent -syn match gnuplotFloat "\<[0-9]\+\.[0-9]*\(e[-+]\=[0-9]\+\)\=[fl]\=\>" +syn match gnuplotFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" " floating point number, starting with a dot, optional exponent -syn match gnuplotFloat "\.[0-9]\+\(e[-+]\=[0-9]\+\)\=[fl]\=\>" +syn match gnuplotFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" " floating point number, without dot, with exponent -syn match gnuplotFloat "\<[0-9]\+e[-+]\=[0-9]\+[fl]\=\>" +syn match gnuplotFloat "\<\d\+e[-+]\=\d\+[fl]\=\>" " hex number -syn match gnuplotNumber "\<0x[0-9a-f]\+\(u\=l\=\|lu\)\>" +syn match gnuplotNumber "\<0x\x\+\(u\=l\=\|lu\)\>" syn case match " flag an octal number with wrong digits by not highlighting -syn match gnuplotOctalError "\<0[0-7]*[89]" +syn match gnuplotOctalError "\<0\o*[89]" " ---- Identifiers: Functions ---- " @@ -374,8 +375,8 @@ syn keyword gnuplotKeyword nohead nooutl syn keyword gnuplotKeyword palette pattern pi pointinterval pointsize syn keyword gnuplotKeyword pointtype ps pt radius range rectangle syn keyword gnuplotKeyword rowstacked screen separation size solid sorted -syn keyword gnuplotKeyword textbox transparent units unsorted userstyles -syn keyword gnuplotKeyword wedge x x2 xx xy yy +syn keyword gnuplotKeyword textbox units unsorted userstyles wedge +syn keyword gnuplotKeyword x x2 xx xy yy " set surface syn keyword gnuplotKeyword surface implicit explicit " set table @@ -477,9 +478,13 @@ syn keyword gnuplotKeyword nooutput " keywords for 'test' command syn keyword gnuplotKeyword terminal palette rgb rbg grb gbr brg bgr +" The transparent gnuplot keyword cannot use 'syn keyword' as transparent +" has a special meaning in :syntax commands. +syn match gnuplotKeyword "\<transparent\>" + " ---- Macros ---- " -syn match gnuplotMacro "@[a-zA-Z0-9_]*" +syn match gnuplotMacro "@\w*" " ---- Todos ---- "
--- a/runtime/syntax/lisp.vim +++ b/runtime/syntax/lisp.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: Lisp " Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM> -" Last Change: Jul 11, 2019 -" Version: 30 +" Last Change: Nov 10, 2021 +" Version: 31 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_LISP " " Thanks to F Xavier Noria for a list of 978 Common Lisp symbols taken from HyperSpec @@ -54,20 +54,20 @@ if exists("g:lisp_rainbow") && g:lisp_ra syn region lispParen8 contained matchgroup=hlLevel8 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen9 syn region lispParen9 contained matchgroup=hlLevel9 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen0 else - syn region lispList matchgroup=lispParen start="(" skip="|.\{-}|" matchgroup=lispParen end=")" contains=@lispListCluster - syn region lispBQList matchgroup=PreProc start="`(" skip="|.\{-}|" matchgroup=PreProc end=")" contains=@lispListCluster + syn region lispList matchgroup=lispParen start="(" skip="|.\{-}|" matchgroup=lispParen end=")" contains=@lispListCluster + syn region lispBQList matchgroup=PreProc start="`(" skip="|.\{-}|" matchgroup=PreProc end=")" contains=@lispListCluster endif " --------------------------------------------------------------------- " Atoms: {{{1 -syn match lispAtomMark "'" -syn match lispAtom "'("me=e-1 contains=lispAtomMark nextgroup=lispAtomList -syn match lispAtom "'[^ \t()]\+" contains=lispAtomMark -syn match lispAtomBarSymbol !'|..\{-}|! contains=lispAtomMark -syn region lispAtom start=+'"+ skip=+\\"+ end=+"+ -syn region lispAtomList contained matchgroup=Special start="(" skip="|.\{-}|" matchgroup=Special end=")" contains=@lispAtomCluster,lispString,lispEscapeSpecial -syn match lispAtomNmbr contained "\<\d\+" -syn match lispLeadWhite contained "^\s\+" +syn match lispAtomMark "'" +syn match lispAtom "'("me=e-1 contains=lispAtomMark nextgroup=lispAtomList +syn match lispAtom "'[^ \t()]\+" contains=lispAtomMark +syn match lispAtomBarSymbol !'|..\{-}|! contains=lispAtomMark +syn region lispAtom start=+'"+ skip=+\\"+ end=+"+ +syn region lispAtomList contained matchgroup=Special start="(" skip="|.\{-}|" matchgroup=Special end=")" contains=@lispAtomCluster,lispString,lispEscapeSpecial +syn match lispAtomNmbr contained "\<\d\+" +syn match lispLeadWhite contained "^\s\+" " --------------------------------------------------------------------- " Standard Lisp Functions and Macros: {{{1 @@ -553,6 +553,8 @@ syn match lispParenError ")" syn cluster lispCommentGroup contains=lispTodo,@Spell syn match lispComment ";.*$" contains=@lispCommentGroup syn region lispCommentRegion start="#|" end="|#" contains=lispCommentRegion,@lispCommentGroup +syn region lispComment start="#+nil" end="\ze)" contains=@lispCommentGroup +syn match lispComment '^\s*#+nil.*$' contains=@lispCommentGroup syn keyword lispTodo contained combak combak: todo todo: " ---------------------------------------------------------------------
new file mode 100644 --- /dev/null +++ b/runtime/syntax/routeros.vim @@ -0,0 +1,91 @@ +" Vim syntax file +" Language: MikroTik RouterOS Script +" Maintainer: zainin <z@wintr.dev> +" Original Author: ndbjorne @ MikroTik forums +" Last Change: 2021 Nov 14 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn case ignore + +syn iskeyword @,48-57,- + +" comments +syn match routerosComment /^\s*\zs#.*/ + +" options submenus: /interface ether1 etc +syn match routerosSubMenu "\([a-z]\)\@<!/[a-zA-Z0-9-]*" + +" variables are matched by looking at strings ending with "=", e.g. var= +syn match routerosVariable "[a-zA-Z0-9-/]*\(=\)\@=" +syn match routerosVariable "$[a-zA-Z0-9-]*" + +" colored for clarity +syn match routerosDelimiter "[,=]" +" match slash in CIDR notation (1.2.3.4/24, 2001:db8::/48, ::1/128) +syn match routerosDelimiter "\(\x\|:\)\@<=\/\(\d\)\@=" +" dash in IP ranges +syn match routerosDelimiter "\(\x\|:\)\@<=-\(\x\|:\)\@=" + +" match service names after "set", like in original routeros syntax +syn match routerosService "\(set\)\@<=\s\(api-ssl\|api\|dns\|ftp\|http\|https\|pim\|ntp\|smb\|ssh\|telnet\|winbox\|www\|www-ssl\)" + +" colors various interfaces +syn match routerosInterface "bridge\d\+\|ether\d\+\|wlan\d\+\|pppoe-\(out\|in\)\d\+" + +syn keyword routerosBoolean yes no true false + +syn keyword routerosConditional if + +" operators +syn match routerosOperator " \zs[-+*<>=!~^&.,]\ze " +syn match routerosOperator "[<>!]=" +syn match routerosOperator "<<\|>>" +syn match routerosOperator "[+-]\d\@=" + +syn keyword routerosOperator and or in + +" commands +syn keyword routerosCommands beep delay put len typeof pick log time set find environment +syn keyword routerosCommands terminal error parse resolve toarray tobool toid toip toip6 +syn keyword routerosCommands tonum tostr totime add remove enable disable where get print +syn keyword routerosCommands export edit find append as-value brief detail count-only file +syn keyword routerosCommands follow follow-only from interval terse value-list without-paging +syn keyword routerosCommands return + +" variable types +syn keyword routerosType global local + +" loop keywords +syn keyword routerosRepeat do while for foreach + +syn match routerosSpecial "[():[\]{|}]" + +syn match routerosLineContinuation "\\$" + +syn match routerosEscape "\\["\\nrt$?_abfv]" contained display +syn match routerosEscape "\\\x\x" contained display + +syn region routerosString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=routerosEscape,routerosLineContinuation + +hi link routerosComment Comment +hi link routerosSubMenu Function +hi link routerosVariable Identifier +hi link routerosDelimiter Operator +hi link routerosEscape Special +hi link routerosService Type +hi link routerosInterface Type +hi link routerosBoolean Boolean +hi link routerosConditional Conditional +hi link routerosOperator Operator +hi link routerosCommands Operator +hi link routerosType Type +hi link routerosRepeat Repeat +hi link routerosSpecial Delimiter +hi link routerosString String +hi link routerosLineContinuation Special + +let b:current_syntax = "routeros"
--- a/runtime/syntax/tcl.vim +++ b/runtime/syntax/tcl.vim @@ -6,8 +6,8 @@ " (previously Matt Neumann <mattneu@purpleturtle.com>) " (previously Allan Kelly <allan@fruitloaf.co.uk>) " Original: Robin Becker <robin@jessikat.demon.co.uk> -" Last Change: 2021 Oct 03 -" Version: 1.14 +" Last Change: 2021 Nov 16 +" Version: 1.14 plus improvements from PR #8948 " URL: (removed, no longer worked) " quit when a syntax file was already loaded @@ -192,18 +192,18 @@ syn region tcltkCommand matchgroup=tcltk syn keyword tclTodo contained TODO " Sequences which are backslash-escaped: http://www.tcl.tk/man/tcl8.5/TclCmd/Tcl.htm#M16 -" Octal, hexadecimal, unicode codepoints, and the classics. +" Octal, hexadecimal, Unicode codepoints, and the classics. " Tcl takes as many valid characters in a row as it can, so \xAZ in a string is newline followed by 'Z'. -syn match tclSpecial contained '\\\([0-7]\{1,3}\|x\x\{1,2}\|u\x\{1,4}\|[abfnrtv]\)' +syn match tclSpecial contained '\\\(\o\{1,3}\|x\x\{1,2}\|u\x\{1,4}\|[abfnrtv]\)' syn match tclSpecial contained '\\[\[\]\{\}\"\$]' " Command appearing inside another command or inside a string. syn region tclEmbeddedStatement start='\[' end='\]' contained contains=tclCommand,tclNumber,tclLineContinue,tclString,tclVarRef,tclEmbeddedStatement " A string needs the skip argument as it may legitimately contain \". " Match at start of line -syn region tclString start=+^"+ end=+"+ contains=@tclSpecialC skip=+\\\\\|\\"+ +syn region tclString start=+^"+ end=+"+ contains=@tclSpecialC,@Spell skip=+\\\\\|\\"+ "Match all other legal strings. -syn region tclString start=+[^\\]"+ms=s+1 end=+"+ contains=@tclSpecialC,@tclVarRefC,tclEmbeddedStatement skip=+\\\\\|\\"+ +syn region tclString start=+[^\\]"+ms=s+1 end=+"+ contains=@tclSpecialC,@tclVarRefC,tclEmbeddedStatement,@Spell skip=+\\\\\|\\"+ " Line continuation is backslash immediately followed by newline. syn match tclLineContinue '\\$' @@ -222,12 +222,12 @@ syn match tclNumber "\.\d\+\(e[-+]\=\d "floating point number, without dot, with exponent syn match tclNumber "\<\d\+e[-+]\=\d\+[fl]\=\>" "hex number -syn match tclNumber "0x[0-9a-f]\+\(u\=l\=\|lu\)\>" -"syn match tclIdentifier "\<[a-z_][a-z0-9_]*\>" +syn match tclNumber "0x\x\+\(u\=l\=\|lu\)\>" +"syn match tclIdentifier "\<\h\w*\>" syn case match -syn region tclComment start="^\s*\#" skip="\\$" end="$" contains=tclTodo -syn region tclComment start=/;\s*\#/hs=s+1 skip="\\$" end="$" contains=tclTodo +syn region tclComment start="^\s*\#" skip="\\$" end="$" contains=tclTodo,@Spell +syn region tclComment start=/;\s*\#/hs=s+1 skip="\\$" end="$" contains=tclTodo,@Spell "syn match tclComment /^\s*\#.*$/ "syn match tclComment /;\s*\#.*$/hs=s+1
--- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: Vim 8.2 script " Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM> -" Last Change: Nov 02, 2021 -" Version: 8.2-11 +" Last Change: November 10, 2021 +" Version: 8.2-14 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM " Automatically generated keyword lists: {{{1 @@ -78,12 +78,12 @@ syn match vimHLGroup contained "Conceal" syn case match " Function Names {{{2 -syn keyword vimFuncName contained abs argc assert_equal assert_match atan browse bufloaded byteidx charclass chdir ch_log ch_sendexpr col copy debugbreak diff_hlID empty execute expandcmd filter floor foldlevel function getchangelist getcmdline getcursorcharpos getftime getloclist getpos gettabinfo getwininfo glob haslocaldir histnr indent inputrestore invert items job_status json_decode libcallnr list2str log mapcheck matchaddpos matchfuzzypos menu_info nextnonblank popup_atcursor popup_dialog popup_getoptions popup_menu popup_show prompt_setcallback prop_clear prop_type_change pumvisible range reduce reltimestr remote_send resolve screenchar screenstring searchpairpos setbufvar setcursorcharpos setmatches settabwinvar shiftwidth sign_place simplify sound_clear spellbadword state strcharpart stridx strridx swapinfo synIDtrans tabpagenr tanh term_getaltscreen term_getline term_gettty term_setansicolors term_start test_garbagecollect_now test_ignore_error test_null_job test_override test_srand_seed timer_start tr undofile visualmode win_execute winheight winnr win_splitmove -syn keyword vimFuncName contained acos argidx assert_equalfile assert_nobeep atan2 browsedir bufname byteidxcomp charcol ch_evalexpr ch_logfile ch_sendraw complete cos deepcopy digraph_get environ exepath extend finddir fmod foldtext garbagecollect getchar getcmdpos getcwd getftype getmarklist getqflist gettabvar getwinpos glob2regpat hasmapto hlexists index inputsave isdirectory job_getchannel job_stop json_encode line listener_add log10 mapnew matcharg matchlist min nr2char popup_beval popup_filter_menu popup_getpos popup_move pow prompt_setinterrupt prop_find prop_type_delete py3eval readblob reg_executing remote_expr remote_startserver reverse screenchars search searchpos setcellwidths setenv setpos settagstack sign_define sign_placelist sin soundfold spellsuggest str2float strchars string strtrans swapname synstack tabpagewinnr tempname term_getansicolors term_getscrolled terminalprops term_setapi term_wait test_garbagecollect_soon test_null_blob test_null_list test_refcount test_unknown timer_stop trim undotree wildmenumode win_findbuf win_id2tabwin winrestcmd winwidth -syn keyword vimFuncName contained add arglistid assert_exception assert_notequal balloon_gettext bufadd bufnr call charidx ch_evalraw ch_open ch_setoptions complete_add cosh delete digraph_getlist escape exists extendnew findfile fnameescape foldtextresult get getcharmod getcmdtype getenv getimstatus getmatches getreg gettabwinvar getwinposx globpath histadd hlID input inputsecret isinf job_info join keys line2byte listener_flush luaeval mapset matchdelete matchstr mkdir or popup_clear popup_filter_yesno popup_hide popup_notification prevnonblank prompt_setprompt prop_list prop_type_get pyeval readdir reg_recording remote_foreground remove round screencol searchcount server2client setcharpos setfperm setqflist setwinvar sign_getdefined sign_undefine sinh sound_playevent split str2list strdisplaywidth strlen strwidth synconcealed system tagfiles term_dumpdiff term_getattr term_getsize term_list term_setkill test_alloc_fail test_getvalue test_null_channel test_null_partial test_scrollbar test_void timer_stopall trunc uniq winbufnr win_getid win_id2win winrestview wordcount -syn keyword vimFuncName contained and argv assert_fails assert_notmatch balloon_show bufexists bufwinid ceil ch_canread ch_getbufnr ch_read ch_status complete_check count deletebufline digraph_set eval exists_compiled feedkeys flatten fnamemodify foreground getbufinfo getcharpos getcmdwintype getfontname getjumplist getmousepos getreginfo gettagstack getwinposy has histdel hostname inputdialog insert islocked job_setoptions js_decode len lispindent listener_remove map match matchend matchstrpos mode pathshorten popup_close popup_findinfo popup_list popup_setoptions printf prop_add prop_remove prop_type_list pyxeval readdirex reltime remote_peek rename rubyeval screenpos searchdecl serverlist setcharsearch setline setreg sha256 sign_getplaced sign_unplace slice sound_playfile sqrt str2nr strftime strpart submatch synID systemlist taglist term_dumpload term_getcursor term_getstatus term_scrape term_setrestore test_autochdir test_gui_drop_files test_null_dict test_null_string test_setmouse timer_info tolower type values wincol win_gettype winlayout winsaveview writefile -syn keyword vimFuncName contained append asin assert_false assert_report balloon_split buflisted bufwinnr changenr ch_close ch_getjob ch_readblob cindent complete_info cscope_connection did_filetype digraph_setlist eventhandler exp filereadable flattennew foldclosed fullcommand getbufline getcharsearch getcompletion getfperm getline getpid getregtype gettext getwinvar has_key histget iconv inputlist interrupt isnan job_start js_encode libcall list2blob localtime maparg matchadd matchfuzzy max mzeval perleval popup_create popup_findpreview popup_locate popup_settext prompt_getprompt prop_add_list prop_type_add pum_getpos rand readfile reltimefloat remote_read repeat screenattr screenrow searchpair setbufline setcmdpos setloclist settabvar shellescape sign_jump sign_unplacelist sort sound_stop srand strcharlen strgetchar strptime substitute synIDattr tabpagebuflist tan term_dumpwrite term_getjob term_gettitle term_sendkeys term_setsize test_feedinput test_gui_mouse_event test_null_function test_option_not_set test_settime timer_pause toupper typename virtcol windowsversion win_gotoid winline win_screenpos xor -syn keyword vimFuncName contained appendbufline assert_beeps assert_inrange assert_true blob2list bufload byte2line char2nr ch_close_in ch_info ch_readraw clearmatches confirm cursor diff_filler echoraw executable expand filewritable float2nr foldclosedend funcref getbufvar getcharstr getcurpos getfsize +syn keyword vimFuncName contained abs argc assert_equal assert_match atan browse bufloaded byteidx charclass chdir ch_log ch_sendexpr col copy debugbreak diff_hlID empty execute expandcmd filter floor foldlevel function getchangelist getcmdline getcursorcharpos getftime getmarklist getreg gettabwinvar getwinposx globpath histadd hlget indent inputrestore invert items job_status json_decode libcallnr list2str log mapcheck matchaddpos matchfuzzypos menu_info nextnonblank popup_atcursor popup_dialog popup_getoptions popup_menu popup_show prompt_setcallback prop_clear prop_type_change pumvisible range reduce reltimestr remote_send resolve screenchar screenstring searchpairpos setbufvar setcursorcharpos setmatches settabwinvar shiftwidth sign_place simplify sound_clear spellbadword state strcharpart stridx strridx swapinfo synIDtrans tabpagenr tanh term_getaltscreen term_getline term_gettty term_setansicolors term_start test_garbagecollect_now test_ignore_error test_null_job test_override test_srand_seed timer_start tr undofile visualmode win_execute winheight winnr win_splitmove +syn keyword vimFuncName contained acos argidx assert_equalfile assert_nobeep atan2 browsedir bufname byteidxcomp charcol ch_evalexpr ch_logfile ch_sendraw complete cos deepcopy digraph_get environ exepath extend finddir fmod foldtext garbagecollect getchar getcmdpos getcwd getftype getmatches getreginfo gettagstack getwinposy has histdel hlID index inputsave isdirectory job_getchannel job_stop json_encode line listener_add log10 mapnew matcharg matchlist min nr2char popup_beval popup_filter_menu popup_getpos popup_move pow prompt_setinterrupt prop_find prop_type_delete py3eval readblob reg_executing remote_expr remote_startserver reverse screenchars search searchpos setcellwidths setenv setpos settagstack sign_define sign_placelist sin soundfold spellsuggest str2float strchars string strtrans swapname synstack tabpagewinnr tempname term_getansicolors term_getscrolled terminalprops term_setapi term_wait test_garbagecollect_soon test_null_blob test_null_list test_refcount test_unknown timer_stop trim undotree wildmenumode win_findbuf win_id2tabwin winrestcmd winwidth +syn keyword vimFuncName contained add arglistid assert_exception assert_notequal balloon_gettext bufadd bufnr call charidx ch_evalraw ch_open ch_setoptions complete_add cosh delete digraph_getlist escape exists extendnew findfile fnameescape foldtextresult get getcharmod getcmdtype getenv getimstatus getmousepos getregtype gettext getwinvar has_key histget hlset input inputsecret isinf job_info join keys line2byte listener_flush luaeval mapset matchdelete matchstr mkdir or popup_clear popup_filter_yesno popup_hide popup_notification prevnonblank prompt_setprompt prop_list prop_type_get pyeval readdir reg_recording remote_foreground remove round screencol searchcount server2client setcharpos setfperm setqflist setwinvar sign_getdefined sign_undefine sinh sound_playevent split str2list strdisplaywidth strlen strwidth synconcealed system tagfiles term_dumpdiff term_getattr term_getsize term_list term_setkill test_alloc_fail test_getvalue test_null_channel test_null_partial test_scrollbar test_void timer_stopall trunc uniq winbufnr win_getid win_id2win winrestview wordcount +syn keyword vimFuncName contained and argv assert_fails assert_notmatch balloon_show bufexists bufwinid ceil ch_canread ch_getbufnr ch_read ch_status complete_check count deletebufline digraph_set eval exists_compiled feedkeys flatten fnamemodify foreground getbufinfo getcharpos getcmdwintype getfontname getjumplist getpid gettabinfo getwininfo glob haslocaldir histnr hostname inputdialog insert islocked job_setoptions js_decode len lispindent listener_remove map match matchend matchstrpos mode pathshorten popup_close popup_findinfo popup_list popup_setoptions printf prop_add prop_remove prop_type_list pyxeval readdirex reltime remote_peek rename rubyeval screenpos searchdecl serverlist setcharsearch setline setreg sha256 sign_getplaced sign_unplace slice sound_playfile sqrt str2nr strftime strpart submatch synID systemlist taglist term_dumpload term_getcursor term_getstatus term_scrape term_setrestore test_autochdir test_gui_drop_files test_null_dict test_null_string test_setmouse timer_info tolower type values wincol win_gettype winlayout winsaveview writefile +syn keyword vimFuncName contained append asin assert_false assert_report balloon_split buflisted bufwinnr changenr ch_close ch_getjob ch_readblob cindent complete_info cscope_connection did_filetype digraph_setlist eventhandler exp filereadable flattennew foldclosed fullcommand getbufline getcharsearch getcompletion getfperm getline getpos gettabvar getwinpos glob2regpat hasmapto hlexists iconv inputlist interrupt isnan job_start js_encode libcall list2blob localtime maparg matchadd matchfuzzy max mzeval perleval popup_create popup_findpreview popup_locate popup_settext prompt_getprompt prop_add_list prop_type_add pum_getpos rand readfile reltimefloat remote_read repeat screenattr screenrow searchpair setbufline setcmdpos setloclist settabvar shellescape sign_jump sign_unplacelist sort sound_stop srand strcharlen strgetchar strptime substitute synIDattr tabpagebuflist tan term_dumpwrite term_getjob term_gettitle term_sendkeys term_setsize test_feedinput test_gui_mouse_event test_null_function test_option_not_set test_settime timer_pause toupper typename virtcol windowsversion win_gotoid winline win_screenpos xor +syn keyword vimFuncName contained appendbufline assert_beeps assert_inrange assert_true blob2list bufload byte2line char2nr ch_close_in ch_info ch_readraw clearmatches confirm cursor diff_filler echoraw executable expand filewritable float2nr foldclosedend funcref getbufvar getcharstr getcurpos getfsize getloclist getqflist "--- syntax here and above generated by mkvimvim --- " Special Vim Highlighting (not automatic) {{{1 @@ -188,10 +188,13 @@ syn match vimFBVar contained "\<[ syn keyword vimCommand contained in " Insertions And Appends: insert append {{{2 +" (buftype != nofile test avoids having append, change, insert show up in the command window) " ======================= -syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=a\%[ppend]$" matchgroup=vimCommand end="^\.$"" -syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=c\%[hange]$" matchgroup=vimCommand end="^\.$"" -syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=i\%[nsert]$" matchgroup=vimCommand end="^\.$"" +if &buftype != 'nofile' + syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=a\%[ppend]$" matchgroup=vimCommand end="^\.$"" + syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=c\%[hange]$" matchgroup=vimCommand end="^\.$"" + syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=i\%[nsert]$" matchgroup=vimCommand end="^\.$"" +endif " Behave! {{{2 " =======