diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-11-27 10:57:26 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-11-27 10:57:26 +0000 |
commit | 6304be625ce44dcfedc6735164d0b853578581c8 (patch) | |
tree | db8bb5f50af170304917f08bbc78236cfe354bed | |
parent | 7824fc80f675b8098e6483ce082e287aad14b6da (diff) | |
download | vim-git-6304be625ce44dcfedc6735164d0b853578581c8.tar.gz |
Update runtime files.
-rw-r--r-- | runtime/colors/tools/check_colors.vim | 14 | ||||
-rw-r--r-- | runtime/doc/cmdline.txt | 10 | ||||
-rw-r--r-- | runtime/doc/eval.txt | 1 | ||||
-rw-r--r-- | runtime/doc/options.txt | 2 | ||||
-rw-r--r-- | runtime/doc/repeat.txt | 6 | ||||
-rw-r--r-- | runtime/doc/sign.txt | 11 | ||||
-rw-r--r-- | runtime/doc/tags | 3 | ||||
-rw-r--r-- | runtime/doc/todo.txt | 10 | ||||
-rw-r--r-- | runtime/doc/vim9.txt | 6 | ||||
-rw-r--r-- | runtime/ftplugin/jsonc.vim | 10 | ||||
-rw-r--r-- | runtime/pack/dist/opt/termdebug/plugin/termdebug.vim | 201 | ||||
-rw-r--r-- | runtime/syntax/vim.vim | 28 |
12 files changed, 171 insertions, 131 deletions
diff --git a/runtime/colors/tools/check_colors.vim b/runtime/colors/tools/check_colors.vim index b0146cc67..0d8936042 100644 --- a/runtime/colors/tools/check_colors.vim +++ b/runtime/colors/tools/check_colors.vim @@ -226,7 +226,13 @@ fu! Result(err) endif endfu -call Test_check_colors() - -let &cpo = s:save_cpo -unlet s:save_cpo +try + call Test_check_colors() +catch + echohl ErrorMsg + echomsg v:exception + echohl NONE +finally + let &cpo = s:save_cpo + unlet s:save_cpo +endtry diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt index bf6102487..eca741f75 100644 --- a/runtime/doc/cmdline.txt +++ b/runtime/doc/cmdline.txt @@ -1,4 +1,4 @@ -*cmdline.txt* For Vim version 8.2. Last change: 2021 Aug 06 +*cmdline.txt* For Vim version 8.2. Last change: 2021 Nov 22 VIM REFERENCE MANUAL by Bram Moolenaar @@ -925,9 +925,11 @@ Note: these are typed literally, they are not special keys! *:<sfile>* *<sfile>* <sfile> When executing a ":source" command, is replaced with the file name of the sourced file. *E498* - When executing a function, is replaced with the call stack, - as with <stack> (this is for backwards compatibility, using - <stack> is preferred). + When executing a legacy function, is replaced with the call + stack, as with <stack> (this is for backwards + compatibility, using <stack> is preferred). + In Vim9 script using <sfile> in a function gives error + *E1245* . Note that filename-modifiers are useless when <sfile> is not used inside a script. *:<stack>* *<stack>* diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 46b3663b3..004f9d4bb 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -9770,6 +9770,7 @@ setbufline({buf}, {lnum}, {text}) *setbufline()* For the use of {buf}, see |bufname()| above. {lnum} is used like with |setline()|. + Use "$" to refer to the last line in buffer {buf}. When {lnum} is just below the last line the {text} will be added below the last line. diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index f5f570ba3..c7b280f68 100644 --- 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 18 +*options.txt* For Vim version 8.2. Last change: 2021 Nov 24 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt index 04d85d7b3..049fabb30 100644 --- a/runtime/doc/repeat.txt +++ b/runtime/doc/repeat.txt @@ -1,4 +1,4 @@ -*repeat.txt* For Vim version 8.2. Last change: 2021 Sep 09 +*repeat.txt* For Vim version 8.2. Last change: 2021 Nov 24 VIM REFERENCE MANUAL by Bram Moolenaar @@ -792,6 +792,10 @@ won't be very helpful. There is a separate command-line history for debug mode. +NOTE: In Vim9 script, if a command is written at the script level and +continues on the next line, not using the old way with a backslash for line +continuation, only the first line is printed before the debugging prompt. + The line number for a function line is relative to the start of the function. If you have trouble figuring out where you are, edit the file that defines the function in another Vim, search for the start of the function and do diff --git a/runtime/doc/sign.txt b/runtime/doc/sign.txt index 96658e544..489f3d8b5 100644 --- a/runtime/doc/sign.txt +++ b/runtime/doc/sign.txt @@ -148,6 +148,10 @@ See |sign_define()| for the equivalent Vim script function. texthl={group} Highlighting group used for the text item. + culhl={group} + Highlighting group used for the text item when the cursor is + on the same line as the sign and 'cursorline' is enabled. + Example: > :sign define MySign text=>> texthl=Search linehl=DiffText < @@ -173,13 +177,6 @@ See |sign_getdefined()| for the equivalent Vim script function. :sign list {name} Lists one defined sign and its attributes. - culhl={group} - Highlighting group used for the text item when the cursor is - on the same line as the sign and 'cursorline' is enabled. - - Example: > - :sign define MySign text=>> texthl=Search linehl=DiffText -< PLACING SIGNS *:sign-place* *E158* diff --git a/runtime/doc/tags b/runtime/doc/tags index 13cf8ddaf..768b98c6e 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -3999,6 +3999,7 @@ E1239 eval.txt /*E1239* E124 eval.txt /*E124* E1243 options.txt /*E1243* E1244 message.txt /*E1244* +E1245 cmdline.txt /*E1245* E125 eval.txt /*E125* E126 eval.txt /*E126* E127 eval.txt /*E127* @@ -7321,7 +7322,9 @@ hl-Cursor syntax.txt /*hl-Cursor* hl-CursorColumn syntax.txt /*hl-CursorColumn* hl-CursorIM syntax.txt /*hl-CursorIM* hl-CursorLine syntax.txt /*hl-CursorLine* +hl-CursorLineFold syntax.txt /*hl-CursorLineFold* hl-CursorLineNr syntax.txt /*hl-CursorLineNr* +hl-CursorLineSign syntax.txt /*hl-CursorLineSign* hl-DiffAdd syntax.txt /*hl-DiffAdd* hl-DiffChange syntax.txt /*hl-DiffChange* hl-DiffDelete syntax.txt /*hl-DiffDelete* diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 05af932de..4793abd83 100644 --- 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 14 +*todo.txt* For Vim version 8.2. Last change: 2021 Nov 26 VIM REFERENCE MANUAL by Bram Moolenaar @@ -38,9 +38,7 @@ browser use: https://github.com/vim/vim/issues/1234 *known-bugs* -------------------- Known bugs and current work ----------------------- -mark ends up on last byte of char. (#9047) - -Delete runtime/rgb.txt after a while +refactor ex_let_one() to subfunctions. Vim9 - Make everything work: - "filter #pat# ls" should work, #pat# is not a comment @@ -222,8 +220,6 @@ Terminal emulator window: - When 'encoding' is not utf-8, or the job is using another encoding, setup conversions. -Include patch #6290: recognize shell directory change. - When using 'cryptmethod' xchaha20 the undo file is not encrypted. Need to handle extra bytes. @@ -233,6 +229,8 @@ Fails in line 64 of Ch_communicate, no exception is thrown. Patch for Template string: #4634 Have another look at the implementation. +Add expanding <script> which works like <sfile> everywhere. #9189 + Rename getdigraphlist -> digraph_getlist() etc. Valgrind reports memory leaks in test_options. diff --git a/runtime/doc/vim9.txt b/runtime/doc/vim9.txt index 576456af0..1782f179a 100644 --- a/runtime/doc/vim9.txt +++ b/runtime/doc/vim9.txt @@ -1,4 +1,4 @@ -*vim9.txt* For Vim version 8.2. Last change: 2021 Sep 13 +*vim9.txt* For Vim version 8.2. Last change: 2021 Nov 22 VIM REFERENCE MANUAL by Bram Moolenaar @@ -821,6 +821,10 @@ error. Example: > For loop ~ +The loop variable must not exist yet: > + var i = 1 + for i in [1, 2, 3] # Error! + Legacy Vim script has some tricks to make a for loop over a list handle deleting items at the current or previous item. In Vim9 script it just uses the index, if items are deleted then items in the list will be skipped. diff --git a/runtime/ftplugin/jsonc.vim b/runtime/ftplugin/jsonc.vim index 90d52cd0d..e47a75f57 100644 --- a/runtime/ftplugin/jsonc.vim +++ b/runtime/ftplugin/jsonc.vim @@ -4,7 +4,7 @@ " Acknowledgement: Based off of vim-jsonc maintained by Kevin Locke <kevin@kevinlocke.name> " https://github.com/kevinoid/vim-jsonc " License: MIT -" Last Change: 2021-07-01 +" Last Change: 2021 Nov 22 runtime! ftplugin/json.vim @@ -14,14 +14,8 @@ else let b:did_ftplugin_jsonc = 1 endif -" A list of commands that undo buffer local changes made below. -let s:undo_ftplugin = [] - " Set comment (formatting) related options. {{{1 setlocal commentstring=//%s comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// -call add(s:undo_ftplugin, 'commentstring< comments<') " Let Vim know how to disable the plug-in. -call map(s:undo_ftplugin, "'execute ' . string(v:val)") -let b:undo_ftplugin = join(s:undo_ftplugin, ' | ') -unlet s:undo_ftplugin +let b:undo_ftplugin = 'setlocal commentstring< comments<' diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim index 7087f8b25..24161d523 100644 --- 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 Nov 21 +" Last Change: 2021 Nov 27 " " WORK IN PROGRESS - Only the basics work " Note: On MS-Windows you need a recent version of gdb. The one included with @@ -96,6 +96,7 @@ endfunc call s:Highlight(1, '', &background) hi default debugBreakpoint term=reverse ctermbg=red guibg=red +hi default debugBreakpointDisabled term=reverse ctermbg=gray guibg=gray func s:StartDebug(bang, ...) " First argument is the command to debug, second core file or process ID. @@ -229,14 +230,28 @@ func s:StartDebug_term(dict) endif let commpty = job_info(term_getjob(s:commbuf))['tty_out'] - " Open a terminal window to run the debugger. - " Add -quiet to avoid the intro message causing a hit-enter prompt. let gdb_args = get(a:dict, 'gdb_args', []) let proc_args = get(a:dict, 'proc_args', []) - let cmd = [g:termdebugger, '-quiet', '-tty', pty, '--eval-command', 'echo startupdone\n'] + gdb_args - call ch_log('executing "' . join(cmd) . '"') - let s:gdbbuf = term_start(cmd, { + let gdb_cmd = [g:termdebugger] + " Add -quiet to avoid the intro message causing a hit-enter prompt. + let gdb_cmd += ['-quiet'] + " Disable pagination, it causes everything to stop at the gdb + let gdb_cmd += ['-iex', 'set pagination off'] + " Interpret commands while the target is running. This should usually only + " be exec-interrupt, since many commands don't work properly while the + " target is running (so execute during startup). + let gdb_cmd += ['-iex', 'set mi-async on'] + " Open a terminal window to run the debugger. + let gdb_cmd += ['-tty', pty] + " Command executed _after_ startup is done, provides us with the necessary feedback + let gdb_cmd += ['-ex', 'echo startupdone\n'] + + " Adding arguments requested by the user + let gdb_cmd += gdb_args + + call ch_log('executing "' . join(gdb_cmd) . '"') + let s:gdbbuf = term_start(gdb_cmd, { \ 'term_finish': 'close', \ }) if s:gdbbuf == 0 @@ -255,8 +270,8 @@ func s:StartDebug_term(dict) for lnum in range(1, 200) if term_getline(s:gdbbuf, lnum) =~ 'startupdone' - let try_count = 9999 - break + let try_count = 9999 + break endif endfor let try_count += 1 @@ -269,7 +284,7 @@ func s:StartDebug_term(dict) " Set arguments to be run. if len(proc_args) - call term_sendkeys(s:gdbbuf, 'set args ' . join(proc_args) . "\r") + call term_sendkeys(s:gdbbuf, 'server set args ' . join(proc_args) . "\r") endif " Connect gdb to the communication pty, using the GDB/MI interface. @@ -289,20 +304,21 @@ func s:StartDebug_term(dict) let line1 = term_getline(s:gdbbuf, lnum) let line2 = term_getline(s:gdbbuf, lnum + 1) if line1 =~ 'new-ui mi ' - " response can be in the same line or the next line - let response = line1 . line2 - if response =~ 'Undefined command' - echoerr 'Sorry, your gdb is too old, gdb 7.12 is required' - call s:CloseBuffers() - return - endif - if response =~ 'New UI allocated' - " Success! - break - endif + " response can be in the same line or the next line + let response = line1 . line2 + if response =~ 'Undefined command' + echoerr 'Sorry, your gdb is too old, gdb 7.12 is required' + " CHECKME: possibly send a "server show version" here + call s:CloseBuffers() + return + endif + if response =~ 'New UI allocated' + " Success! + break + endif elseif line1 =~ 'Reading symbols from' && line2 !~ 'new-ui mi ' - " Reading symbols might take a while, try more times - let try_count -= 1 + " Reading symbols might take a while, try more times + let try_count -= 1 endif endfor if response =~ 'New UI allocated' @@ -316,17 +332,6 @@ func s:StartDebug_term(dict) sleep 10m endwhile - " Interpret commands while the target is running. This should usually only be - " exec-interrupt, since many commands don't work properly while the target is - " running. - call s:SendCommand('-gdb-set mi-async on') - " Older gdb uses a different command. - call s:SendCommand('-gdb-set target-async on') - - " Disable pagination, it causes everything to stop at the gdb - " "Type <return> to continue" prompt. - call s:SendCommand('set pagination off') - call job_setoptions(term_getjob(s:gdbbuf), {'exit_cb': function('s:EndTermDebug')}) " Set the filetype, this can be used to add mappings. @@ -356,14 +361,26 @@ func s:StartDebug_prompt(dict) exe (&columns / 2 - 1) . "wincmd |" endif - " Add -quiet to avoid the intro message causing a hit-enter prompt. let gdb_args = get(a:dict, 'gdb_args', []) let proc_args = get(a:dict, 'proc_args', []) - let cmd = [g:termdebugger, '-quiet', '--interpreter=mi2'] + gdb_args - call ch_log('executing "' . join(cmd) . '"') + let gdb_cmd = [g:termdebugger] + " Add -quiet to avoid the intro message causing a hit-enter prompt. + let gdb_cmd += ['-quiet'] + " Disable pagination, it causes everything to stop at the gdb, needs to be run early + let gdb_cmd += ['-iex', 'set pagination off'] + " Interpret commands while the target is running. This should usually only + " be exec-interrupt, since many commands don't work properly while the + " target is running (so execute during startup). + let gdb_cmd += ['-iex', 'set mi-async on'] + " directly communicate via mi2 + let gdb_cmd += ['--interpreter=mi2'] + + " Adding arguments requested by the user + let gdb_cmd += gdb_args - let s:gdbjob = job_start(cmd, { + call ch_log('executing "' . join(gdb_cmd) . '"') + let s:gdbjob = job_start(gdb_cmd, { \ 'exit_cb': function('s:EndPromptDebug'), \ 'out_cb': function('s:GdbOutCallback'), \ }) @@ -376,13 +393,6 @@ func s:StartDebug_prompt(dict) set modified let s:gdb_channel = job_getchannel(s:gdbjob) - " Interpret commands while the target is running. This should usually only - " be exec-interrupt, since many commands don't work properly while the - " target is running. - call s:SendCommand('-gdb-set mi-async on') - " Older gdb uses a different command. - call s:SendCommand('-gdb-set target-async on') - let s:ptybuf = 0 if has('win32') " MS-Windows: run in a new console window for maximum compatibility @@ -416,8 +426,6 @@ func s:StartDebug_prompt(dict) endif call s:SendCommand('set print pretty on') call s:SendCommand('set breakpoint pending on') - " Disable pagination, it causes everything to stop at the gdb - call s:SendCommand('set pagination off') " Set arguments to be run if len(proc_args) @@ -504,6 +512,15 @@ func TermDebugSendCommand(cmd) endif endfunc +" Send a command only when stopped. Used for :Next and :Step. +func s:SendCommandIfStopped(cmd) + if s:stopped + call s:SendCommand(a:cmd) + else + call ch_log('dropping command, program is running: ' . a:cmd) + endif +endfunc + " Function called when entering a line in the prompt buffer. func s:PromptCallback(text) call s:SendCommand(a:text) @@ -560,32 +577,23 @@ func s:GdbOutCallback(channel, text) endfunc " Decode a message from gdb. quotedText starts with a ", return the text up -" to the next ", unescaping characters. +" to the next ", unescaping characters: +" - remove line breaks +" - change \\t to \t +" - change \0xhh to \xhh +" - change \ooo to octal +" - change \\ to \ func s:DecodeMessage(quotedText) if a:quotedText[0] != '"' echoerr 'DecodeMessage(): missing quote in ' . a:quotedText return endif - let result = '' - let i = 1 - while a:quotedText[i] != '"' && i < len(a:quotedText) - if a:quotedText[i] == '\' - let i += 1 - if a:quotedText[i] == 'n' - " drop \n - let i += 1 - continue - elseif a:quotedText[i] == 't' - " append \t - let i += 1 - let result .= "\t" - continue - endif - endif - let result .= a:quotedText[i] - let i += 1 - endwhile - return result + return a:quotedText + \->substitute('^"\|".*\|\\n', '', 'g') + \->substitute('\\t', "\t", 'g') + \->substitute('\\0x\(\x\x\)', {-> eval('"\x' .. submatch(1) .. '"')}, 'g') + \->substitute('\\\o\o\o', {-> eval('"' .. submatch(0) .. '"')}, 'g') + \->substitute('\\\\', '\', 'g') endfunc " Extract the "name" value from a gdb message with fullname="name". @@ -763,8 +771,10 @@ func s:CommOutput(chan, msg) elseif msg != '' if msg =~ '^\(\*stopped\|\*running\|=thread-selected\)' call s:HandleCursor(msg) - elseif msg =~ '^\^done,bkpt=' || msg =~ '^=breakpoint-created,' || msg =~ '^=breakpoint-modified,' - call s:HandleNewBreakpoint(msg) + elseif msg =~ '^\^done,bkpt=' || msg =~ '^=breakpoint-created,' + call s:HandleNewBreakpoint(msg, 0) + elseif msg =~ '^=breakpoint-modified,' + call s:HandleNewBreakpoint(msg, 1) elseif msg =~ '^=breakpoint-deleted,' call s:HandleBreakpointDelete(msg) elseif msg =~ '^=thread-group-started' @@ -798,9 +808,9 @@ func s:InstallCommands() command -nargs=? Break call s:SetBreakpoint(<q-args>) command Clear call s:ClearBreakpoint() - command Step call s:SendCommand('-exec-step') - command Over call s:SendCommand('-exec-next') - command Finish call s:SendCommand('-exec-finish') + command Step call s:SendCommandIfStopped('-exec-step') + command Over call s:SendCommandIfStopped('-exec-next') + command Finish call s:SendCommandIfStopped('-exec-finish') command -nargs=* Run call s:Run(<q-args>) command -nargs=* Arguments call s:SendCommand('-exec-arguments ' . <q-args>) @@ -1040,21 +1050,24 @@ endfunc " clean up expression that may got in because of range " (newlines and surrounding whitespace) +" As it can also be specified via ex-command for assignments this function +" may not change the "content" parts (like replacing contained spaces func s:CleanupExpr(expr) " replace all embedded newlines/tabs/... - let expr = substitute( a:expr, '\s', ' ', 'g') + let expr = substitute(a:expr, '\_s', ' ', 'g') if &filetype ==# 'cobol' - " extra cleanup for COBOL: _every: expression ends with a period, - " a semicolon nmay be used instead of a space - " a trailing comma is ignored as it commonly separates multiple expr - let expr = substitute(expr, '\..*', '', '') + " extra cleanup for COBOL: + " - a semicolon nmay be used instead of a space + " - a trailing comma or period is ignored as it commonly separates/ends + " multiple expr let expr = substitute(expr, ';', ' ', 'g') - let expr = substitute(expr, ',*$', '', '') + let expr = substitute(expr, '[,.]\+ *$', '', '') endif - " get rid of surrounding spaces - let expr = substitute(expr, '^ *\(.*\) *', '\1', '') + " get rid of leading and trailing spaces + let expr = substitute(expr, '^ *', '', '') + let expr = substitute(expr, ' *$', '', '') return expr endfunc @@ -1065,6 +1078,8 @@ let s:evalFromBalloonExpr = 0 func s:HandleEvaluate(msg) let value = substitute(a:msg, '.*value="\(.*\)"', '\1', '') let value = substitute(value, '\\"', '"', 'g') + " multi-byte characters arrive in octal form + let value = substitute(value, '\\\o\o\o', {-> eval('"' .. submatch(0) .. '"')}, 'g') if s:evalFromBalloonExpr if s:evalFromBalloonExprResult == '' let s:evalFromBalloonExprResult = s:evalexpr . ': ' . value @@ -1239,11 +1254,16 @@ endfunc let s:BreakpointSigns = [] -func s:CreateBreakpoint(id, subid) +func s:CreateBreakpoint(id, subid, enabled) let nr = printf('%d.%d', a:id, a:subid) if index(s:BreakpointSigns, nr) == -1 call add(s:BreakpointSigns, nr) - exe "sign define debugBreakpoint" . nr . " text=" . substitute(nr, '\..*', '', '') . " texthl=debugBreakpoint" + if a:enabled == "n" + let hiName = "debugBreakpointDisabled" + else + let hiName = "debugBreakpoint" + endif + exe "sign define debugBreakpoint" . nr . " text=" . substitute(nr, '\..*', '', '') . " texthl=" . hiName endif endfunc @@ -1253,7 +1273,7 @@ endfunction " Handle setting a breakpoint " Will update the sign that shows the breakpoint -func s:HandleNewBreakpoint(msg) +func s:HandleNewBreakpoint(msg, modifiedFlag) if a:msg !~ 'fullname=' " a watch or a pending breakpoint does not have a file name if a:msg =~ 'pending=' @@ -1276,7 +1296,8 @@ func s:HandleNewBreakpoint(msg) " If "nr" is 123 it becomes "123.0" and subid is "0". " If "nr" is 123.4 it becomes "123.4.0" and subid is "4"; "0" is discarded. let [id, subid; _] = map(split(nr . '.0', '\.'), 'v:val + 0') - call s:CreateBreakpoint(id, subid) + let enabled = substitute(msg, '.*enabled="\([yn]\)".*', '\1', '') + call s:CreateBreakpoint(id, subid, enabled) if has_key(s:breakpoints, id) let entries = s:breakpoints[id] @@ -1303,8 +1324,18 @@ func s:HandleNewBreakpoint(msg) if bufloaded(fname) call s:PlaceSign(id, subid, entry) + let posMsg = ' at line ' . lnum . '.' + else + let posMsg = ' in ' . fname . ' at line ' . lnum . '.' + endif + if !a:modifiedFlag + let actionTaken = 'created' + elseif enabled == 'n' + let actionTaken = 'disabled' + else + let actionTaken = 'enabled' endif - echomsg 'Breakpoint ' . nr . ' created at line ' . lnum . '.' + echomsg 'Breakpoint ' . nr . ' ' . actionTaken . posMsg endfor endfunc diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 4c2b1df9c..ab948d90a 100644 --- 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: November 19, 2021 -" Version: 8.2-15 +" Last Change: Nov 25, 2021 +" Version: 8.2-17 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM " Automatically generated keyword lists: {{{1 @@ -29,14 +29,14 @@ syn match vimCommand contained "\<z[-+^.=]\=\>" syn keyword vimStdPlugin contained Arguments Asm Break Cfilter Clear Continue DiffOrig Evaluate Finish Gdb Lfilter Man N[ext] Over P[rint] Program Run S Source Step Stop Termdebug TermdebugCommand TOhtml Winbar XMLent XMLns " vimOptions are caught only when contained in a vimSet {{{2 -syn keyword vimOption contained acd ambw arshape aw backupskip beval bk bri bufhidden cdpath cindent cm colorcolumn completeopt cp cscopeprg csprg culopt def diffexpr ea ei ep eventignore fdi fenc fileformat fkmap foldexpr foldopen fsync gfw gtt guipty hi hkp ignorecase imd imstatusfunc indentkeys isfname js langmap linebreak lmap lw mat maxmemtot mkspellmem mod mousef mousetime nf ofu para penc pm previewwindow printoptions pw qftf relativenumber rightleftcmd ru sbr scrollfocus sel shellcmdflag shellxquote showfulltag signcolumn smc spell splitbelow ssl stmp swapfile sxq tabstop tags tbs termguicolors textmode thesaurusfunc titlestring top ttimeout ttymouse twt undofile varsofttabstop verbosefile viminfofile wak weirdinvert wig wildoptions winheight wm wrapscan -syn keyword vimOption contained ai anti asd awa balloondelay bevalterm bkc briopt buflisted cedit cink cmdheight columns completepopup cpo cscopequickfix csqf cursorbind define diffopt ead ek equalalways ex fdl fencs fileformats flp foldignore foldtext ft ghr guicursor guitablabel hid hl im imdisable imstyle indk isi key langmenu lines lnr lz matchpairs mco ml modeline mousefocus mp nrformats omnifunc paragraphs perldll pmbcs printdevice prompt pythondll quickfixtextfunc remap rl rubydll sc scrolljump selection shellpipe shiftround showmatch siso smd spellcapcheck splitright ssop sts swapsync syn tag tagstack tc termwinkey textwidth tildeop titlestring option to hi "there" tpm ttimeoutlen ttyscroll tx undolevels vartabstop vfile virtualedit warn wfh wildchar wim winminheight wmh write -syn keyword vimOption contained akm antialias autochdir background ballooneval bex bl brk buftype cf cinkeys cmdwinheight com completeslash cpoptions cscoperelative csre cursorcolumn delcombine digraph eadirection emo equalprg expandtab fdls fex fileignorecase fml foldlevel formatexpr gcr gli guifont guitabtooltip hidden hlg imactivatefunc imi inc inex isident keymap langnoremap linespace loadplugins ma matchtime mef mle modelineexpr mousehide mps nu opendevice paste pex pmbfn printencoding pt pythonhome quoteescape renderoptions rlc ruf scb scrolloff selectmode shellquote shiftwidth showmode sj sn spellfile spo st su swb synmaxcol tagbsearch tal tcldll termwinscroll tf timeout tl tr ttm ttytype uc undoreload vb vi visualbell wb wfw wildcharm winaltkeys winminwidth wmnu writeany -syn keyword vimOption contained al ar autoindent backspace balloonevalterm bexpr bo browsedir casemap cfu cino cmp comments concealcursor cpp cscopetag cst cursorline dex dip eb emoji errorbells exrc fdm ff filetype fmr foldlevelstart formatlistpat gd go guifontset helpfile highlight hls imactivatekey iminsert include inf isk keymodel langremap lisp lpl macatsui maxcombine menc mls modelines mousem msm number operatorfunc pastetoggle pexpr popt printexpr pumheight pythonthreedll rdt report rnu ruler scf scrollopt sessionoptions shellredir shm showtabline slm so spelllang spr sta sua swf syntax tagcase tb tenc termwinsize tfu timeoutlen tm ts tty tw udf updatecount vbs viewdir vop wc wh wildignore wincolor winptydll wmw writebackup -syn keyword vimOption contained aleph arab autoread backup balloonexpr bg bomb bs cb ch cinoptions cms commentstring conceallevel cpt cscopetagorder csto cursorlineopt dg dir ed enc errorfile fcl fdn ffs fillchars fo foldmarker formatoptions gdefault gp guifontwide helpheight history hlsearch imaf ims includeexpr infercase iskeyword keywordprg laststatus lispwords lrm magic maxfuncdepth menuitems mm modifiable mousemodel mzq numberwidth opfunc patchexpr pfn pp printfont pumwidth pythonthreehome re restorescreen ro rulerformat scl scs sft shellslash shortmess shq sm softtabstop spelloptions sps stal suffixes switchbuf ta tagfunc tbi term termwintype tgc title to tsl ttybuiltin twk udir updatetime vdir viewoptions vsts wcm whichwrap wildignorecase window winwidth wop writedelay -syn keyword vimOption contained allowrevins arabic autoshelldir backupcopy bdir bh breakat bsdir cc charconvert cinw co compatible confirm crb cscopeverbose csverb cwh dict directory edcompatible encoding errorformat fcs fdo fic fixendofline foldclose foldmethod formatprg gfm grepformat guiheadroom helplang hk ic imak imsearch incsearch insertmode isp km lazyredraw list ls makeef maxmapdepth mfd mmd modified mouses mzquantum nuw osfiletype patchmode ph preserveindent printheader pvh pyx readonly revins rop runtimepath scr sect sh shelltemp shortname si smartcase sol spellsuggest sr startofline suffixesadd sws tabline taglength tbidi termbidi terse tgst titlelen toolbar tsr ttyfast tws ul ur ve vif vts wcr wi wildmenu winfixheight wiv wrap ws -syn keyword vimOption contained altkeymap arabicshape autowrite backupdir bdlay bin breakindent bsk ccv ci cinwords cocu complete copyindent cryptmethod csl cuc debug dictionary display ef endofline esckeys fdc fdt fileencoding fixeol foldcolumn foldminlines fp gfn grepprg guiligatures hf hkmap icon imc imsf inde is isprint kmp lbr listchars lsp makeencoding maxmem mh mmp more mouseshape mzschemedll odev pa path pheader previewheight printmbcharset pvp pyxversion redrawtime ri rs sb scroll sections shcf shelltype showbreak sidescroll smartindent sp spf srr statusline sw sxe tabpagemax tagrelative tbis termencoding textauto thesaurus titleold toolbariconsize tsrfu ttym twsl undodir ut verbose viminfo wa wd wic wildmode winfixwidth wiw wrapmargin ww -syn keyword vimOption contained ambiwidth ari autowriteall backupext belloff binary breakindentopt bt cd cin clipboard cole completefunc cot cscopepathcomp cspc cul deco diff dy efm eol et fde fen fileencodings fk foldenable foldnestmax fs gfs gtl guioptions hh hkmapp iconstring imcmdline imst indentexpr isf joinspaces kp lcs lm luadll makeprg maxmempattern mis mmt mouse mouset mzschemegcdll oft packpath pdev pi previewpopup printmbfont pvw qe regexpengine rightleft rtp sbo scrollbind secure shell shellxescape showcmd sidescrolloff smarttab spc spl ss stl +syn keyword vimOption contained acd ambw arshape aw backupskip beval bk bri bufhidden cdpath cindent cm colorcolumn completeopt cp cscopeprg csprg culopt def diffexpr ea ei ep eventignore fdi fenc fileformat fkmap foldexpr foldopen fsync gfw gtt guipty hi hkp ignorecase imd imstatusfunc indentkeys isfname js langmap linebreak lmap lw mat maxmemtot mkspellmem mod mousef mousetime nf ofu para penc pm previewwindow printoptions pw qftf relativenumber rightleftcmd ru sbr scrollfocus sel shellcmdflag shellxquote showfulltag signcolumn smc spell splitbelow ssl stl sw sxe tabpagemax tagrelative tbis termencoding textauto thesaurus titleold top ttimeout ttymouse twt undofile varsofttabstop verbosefile viminfofile wak weirdinvert wig wildoptions winheight wm wrapscan +syn keyword vimOption contained ai anti asd awa balloondelay bevalterm bkc briopt buflisted cedit cink cmdheight columns completepopup cpo cscopequickfix csqf cursorbind define diffopt ead ek equalalways ex fdl fencs fileformats flp foldignore foldtext ft ghr guicursor guitablabel hid hl im imdisable imstyle indk isi key langmenu lines lnr lz matchpairs mco ml modeline mousefocus mp nrformats omnifunc paragraphs perldll pmbcs printdevice prompt pythondll quickfixtextfunc remap rl rubydll sc scrolljump selection shellpipe shiftround showmatch siso smd spellcapcheck splitright ssop stmp swapfile sxq tabstop tags tbs termguicolors textmode thesaurusfunc titlestring tpm ttimeoutlen ttyscroll tx undolevels vartabstop vfile virtualedit warn wfh wildchar wim winminheight wmh write +syn keyword vimOption contained akm antialias autochdir background ballooneval bex bl brk buftype cf cinkeys cmdwinheight com completeslash cpoptions cscoperelative csre cursorcolumn delcombine digraph eadirection emo equalprg expandtab fdls fex fileignorecase fml foldlevel formatexpr gcr gli guifont guitabtooltip hidden hlg imactivatefunc imi inc inex isident keymap langnoremap linespace loadplugins ma matchtime mef mle modelineexpr mousehide mps nu opendevice paste pex pmbfn printencoding pt pythonhome quoteescape renderoptions rlc ruf scb scrolloff selectmode shellquote shiftwidth showmode sj sn spellfile spo st sts swapsync syn tag tagstack tc termwinkey textwidth tildeop tl tr ttm ttytype uc undoreload vb vi visualbell wb wfw wildcharm winaltkeys winminwidth wmnu writeany +syn keyword vimOption contained al ar autoindent backspace balloonevalterm bexpr bo browsedir casemap cfu cino cmp comments concealcursor cpp cscopetag cst cursorline dex dip eb emoji errorbells exrc fdm ff filetype fmr foldlevelstart formatlistpat gd go guifontset helpfile highlight hls imactivatekey iminsert include inf isk keymodel langremap lisp lpl macatsui maxcombine menc mls modelines mousem msm number operatorfunc pastetoggle pexpr popt printexpr pumheight pythonthreedll rdt report rnu ruler scf scrollopt sessionoptions shellredir shm showtabline slm so spelllang spr sta su swb synmaxcol tagbsearch tal tcldll termwinscroll tf timeout tm ts tty tw udf updatecount vbs viewdir vop wc wh wildignore wincolor winptydll wmw writebackup +syn keyword vimOption contained aleph arab autoread backup balloonexpr bg bomb bs cb ch cinoptions cms commentstring conceallevel cpt cscopetagorder csto cursorlineopt dg dir ed enc errorfile fcl fdn ffs fillchars fo foldmarker formatoptions gdefault gp guifontwide helpheight history hlsearch imaf ims includeexpr infercase iskeyword keywordprg laststatus lispwords lrm magic maxfuncdepth menuitems mm modifiable mousemodel mzq numberwidth opfunc patchexpr pfn pp printfont pumwidth pythonthreehome re restorescreen ro rulerformat scl scs sft shellslash shortmess shq sm softtabstop spelloptions sps stal sua swf syntax tagcase tb tenc termwinsize tfu timeoutlen to tsl ttybuiltin twk udir updatetime vdir viewoptions vsts wcm whichwrap wildignorecase window winwidth wop writedelay +syn keyword vimOption contained allowrevins arabic autoshelldir backupcopy bdir bh breakat bsdir cc charconvert cinw co compatible confirm crb cscopeverbose csverb cwh dict directory edcompatible encoding errorformat fcs fdo fic fixendofline foldclose foldmethod formatprg gfm grepformat guiheadroom helplang hk ic imak imsearch incsearch insertmode isp km lazyredraw list ls makeef maxmapdepth mfd mmd modified mouses mzquantum nuw osfiletype patchmode ph preserveindent printheader pvh pyx readonly revins rop runtimepath scr sect sh shelltemp shortname si smartcase sol spellsuggest sr startofline suffixes switchbuf ta tagfunc tbi term termwintype tgc title toolbar tsr ttyfast tws ul ur ve vif vts wcr wi wildmenu winfixheight wiv wrap ws +syn keyword vimOption contained altkeymap arabicshape autowrite backupdir bdlay bin breakindent bsk ccv ci cinwords cocu complete copyindent cryptmethod csl cuc debug dictionary display ef endofline esckeys fdc fdt fileencoding fixeol foldcolumn foldminlines fp gfn grepprg guiligatures hf hkmap icon imc imsf inde is isprint kmp lbr listchars lsp makeencoding maxmem mh mmp more mouseshape mzschemedll odev pa path pheader previewheight printmbcharset pvp pyxversion redrawtime ri rs sb scroll sections shcf shelltype showbreak sidescroll smartindent sp spf srr statusline suffixesadd sws tabline taglength tbidi termbidi terse tgst titlelen toolbariconsize tsrfu ttym twsl undodir ut verbose viminfo wa wd wic wildmode winfixwidth wiw wrapmargin ww +syn keyword vimOption contained ambiwidth ari autowriteall backupext belloff binary breakindentopt bt cd cin clipboard cole completefunc cot cscopepathcomp cspc cul deco diff dy efm eol et fde fen fileencodings fk foldenable foldnestmax fs gfs gtl guioptions hh hkmapp iconstring imcmdline imst indentexpr isf joinspaces kp lcs lm luadll makeprg maxmempattern mis mmt mouse mouset mzschemegcdll oft packpath pdev pi previewpopup printmbfont pvw qe regexpengine rightleft rtp sbo scrollbind secure shell shellxescape showcmd sidescrolloff smarttab spc spl ss " vimOptions: These are the turn-off setting variants {{{2 syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoindent noautowrite noawa noballoonevalterm nobin nobl nobri noci nocompatible nocp nocscopetag nocst nocul nocursorline nodg noea noedcompatible noemoji noequalalways noet noexrc nofileignorecase nofk nofs nogdefault nohidden nohkmapp nohlsearch noignorecase noimcmdline noincsearch noinsertmode nojs nolazyredraw nolisp noloadplugins nolz nomagic nomle nomodelineexpr nomodified nomousef nomousehide nonumber noopendevice nopi nopreviewwindow nopvw norelativenumber norestorescreen nori norl noro noru nosb noscb noscrollbind noscs nosft noshelltemp noshortname noshowfulltag noshowmode nosm nosmartindent nosmd nosol nosplitbelow nospr nossl nostartofline noswapfile nota notagrelative notbi notbs noterse notextmode notgst notimeout noto notr nottybuiltin notx noundofile novisualbell nowarn noweirdinvert nowfw nowildignorecase nowinfixheight nowiv nowrap nowrite nowritebackup @@ -763,10 +763,10 @@ if g:vimsyn_embed =~# 'P' && has("pythonx") && filereadable(s:pythonpath) unlet! b:current_syntax syn cluster vimFuncBodyList add=vimPythonRegion exe "syn include @vimPythonScript ".s:pythonpath - VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon][3x]\=\s*<<\s*\z(\S*\)\ze\(\s*#.*\)\=$+ end=+^\z1\ze\(\s*".*\)\=$+ contains=@vimPythonScript - VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon][3x]\=\s*<<\s*$+ end=+\.$+ contains=@vimPythonScript - VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\s*<<\s*\z(\S*\)\ze\(\s*#.*\)\=$+ end=+^\z1\ze\(\s*".*\)\=$+ contains=@vimPythonScript - VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\=\s*<<\s*$+ end=+\.$+ contains=@vimPythonScript + VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon][3x]\=\s*<<\s*\%(trim\s*\)\=\z(\S*\)\ze\(\s*#.*\)\=$+ end=+^\z1\ze\(\s*".*\)\=$+ contains=@vimPythonScript + VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon][3x]\=\s*<<\s*\%(trim\s*\)\=$+ end=+\.$+ contains=@vimPythonScript + VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\s*<<\s*\%(trim\s*\)\=\z(\S*\)\ze\(\s*#.*\)\=$+ end=+^\z1\ze\(\s*".*\)\=$+ contains=@vimPythonScript + VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\=\s*<<\s*\%(trim\s*\)\=$+ end=+\.$+ contains=@vimPythonScript syn cluster vimFuncBodyList add=vimPythonRegion else syn region vimEmbedError start=+py\%[thon]3\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ |