From 4700398e384f38f752b432e187462f404b96847d Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 5 Dec 2021 21:54:04 +0000 Subject: Update runtime files --- runtime/autoload/dist/ft.vim | 2 +- runtime/doc/channel.txt | 9 +-- runtime/doc/cmdline.txt | 8 ++- runtime/doc/filetype.txt | 8 --- runtime/doc/motion.txt | 6 +- runtime/doc/options.txt | 13 ++-- runtime/doc/popup.txt | 2 +- runtime/doc/quickfix.txt | 8 +-- runtime/doc/sign.txt | 10 +-- runtime/doc/syntax.txt | 8 +++ runtime/doc/tags | 6 +- runtime/doc/term.txt | 18 ++++- runtime/doc/todo.txt | 16 ++--- runtime/doc/various.txt | 12 ++-- runtime/doc/vim9.txt | 17 +++-- runtime/doc/windows.txt | 4 +- runtime/doc/xxd-fr.1 | 2 +- runtime/doc/xxd-fr.UTF-8.1 | 2 +- runtime/filetype.vim | 2 +- runtime/indent/vim.vim | 3 +- .../pack/dist/opt/termdebug/plugin/termdebug.vim | 25 ++++--- runtime/syntax/django.vim | 3 +- runtime/syntax/squirrel.vim | 50 +++++++++++++ runtime/syntax/vb.vim | 84 ++++++++++++---------- runtime/syntax/vim.vim | 6 +- runtime/tools/demoserver.py | 9 ++- src/xdiff/README.txt | 3 + 27 files changed, 223 insertions(+), 113 deletions(-) create mode 100644 runtime/syntax/squirrel.vim diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim index 74df871544..a3db4ae87a 100644 --- a/runtime/autoload/dist/ft.vim +++ b/runtime/autoload/dist/ft.vim @@ -1,7 +1,7 @@ " Vim functions for file type detection " " Maintainer: Bram Moolenaar -" Last Change: 2020 Aug 17 +" Last Change: 2021 Nov 27 " These functions are moved here from runtime/filetype.vim to make startup " faster. diff --git a/runtime/doc/channel.txt b/runtime/doc/channel.txt index 39cb43c004..6124a89458 100644 --- a/runtime/doc/channel.txt +++ b/runtime/doc/channel.txt @@ -1,4 +1,4 @@ -*channel.txt* For Vim version 8.2. Last change: 2020 Oct 17 +*channel.txt* For Vim version 8.2. Last change: 2021 Nov 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -101,7 +101,7 @@ Instead of giving a callback with every send call, it can also be specified when opening the channel: > call ch_close(channel) let channel = ch_open('localhost:8765', {'callback': "MyHandler"}) - call ch_sendexpr(channel, 'hello!') + call ch_sendexpr(channel, 'hello channel!') When trying out channels it's useful to see what is going on. You can tell Vim to write lines in log file: > @@ -132,8 +132,9 @@ When using an IPv6 address, enclose it within square brackets. E.g., "raw" - Use raw messages *channel-callback* *E921* "callback" A function that is called when a message is received that is - not handled otherwise. It gets two arguments: the channel - and the received message. Example: > + not handled otherwise (e.g. a JSON message with ID zero). It + gets two arguments: the channel and the received message. + Example: > func Handle(channel, msg) echo 'Received: ' . a:msg endfunc diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt index eca741f753..1dc3ebe5d4 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 Nov 22 +*cmdline.txt* For Vim version 8.2. Last change: 2021 Dec 04 VIM REFERENCE MANUAL by Bram Moolenaar @@ -919,9 +919,11 @@ Note: these are typed literally, they are not special keys! *:* ** When executing autocommands, is replaced with the match for which this autocommand was executed. *E497* - It differs from only when the file name isn't used - to match with (for FileType, Syntax and SpellFileMissing + It differs from when the file name isn't used to + match with (for FileType, Syntax and SpellFileMissing events). + When the match is with a file name, it is expanded to the + full path. *:* ** When executing a ":source" command, is replaced with the file name of the sourced file. *E498* diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt index 8cb2e118ad..d832e9b113 100644 --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -539,14 +539,6 @@ Options: For further discussion of fortran_have_tabs and the method used for the detection of source format see |ft-fortran-syntax|. -GPROF *ft-gprof-plugin* - -The gprof filetype plugin defines a mapping to jump from a function -entry in the gprof flat profile or from a function entry in the call graph -to the details of that function in the call graph. - -The mapping can be disabled with: > - let g:no_gprof_maps = 1 GIT COMMIT *ft-gitcommit-plugin* diff --git a/runtime/doc/motion.txt b/runtime/doc/motion.txt index b50bd65c5e..6e243fda94 100644 --- a/runtime/doc/motion.txt +++ b/runtime/doc/motion.txt @@ -1,4 +1,4 @@ -*motion.txt* For Vim version 8.2. Last change: 2021 Jun 13 +*motion.txt* For Vim version 8.2. Last change: 2021 Dec 04 VIM REFERENCE MANUAL by Bram Moolenaar @@ -386,6 +386,8 @@ w [count] words forward. |exclusive| motion. or ** *W* W [count] WORDS forward. |exclusive| motion. + If does not work, check out + |arrow_modifiers|. *e* e Forward to the end of word [count] |inclusive|. @@ -400,6 +402,8 @@ b [count] words backward. |exclusive| motion. or ** *B* B [count] WORDS backward. |exclusive| motion. + If does not work, check out + |arrow_modifiers|. *ge* ge Backward to the end of word [count] |inclusive|. diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 73c92122f9..ee03570ba8 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 24 +*options.txt* For Vim version 8.2. Last change: 2021 Dec 03 VIM REFERENCE MANUAL by Bram Moolenaar @@ -35,6 +35,8 @@ achieve special effects. These options come in three forms: internally and can't be changed. Changing the terminal codes in the GUI is not useful either... +:se[t]! termcap Idem, but don't use multiple columns. + *E518* *E519* :se[t] {option}? Show value of {option}. @@ -869,9 +871,12 @@ A jump table for the options with a short description can be found at |Q_op|. 'autowrite' 'aw' boolean (default off) global Write the contents of the file, if it has been modified, on each - :next, :rewind, :last, :first, :previous, :stop, :suspend, :tag, :!, - :make, CTRL-] and CTRL-^ command; and when a :buffer, CTRL-O, CTRL-I, - '{A-Z0-9}, or `{A-Z0-9} command takes one to another file. + `:next`, `:rewind`, `:last`, `:first`, `:previous`, `:stop`, + `:suspend`, `:tag, `:!`, ``:make`, CTRL-] and CTRL-^ command; and when + a :buffer, CTRL-O, CTRL-I, '{A-Z0-9}, or `{A-Z0-9} command takes one + to another file. + A buffer is not written if it becomes hidden, e.g. when 'bufhidden' is + set to "hide" and `:next` is used Note that for some commands the 'autowrite' option is not used, see 'autowriteall' for that. Some buffers will not be written, specifically when 'buftype' is diff --git a/runtime/doc/popup.txt b/runtime/doc/popup.txt index 904abe73b1..b4d770245f 100644 --- a/runtime/doc/popup.txt +++ b/runtime/doc/popup.txt @@ -1,4 +1,4 @@ -*popup.txt* For Vim version 8.2. Last change: 2021 Aug 15 +*popup.txt* For Vim version 8.2. Last change: 2021 Nov 29 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index 9ebefa956d..47ead217f9 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1,4 +1,4 @@ -*quickfix.txt* For Vim version 8.2. Last change: 2021 May 22 +*quickfix.txt* For Vim version 8.2. Last change: 2021 Dec 03 VIM REFERENCE MANUAL by Bram Moolenaar @@ -856,9 +856,9 @@ lists. They set one of the existing error lists as the current one. *:chistory* *:chi* :[count]chi[story] Show the list of error lists. The current list is marked with ">". The output looks like: - error list 1 of 3; 43 errors ~ - > error list 2 of 3; 0 errors ~ - error list 3 of 3; 15 errors ~ + error list 1 of 3; 43 errors :make ~ + > error list 2 of 3; 0 errors :helpgrep tag ~ + error list 3 of 3; 15 errors :grep ex_help *.c ~ When [count] is given, then the count'th quickfix list is made the current list. Example: > diff --git a/runtime/doc/sign.txt b/runtime/doc/sign.txt index 489f3d8b52..7976cecca8 100644 --- a/runtime/doc/sign.txt +++ b/runtime/doc/sign.txt @@ -1,4 +1,4 @@ -*sign.txt* For Vim version 8.2. Last change: 2021 Mar 07 +*sign.txt* For Vim version 8.2. Last change: 2021 Dec 05 VIM REFERENCE MANUAL by Gordon Prieur @@ -441,14 +441,16 @@ sign_getdefined([{name}]) *sign_getdefined()* following entries: icon full path to the bitmap file of the sign linehl highlight group used for the whole line the - sign is placed in. + sign is placed in; not present if not set name name of the sign text text that is displayed when there is no icon or the GUI is not being used. - texthl highlight group used for the text item + texthl highlight group used for the text item; not + present if not set culhl highlight group used for the text item when the cursor is on the same line as the sign and - 'cursorline' is enabled. + 'cursorline' is enabled; not present if not + set Returns an empty List if there are no signs and when {name} is not found. diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 3bc5cf4b0a..0101b51b64 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -3196,6 +3196,14 @@ buffer by buffer basis. For more detailed instructions see |ft_sql.txt|. +SQUIRREL *squirrel.vim* *ft-squirrel-syntax* + +Squirrel is a high level imperative, object-oriented programming language, +designed to be a light-weight scripting language that fits in the size, memory +bandwidth, and real-time requirements of applications like video games. Files +with the following extensions are recognized as squirrel files: .nut. + + TCSH *tcsh.vim* *ft-tcsh-syntax* This covers the shell named "tcsh". It is a superset of csh. See |csh.vim| diff --git a/runtime/doc/tags b/runtime/doc/tags index 768b98c6e4..f694ba2bc5 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -3951,7 +3951,6 @@ E107 eval.txt /*E107* E108 eval.txt /*E108* E109 eval.txt /*E109* E1091 vim9.txt /*E1091* -E1092 vim9.txt /*E1092* E1094 vim9.txt /*E1094* E11 cmdline.txt /*E11* E110 eval.txt /*E110* @@ -5463,6 +5462,7 @@ arglistid() eval.txt /*arglistid()* argument-list editing.txt /*argument-list* argv() eval.txt /*argv()* argv-variable eval.txt /*argv-variable* +arrow_modifiers term.txt /*arrow_modifiers* as motion.txt /*as* asin() eval.txt /*asin()* asm.vim syntax.txt /*asm.vim* @@ -6562,6 +6562,7 @@ format-bullet-list tips.txt /*format-bullet-list* format-comments change.txt /*format-comments* format-formatexpr change.txt /*format-formatexpr* formatting change.txt /*formatting* +forth.vim syntax.txt /*forth.vim* fortran.vim syntax.txt /*fortran.vim* friendship intro.txt /*friendship* frombook usr_01.txt /*frombook* @@ -6615,6 +6616,7 @@ ft-erlang-syntax syntax.txt /*ft-erlang-syntax* ft-euphoria-syntax syntax.txt /*ft-euphoria-syntax* ft-flexwiki-syntax syntax.txt /*ft-flexwiki-syntax* ft-form-syntax syntax.txt /*ft-form-syntax* +ft-forth-syntax syntax.txt /*ft-forth-syntax* ft-fortran-indent indent.txt /*ft-fortran-indent* ft-fortran-plugin filetype.txt /*ft-fortran-plugin* ft-fortran-syntax syntax.txt /*ft-fortran-syntax* @@ -6706,6 +6708,7 @@ ft-sql-omni insert.txt /*ft-sql-omni* ft-sql-syntax syntax.txt /*ft-sql-syntax* ft-sqlanywhere-syntax syntax.txt /*ft-sqlanywhere-syntax* ft-sqlinformix-syntax syntax.txt /*ft-sqlinformix-syntax* +ft-squirrel-syntax syntax.txt /*ft-squirrel-syntax* ft-syntax-omni insert.txt /*ft-syntax-omni* ft-tcsh-syntax syntax.txt /*ft-tcsh-syntax* ft-termcap-syntax syntax.txt /*ft-termcap-syntax* @@ -9242,6 +9245,7 @@ sqlj ft_sql.txt /*sqlj* sqlserver ft_sql.txt /*sqlserver* sqlsettype ft_sql.txt /*sqlsettype* sqrt() eval.txt /*sqrt()* +squirrel.vim syntax.txt /*squirrel.vim* srand() eval.txt /*srand()* sscanf eval.txt /*sscanf* standard-plugin usr_05.txt /*standard-plugin* diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt index d6f31d379c..3333a3ab6f 100644 --- a/runtime/doc/term.txt +++ b/runtime/doc/term.txt @@ -1,4 +1,4 @@ -*term.txt* For Vim version 8.2. Last change: 2021 Aug 29 +*term.txt* For Vim version 8.2. Last change: 2021 Dec 04 VIM REFERENCE MANUAL by Bram Moolenaar @@ -151,7 +151,7 @@ terminal that tmux is running in): > let &t_fe = "\[?1004h" let &t_fd = "\[?1004l" - " Enable modified arrow keys, see :help xterm-modifier-keys + " Enable modified arrow keys, see :help arrow_modifiers execute "silent! set =\[@;*A" execute "silent! set =\[@;*B" execute "silent! set =\[@;*C" @@ -252,7 +252,19 @@ another code. That is to avoid that the codes obtained from xterm directly Another special value is a termcap entry ending in "@;*X". This is for cursor keys, which either use "CSI X" or "CSI 1 ; modifier X". Thus the "@" stands for either "1" if a modifier follows, or nothing. - *xterm-scroll-region* + *arrow_modifiers* +Several terminal emulators (alacritty, gnome, konsole, etc.) send special +codes for keys with modifiers, but these do not have an entry in the +termcap/terminfo database. You can make them work by adding a few lines in +your vimrc. For example, to make the Control modifier work with arrow keys +for the gnome terminal: > + if &term =~ 'gnome' + execute "set =\[@;*A" + execute "set =\[@;*B" + execute "set =\[@;*C" + execute "set =\[@;*D" + endif +< *xterm-scroll-region* The default termcap entry for xterm on Sun and other platforms does not contain the entry for scroll regions. Add ":cs=\E[%i%d;%dr:" to the xterm entry in /etc/termcap and everything should work. diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 4793abd832..1772aa1e92 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 26 +*todo.txt* For Vim version 8.2. Last change: 2021 Dec 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -38,13 +38,7 @@ browser use: https://github.com/vim/vim/issues/1234 *known-bugs* -------------------- Known bugs and current work ----------------------- -refactor ex_let_one() to subfunctions. - Vim9 - Make everything work: -- "filter #pat# ls" should work, #pat# is not a comment - vim9script - edit foobar - filter #foobar# ls - Check TODO items in vim9compile.c and vim9execute.c - use CheckLegacyAndVim9Success(lines) in many more places - For builtin functions using tv_get_string*() use check_for_string() to be @@ -263,6 +257,10 @@ test_arglist func Test_all_not_allowed_from_cmdwin() hangs on MS-Windows. Mapping with partial match not executed properly in GTK. (Ingo Karkat, #7082) +Information for a specific terminal (e.g. gnome, tmux, konsole, alacritty) is +spread out. Make a section with copy/paste examples of script and pointers to +more information. + Problem that a previous silent ":throw" causes a following try/catch not to work. (ZyX, 2013 Sep 28) With examples: (Malcolm Rowe, 2015 Dec 24) Also see #8487 for an example. @@ -1470,10 +1468,6 @@ When the CursorMovedI event triggers, and CTRL-X was typed, a script cannot restore the mode properly. (Andrew Stewart, 2016 Apr 20) Do not trigger the event? -Patch to fix display of listchars on the cursorline. (Nayuri Aohime, 2013) -Update suggested by Yasuhiro Matsumoto, 2014 Nov 25: -https://gist.github.com/presuku/d3d6b230b9b6dcfc0477 - Patch to make the behavior of "w" more straightforward, but not Vi compatible. With a 'cpo' flag. (Christian Brabandt, 2016 Feb 8) diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt index 290eb4f1cf..3f750cd874 100644 --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -1,4 +1,4 @@ -*various.txt* For Vim version 8.2. Last change: 2021 Sep 06 +*various.txt* For Vim version 8.2. Last change: 2021 Nov 30 VIM REFERENCE MANUAL by Bram Moolenaar @@ -369,7 +369,7 @@ N *+digraphs* |digraphs| *E196* *+dnd* Support for DnD into the "~ register |quote_~|. B *+emacs_tags* |emacs-tags| files N *+eval* expression evaluation |eval.txt| -N *+ex_extra* always on now, used to be for Vim's extra Ex commands +T *+ex_extra* always on now, used to be for Vim's extra Ex commands N *+extra_search* |'hlsearch'| and |'incsearch'| options. - *+farsi* Removed: |farsi| language N *+file_in_path* |gf|, |CTRL-W_f| and || @@ -423,7 +423,7 @@ N *+multi_lang* non-English language support |multi-lang| m *+mzscheme* Mzscheme interface |mzscheme| m *+mzscheme/dyn* Mzscheme interface |mzscheme-dynamic| |/dyn| m *+netbeans_intg* |netbeans| - *+num64* 64-bit Number support |Number| +T *+num64* 64-bit Number support |Number| Always enabled since 8.2.0271, use v:numbersize to check the actual size of a Number. m *+ole* Win32 GUI only: |ole-interface| @@ -471,15 +471,15 @@ N *+textobjects* |text-objects| selection N *+textprop* |text-properties| *+tgetent* non-Unix only: able to use external termcap N *+timers* the |timer_start()| function -N *+title* Setting the window 'title' and 'icon'; Always enabled +T *+title* Setting the window 'title' and 'icon'; Always enabled N *+toolbar* |gui-toolbar| T *+user_commands* User-defined commands. |user-commands| Always enabled since 8.1.1210. B *+vartabs* Variable-width tabstops. |'vartabstop'| N *+viminfo* |'viminfo'| - *+vertsplit* Vertically split windows |:vsplit|; Always enabled +T *+vertsplit* Vertically split windows |:vsplit|; Always enabled since 8.0.1118. -N *+virtualedit* |'virtualedit'| Always enabled since 8.1.826. +T *+virtualedit* |'virtualedit'| Always enabled since 8.1.826. T *+visual* Visual mode |Visual-mode| Always enabled since 7.4.200. T *+visualextra* extra Visual mode commands |blockwise-operators| T *+vreplace* |gR| and |gr| diff --git a/runtime/doc/vim9.txt b/runtime/doc/vim9.txt index 9329aa9c7c..856ec2f118 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 Nov 22 +*vim9.txt* For Vim version 8.2. Last change: 2021 Dec 01 VIM REFERENCE MANUAL by Bram Moolenaar @@ -234,9 +234,10 @@ the "name#" prefix is sufficient. > def scriptname#function() # autoload When using `:function` or `:def` to specify a nested function inside a `:def` -function, this nested function is local to the code block it is defined in. -In a `:def` function it is not possible to define a script-local function. It -is possible to define a global function by using the "g:" prefix. +function and no namespace was given, this nested function is local to the code +block it is defined in. In a `:def` function it is not possible to define a +script-local function. It is possible to define a global function by using +the "g:" prefix. When referring to a function and no "s:" or "g:" prefix is used, Vim will search for the function: @@ -820,10 +821,16 @@ error. Example: > For loop ~ -The loop variable must not exist yet: > +The loop variable must not be declared yet: > var i = 1 for i in [1, 2, 3] # Error! +It is possible to use a global variable though: > + g:i = 1 + for g:i in [1, 2, 3] + echo g:i + endfor + 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/doc/windows.txt b/runtime/doc/windows.txt index c288377caa..2f608352db 100644 --- a/runtime/doc/windows.txt +++ b/runtime/doc/windows.txt @@ -1,4 +1,4 @@ -*windows.txt* For Vim version 8.2. Last change: 2021 Sep 09 +*windows.txt* For Vim version 8.2. Last change: 2021 Nov 29 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1203,6 +1203,8 @@ list of buffers. |unlisted-buffer| the current buffer remains being edited. See |:buffer-!| for [!]. This will also edit a buffer that is not in the buffer list, without setting the 'buflisted' flag. + The notation with single quotes does not work here, + `:buf 12'345'` uses 12'345 as a buffer name. Also see |+cmd|. :[N]b[uffer][!] [+cmd] {bufname} *{bufname}* diff --git a/runtime/doc/xxd-fr.1 b/runtime/doc/xxd-fr.1 index a50336e17c..e170df5d77 100644 --- a/runtime/doc/xxd-fr.1 +++ b/runtime/doc/xxd-fr.1 @@ -111,7 +111,7 @@ octets. .TP .IR \-p " | " \-ps " | " \-postscript " | " \-plain Produit une conversion continue dans le style Postscript (postscript continuous -hexdumd style). +hexdump style). Également connu sous le nom de « conversion brute » (plain hexdump style). .TP .IR \-r " | " \-revert diff --git a/runtime/doc/xxd-fr.UTF-8.1 b/runtime/doc/xxd-fr.UTF-8.1 index c00eff88c1..47773a1363 100644 --- a/runtime/doc/xxd-fr.UTF-8.1 +++ b/runtime/doc/xxd-fr.UTF-8.1 @@ -111,7 +111,7 @@ octets. .TP .IR \-p " | " \-ps " | " \-postscript " | " \-plain Produit une conversion continue dans le style Postscript (postscript continuous -hexdumd style). +hexdump style). Également connu sous le nom de « conversion brute » (plain hexdump style). .TP .IR \-r " | " \-revert diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 705c2dce4a..87d1f48f75 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: Bram Moolenaar -" Last Change: 2021 Nov 16 +" Last Change: 2021 Dec 03 " Listen very carefully, I will say this only once if exists("did_load_filetypes") diff --git a/runtime/indent/vim.vim b/runtime/indent/vim.vim index d5d0d94b52..733584a67d 100644 --- a/runtime/indent/vim.vim +++ b/runtime/indent/vim.vim @@ -1,7 +1,7 @@ " Vim indent file " Language: Vim script " Maintainer: Bram Moolenaar -" Last Change: 2021 Nov 03 +" Last Change: 2021 Nov 27 " Only load this indent file when no other was loaded. if exists("b:did_indent") @@ -12,6 +12,7 @@ let b:did_indent = 1 setlocal indentexpr=GetVimIndent() setlocal indentkeys+==end,=},=else,=cat,=finall,=END,0\\,0=\"\\\ setlocal indentkeys-=0# +setlocal indentkeys-=: let b:undo_indent = "setl indentkeys< indentexpr<" diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim index 24161d5231..e2d23475eb 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 27 +" Last Change: 2021 Nov 29 " " WORK IN PROGRESS - Only the basics work " Note: On MS-Windows you need a recent version of gdb. The one included with @@ -479,7 +479,7 @@ func s:StartDebugCommon(dict) " Run the command if the bang attribute was given and got to the debug " window. if get(a:dict, 'bang', 0) - call s:SendCommand('-exec-run') + call s:SendResumingCommand('-exec-run') call win_gotoid(s:ptywin) endif endfunc @@ -512,9 +512,14 @@ func TermDebugSendCommand(cmd) endif endfunc -" Send a command only when stopped. Used for :Next and :Step. -func s:SendCommandIfStopped(cmd) +" Send a command that resumes the program. If the program isn't stopped the +" command is not sent (to avoid a repeated command to cause trouble). +" If the command is sent then reset s:stopped. +func s:SendResumingCommand(cmd) if s:stopped + " reset s:stopped here, it may take a bit of time before we get a response + let s:stopped = 0 + call ch_log('assume that program is running after this command') call s:SendCommand(a:cmd) else call ch_log('dropping command, program is running: ' . a:cmd) @@ -808,11 +813,11 @@ func s:InstallCommands() command -nargs=? Break call s:SetBreakpoint() command Clear call s:ClearBreakpoint() - command Step call s:SendCommandIfStopped('-exec-step') - command Over call s:SendCommandIfStopped('-exec-next') - command Finish call s:SendCommandIfStopped('-exec-finish') + command Step call s:SendResumingCommand('-exec-step') + command Over call s:SendResumingCommand('-exec-next') + command Finish call s:SendResumingCommand('-exec-finish') command -nargs=* Run call s:Run() - command -nargs=* Arguments call s:SendCommand('-exec-arguments ' . ) + command -nargs=* Arguments call s:SendResumingCommand('-exec-arguments ' . ) if s:way == 'prompt' command Stop call s:PromptInterrupt() @@ -995,9 +1000,9 @@ endfunc func s:Run(args) if a:args != '' - call s:SendCommand('-exec-arguments ' . a:args) + call s:SendResumingCommand('-exec-arguments ' . a:args) endif - call s:SendCommand('-exec-run') + call s:SendResumingCommand('-exec-run') endfunc func s:SendEval(expr) diff --git a/runtime/syntax/django.vim b/runtime/syntax/django.vim index d3ca4de0e2..76b47d2e59 100644 --- a/runtime/syntax/django.vim +++ b/runtime/syntax/django.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: Django template " Maintainer: Dave Hodder -" Last Change: 2014 Jul 13 +" Last Change: 2021 Nov 29 " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -31,6 +31,7 @@ syn keyword djangoStatement contained closecomment widthratio url with endwith syn keyword djangoStatement contained get_current_language trans noop blocktrans syn keyword djangoStatement contained endblocktrans get_available_languages syn keyword djangoStatement contained get_current_language_bidi plural +syn keyword djangoStatement contained translate blocktranslate endblocktranslate " Django templete built-in filters syn keyword djangoFilter contained add addslashes capfirst center cut date diff --git a/runtime/syntax/squirrel.vim b/runtime/syntax/squirrel.vim new file mode 100644 index 0000000000..81d59cc986 --- /dev/null +++ b/runtime/syntax/squirrel.vim @@ -0,0 +1,50 @@ +" Vim syntax file +" Language: squirrel +" Current Maintainer: Matt Dunford (zenmatic@gmail.com) +" URL: https://github.com/zenmatic/vim-syntax-squirrel +" Last Change: 2021 Nov 28 + +" http://squirrel-lang.org/ + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" inform C syntax that the file was included from cpp.vim +let b:filetype_in_cpp_family = 1 + +" Read the C syntax to start with +runtime! syntax/c.vim +unlet b:current_syntax + +" squirrel extensions +syn keyword squirrelStatement delete this in yield resume base clone +syn keyword squirrelAccess local +syn keyword cConstant null +syn keyword squirrelModifier static +syn keyword squirrelType bool instanceof typeof +syn keyword squirrelExceptions throw try catch +syn keyword squirrelStructure class function extends constructor +syn keyword squirrelBoolean true false +syn keyword squirrelRepeat foreach + +syn region squirrelMultiString start='@"' end='"$' end='";$'me=e-1 + +syn match squirrelShComment "^\s*#.*$" + +" Default highlighting +hi def link squirrelAccess squirrelStatement +hi def link squirrelExceptions Exception +hi def link squirrelStatement Statement +hi def link squirrelModifier Type +hi def link squirrelType Type +hi def link squirrelStructure Structure +hi def link squirrelBoolean Boolean +hi def link squirrelMultiString String +hi def link squirrelRepeat cRepeat +hi def link squirrelShComment Comment + +let b:current_syntax = "squirrel" + +" vim: ts=8 diff --git a/runtime/syntax/vb.vim b/runtime/syntax/vb.vim index 8ddb1efac3..607f6130ba 100644 --- a/runtime/syntax/vb.vim +++ b/runtime/syntax/vb.vim @@ -1,9 +1,11 @@ " Vim syntax file -" Language: Visual Basic -" Maintainer: Tim Chase -" Former Maintainer: Robert M. Cortopassi -" (tried multiple times to contact, but email bounced) +" Language: Visual Basic +" Maintainer: Doug Kearns +" Former Maintainer: Tim Chase +" Former Maintainer: Robert M. Cortopassi +" (tried multiple times to contact, but email bounced) " Last Change: +" 2021 Nov 26 Incorporated additions from Doug Kearns " 2005 May 25 Synched with work by Thomas Barthel " 2004 May 30 Added a few keywords @@ -13,7 +15,7 @@ " quit when a syntax file was already loaded if exists("b:current_syntax") - finish + finish endif " VB is case insensitive @@ -233,7 +235,7 @@ syn keyword vbKeyword Public PublicNotCreateable OnNewProcessSingleUse syn keyword vbKeyword InSameProcessMultiUse GlobalMultiUse Resume Seek syn keyword vbKeyword Set Static Step String Time WithEvents -syn keyword vbTodo contained TODO +syn keyword vbTodo contained TODO "Datatypes syn keyword vbTypes Boolean Byte Currency Date Decimal Double Empty @@ -319,46 +321,54 @@ syn match vbNumber "\<\d\+\>" syn match vbNumber "\<\d\+\.\d*\>" "floating point number, starting with a dot syn match vbNumber "\.\d\+\>" -"syn match vbNumber "{[[:xdigit:]-]\+}\|&[hH][[:xdigit:]]\+&" -"syn match vbNumber ":[[:xdigit:]]\+" -"syn match vbNumber "[-+]\=\<\d\+\>" -syn match vbFloat "[-+]\=\<\d\+[eE][\-+]\=\d\+" -syn match vbFloat "[-+]\=\<\d\+\.\d*\([eE][\-+]\=\d\+\)\=" -syn match vbFloat "[-+]\=\<\.\d\+\([eE][\-+]\=\d\+\)\=" +"syn match vbNumber "{[[:xdigit:]-]\+}\|&[hH][[:xdigit:]]\+&" +"syn match vbNumber ":[[:xdigit:]]\+" +"syn match vbNumber "[-+]\=\<\d\+\>" +syn match vbFloat "[-+]\=\<\d\+[eE][\-+]\=\d\+" +syn match vbFloat "[-+]\=\<\d\+\.\d*\([eE][\-+]\=\d\+\)\=" +syn match vbFloat "[-+]\=\<\.\d\+\([eE][\-+]\=\d\+\)\=" -" String and Character contstants +" String and Character constants syn region vbString start=+"+ end=+"\|$+ syn region vbComment start="\(^\|\s\)REM\s" end="$" contains=vbTodo syn region vbComment start="\(^\|\s\)\'" end="$" contains=vbTodo -syn match vbLineNumber "^\d\+\(\s\|$\)" -syn match vbTypeSpecifier "[a-zA-Z0-9][\$%&!#]"ms=s+1 +syn match vbLineLabel "^\h\w\+:" +syn match vbLineNumber "^\d\+\(:\|\s\|$\)" +syn match vbTypeSpecifier "\<\a\w*[@\$%&!#]"ms=s+1 syn match vbTypeSpecifier "#[a-zA-Z0-9]"me=e-1 +" Conditional Compilation +syn match vbPreProc "^#const\>" +syn region vbPreProc matchgroup=PreProc start="^#if\>" end="\" transparent contains=TOP +syn region vbPreProc matchgroup=PreProc start="^#elseif\>" end="\" transparent contains=TOP +syn match vbPreProc "^#else\>" +syn match vbPreProc "^#end\s*if\>" " Define the default highlighting. " Only when an item doesn't have highlighting yet -hi def link vbBoolean Boolean -hi def link vbLineNumber Comment -hi def link vbComment Comment -hi def link vbConditional Conditional -hi def link vbConst Constant -hi def link vbDefine Constant -hi def link vbError Error -hi def link vbFunction Identifier -hi def link vbIdentifier Identifier -hi def link vbNumber Number -hi def link vbFloat Float -hi def link vbMethods PreProc -hi def link vbOperator Operator -hi def link vbRepeat Repeat -hi def link vbString String -hi def link vbStatement Statement -hi def link vbKeyword Statement -hi def link vbEvents Special -hi def link vbTodo Todo -hi def link vbTypes Type -hi def link vbTypeSpecifier Type - +hi def link vbBoolean Boolean +hi def link vbLineNumber Comment +hi def link vbLineLabel Comment +hi def link vbComment Comment +hi def link vbConditional Conditional +hi def link vbConst Constant +hi def link vbDefine Constant +hi def link vbError Error +hi def link vbFunction Identifier +hi def link vbIdentifier Identifier +hi def link vbNumber Number +hi def link vbFloat Float +hi def link vbMethods PreProc +hi def link vbOperator Operator +hi def link vbRepeat Repeat +hi def link vbString String +hi def link vbStatement Statement +hi def link vbKeyword Statement +hi def link vbEvents Special +hi def link vbTodo Todo +hi def link vbTypes Type +hi def link vbTypeSpecifier Type +hi def link vbPreProc PreProc let b:current_syntax = "vb" diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index ab948d90ac..40e131ef97 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 -" Last Change: Nov 25, 2021 -" Version: 8.2-17 +" Last Change: December 02, 2021 +" Version: 8.2-18 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM " Automatically generated keyword lists: {{{1 @@ -73,7 +73,7 @@ syn keyword vimAutoEvent contained BufCreate BufEnter BufFilePre BufLeave BufNew syn keyword vimGroup contained Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo " Default highlighting groups {{{2 -syn keyword vimHLGroup contained ColorColumn Cursor CursorColumn CursorIM CursorLine CursorLineNr DiffAdd DiffChange DiffDelete DiffText Directory EndOfBuffer ErrorMsg FoldColumn Folded IncSearch LineNr LineNrAbove LineNrBelow MatchParen Menu ModeMsg MoreMsg NonText Normal Pmenu PmenuSbar PmenuSel PmenuThumb Question QuickFixLine Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC StatusLineTerm TabLine TabLineFill TabLineSel Terminal Title Tooltip VertSplit Visual VisualNOS WarningMsg WildMenu +syn keyword vimHLGroup contained ColorColumn Cursor CursorColumn CursorIM CursorLine CursorLineFold CursorLineNr CursorLineSign DiffAdd DiffChange DiffDelete DiffText Directory EndOfBuffer ErrorMsg FoldColumn Folded IncSearch LineNr LineNrAbove LineNrBelow MatchParen Menu ModeMsg MoreMsg NonText Normal Pmenu PmenuSbar PmenuSel PmenuThumb Question QuickFixLine Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC StatusLineTerm TabLine TabLineFill TabLineSel Terminal Title Tooltip VertSplit Visual VisualNOS WarningMsg WildMenu syn match vimHLGroup contained "Conceal" syn case match diff --git a/runtime/tools/demoserver.py b/runtime/tools/demoserver.py index 00fe8bfbca..150ddbee7c 100644 --- a/runtime/tools/demoserver.py +++ b/runtime/tools/demoserver.py @@ -62,9 +62,16 @@ class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler): if decoded[0] >= 0: if decoded[1] == 'hello!': response = "got it" + id = decoded[0] + elif decoded[1] == 'hello channel!': + response = "got that" + # response is not to a specific message callback but to the + # channel callback, need to use ID zero + id = 0 else: response = "what?" - encoded = json.dumps([decoded[0], response]) + id = decoded[0] + encoded = json.dumps([id, response]) print("sending {0}".format(encoded)) self.request.sendall(encoded.encode('utf-8')) thesocket = None diff --git a/src/xdiff/README.txt b/src/xdiff/README.txt index 95b2242b87..9e01a3c679 100644 --- a/src/xdiff/README.txt +++ b/src/xdiff/README.txt @@ -13,4 +13,7 @@ COPYING file. Changes in these files were made to avoid compiler warnings. +The /* */ comments are kept to make syncing to a newer version easier, do not +change them to // comments! + The first work for including xdiff in Vim was done by Christian Brabandt. -- cgit v1.2.3