1
0
forked from aniani/vim

275 Commits

Author SHA1 Message Date
Yegappan Lakshmanan
038be2701d
patch 9.1.1239: if_python: no tuple data type support
Problem:  if_python: no tuple data type support (after v9.1.1232)
Solution: Add support for using Vim tuple in the python interface
          (Yegappan Lakshmanan)

closes: #16964

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-26 18:46:21 +01:00
Doug Kearns
adb703e1b9
runtime(vim): Update base-syntax, match protected constructors
Support for protected constructors was added in commit 7e89800.

closes: 16618

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-23 16:14:20 +01:00
64-bitman
e08f10a55c
patch 9.1.1224: cannot :put while keeping indent
Problem:  cannot :put while keeping indent (Peter Aronoff)
Solution: add the :iput ex command (64-bitman)

fixes: #16225
closes: #16886

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: 64-bitman <60551350+64-bitman@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-18 22:14:34 +01:00
Doug Kearns
dd3f1c0dda
runtime(vim): Update base-syntax, match multiline return types
fixes #14442.
closes: #16914

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-17 20:27:13 +01:00
Christian Brabandt
762a79e15c
patch 9.1.1215: Patch 9.1.1213 has some issues
Problem:  Patch 9.1.1213 has some issues
Solution: revert it for now

This reverts commit 250739d442b51ba76589d6eb67672d95645527ec.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-16 21:39:58 +01:00
64-bitman
250739d442
patch 9.1.1213: cannot :put while keeping indent
Problem:  cannot :put while keeping indent
          (Peter Aronoff)
Solution: add the :iput ex command (64-bitman)

fixes: #16225
closes: #16886

Signed-off-by: 64-bitman <60551350+64-bitman@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-16 21:15:11 +01:00
Doug Kearns
b55f0221cc
runtime(vim): Sync syntax generator base file with output file.
Synchronisation was lost in commit 0fab891 and the error propagated to
the output file in commit 5606ca5.

closes: #16889

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-15 09:30:00 +01:00
Jim Zhou
5606ca5349
patch 9.1.1202: Missing TabClosedPre autocommand
Problem:  Missing TabClosedPre autocommand
          (zoumi)
Solution: Add the TabClosedPre autcommand (Jim Zhou).

fixes: #16518
closes: #16855

Signed-off-by: Jim Zhou <jimzhouzzy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-13 21:58:25 +01:00
Doug Kearns
0fab89117f
runtime(vim): Update base-syntax, improve :syntax highlighting
- Highlight missing :syntax subcommands.
- Don't highlight user specified syntax group names.

closes: #16847

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-10 21:04:53 +01:00
Doug Kearns
3dca512939
runtime(vim): Update base-syntax and generator, only match valid predefined variables
- Only match valid predefined and option variables.
- Match scope dictionaries.
- Highlight scope prefixed variables as a scope dictionary accessor. The
  vimVarScope syntax group can be linked to vimVar to disable this.
- Include support for Neovim-only predefined and option variables.

Temporary collateral damage - scope dictionaries match instead of keys
in dictionary literals.

closes: #16727

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-09 16:30:28 +01:00
Doug Kearns
6bdfeb099a
runtime(vim): Update base-syntax, bug fixes
- Allow trailing backslashes in option values.
- Match :map-special modifier.
- Match :map-arguments case-sensitively.
- Remove <*Leader> from map modifier list and allow in RHS of a mapping.

closes: #16822

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-07 18:49:11 +01:00
glepnir
f31cfa29bf
patch 9.1.1178: not possible to generate completion candidates using fuzzy matching
Problem:  not possible to generate completion candidates using fuzzy
          matching
Solution: add the 'completefuzzycollect' option for (some) ins-completion
          modes (glepnir)

fixes #15296
fixes #15295
fixes #15294
closes: #16032

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-06 21:59:13 +01:00
Doug Kearns
60bd140256
runtime(vim): Update base-syntax, match Vim9 function calls after "|"
Match Vim9 function calls after ex-bar.  These are also currently
matched but invalid syntax for legacy script.

fixes: #16721
closes: #16747

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-27 19:15:20 +01:00
Doug Kearns
025dc48e88
runtime(vim): Update base-syntax, match :CompilerSet and :SynMenu commands
closes: #16713

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-23 15:48:52 +01:00
Doug Kearns
68ba6c2c6c
runtime(vim): Update base-syntax, improve performance
Contain the vimNotation syntax group, matching this at top level is
unnecessary and very slow.

The removed vimString and vimNumber definitions are broken and/or never
match. They have long been replaced by newer definitions.

closes: #16645

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-16 16:40:12 +01:00
Doug Kearns
4f010c90bd
runtime(vim): Update base-syntax, always match continuation comments to EOL
closes: #16630

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-13 20:24:42 +01:00
Doug Kearns
a9c06429ac
runtime(vim): Update base-syntax, match Vim9 boolean and null literals in parens
- Match Vim9 boolean and null literals in parenthesised expressions and
  function argument lists.
- Match read-only registers in expressions.

closes: #16622

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-12 20:44:17 +01:00
Doug Kearns
1aa287e048
runtime(vim): Update base-syntax, improve variable matching
- Match variables after operators, including line continuations.
- Match option variables without leading whitespace.
- Explicitly match expression subscripts.
- Match Vim9 variables in LHS of assignments and method calls.
- Match option variables (&option) with a dedicated syntax group like
  environment variables.
- Match list literals, fixes: #5830
- Match :{un}lockvar arguments.
- Match registers and environment variables in :let unpack lists.
- Match lambda expressions
- Match Vim9 scope blocks
- Match variables in :for subject
- Highlight user variables with Normal
- Improve this/super keyword matching, fixes: #15970

closes: #16476

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-10 22:00:27 +01:00
Luuk van Baal
b7147f8236
patch 9.1.1084: Unable to persistently ignore events in a window and its buffers
Problem:  Unable to persistently ignore events in a window and its buffers.
Solution: Add 'eventignorewin' option to ignore events in a window and buffer
          (Luuk van Baal)

Add the window-local 'eventignorewin' option that is analogous to
'eventignore', but applies to a certain window and its buffers. Identify
events that should be allowed in 'eventignorewin', adapt "auto_event"
and "event_tab" to encode this information. Window context is not passed
onto apply_autocmds_group(), and when to ignore an event is a bit
ambiguous when "buf" is not "curbuf", rather than a large refactor, only
ignore an event when all windows into "buf" are ignoring the event.

closes: #16530

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-08 18:52:39 +01:00
Doug Kearns
4a530a632b
runtime(vim): Update base-syntax, match :debuggreedy count prefix
Match :0debuggreedy as a special case until better range/count support
is implemented.

closes: #16572

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-03 18:59:09 +01:00
Doug Kearns
c273f1ac77
runtime(vim): Update base-syntax, match ternary and falsy operators
fixes: #14423
fixes: #16227
closes: #16484

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-20 21:53:01 +01:00
Doug Kearns
8dec6c2e6c
runtime(vim): Update base-syntax, fix is/isnot operator matching
- Match is? and isnot? operators.
- Limit other comparison operators to one match modifier rather than
  two.

closes: #16482

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-19 14:02:06 +01:00
Doug Kearns
695522dea3
runtime(vim): Update base-syntax, highlight literal string quote escape
Match the '' escape sequence in literal strings.  These were previously
ending the current string and starting another concatenated literal
string.

closes: #16415

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
2025-01-10 20:02:17 +01:00
Doug Kearns
1718e7d07e
runtime(vim): Update base-syntax, improve ex-bang matching
Always match ex-bang explicitly rather than incidentally as the ! operator.

fixes: #16221
closes: #16410

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-08 18:20:47 +01:00
h-east
6139766e82
runtime(vim): fix failing vim syntax test
after v9.1.0985

related: #16356

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-03 17:32:54 +01:00
h-east
aa979c763d
patch 9.1.0985: Vim9: some ex commands can be shortened
Problem:  Vim9: some ex commands can be shortened
Solution: disallow shortening of :abstract, :interface and :type
          (h-east)

closes: #16356

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-03 10:19:45 +01:00
h-east
f27e80a6e1
runtime(vim): update vim generator syntax script
* include the base64* functions
* allow to shorten finally

closes: #16346

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-30 15:40:24 +01:00
h-east
f0ab3e4e41
runtime(vim): Improve syntax script generator for Vim Script
closes: #16331

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-29 15:14:37 +01:00
Doug Kearns
9b67a2e1dd
runtime(vim): Update base-syntax, allow parens in default arguments
Allow parentheses in default arguments specified in :def and :function
definitions.

fixes #16243
closes: #16269

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-26 10:13:45 +01:00
Christian Brabandt
21c37d7f69
runtime(vim): update base-syntax after v9.1.0936
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-17 21:01:24 +01:00
Yinzuo Jiang
a2a2fe841e
patch 9.1.0934: hard to view an existing buffer in the preview window
Problem:  hard to view an existing buffer in the preview window
Solution: add the :pbuffer command (Yinzuo Jiang)

Similar as `:pedit` and `:buffer` command. `:pbuffer` edits buffer [N]
from the buffer list in the preview window.

`:pbuffer` can also open special buffer, for example terminal buffer.

closes: #16222

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-16 21:22:09 +01:00
Doug Kearns
bbe5252c2c
runtime(vim): Update base-syntax, improve :normal highlighting
Fix command name termination, match bang, and allow a line-continued
argument.

closes: #15358

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-09 19:11:25 +01:00
Ruslan Russkikh
0407d621bb
patch 9.1.0770: current command line completion is a bit limited
Problem:  current command completion is a bit limited
Solution: Add the shellcmdline completion type and getmdcomplpat()
          function (Ruslan Russkikh).

closes: #15823

Signed-off-by: Ruslan Russkikh <dvrussk@yandex.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-08 22:24:04 +02:00
Doug Kearns
818c641b6f
runtime(vim): Update base-syntax file, improve class, enum and interface highlighting
- Enable folding of class, enum and interface declarations.
- Highlight constructor names with the Function highlight group, like
  other special methods.
- Mark function definitions using special method names as errors.
- Highlight :type arguments.

fixes: #14393#issuecomment-2042796198.
closes: #13810

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-06 17:00:48 +02:00
Doug Kearns
35699f1749
runtime(vim): Update base-syntax, improve folding function matches
- Allow function command modifiers.
- Match function bodies starting with empty lines.

Command modifiers reported by @Konfekt.

fixes #15671
closes: #15674

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-19 19:51:59 +02:00
Doug Kearns
4d427d4cab
runtime(vim): Update base-syntax, match Vim9 bool/null literal args to :if/:while/:return
Match Vim9 boolean and null literals in expression arguments of :if,
:elseif, :while and :return.

closes: #15684

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-15 19:21:18 +02:00
Doug Kearns
3c07eb0c67
runtime(vim): Update syntax, improve user-command matching
- Match -addr and -keepscript attributes and generate -addr values.
- Match attribute errors where = is specified.
- Highlight attributes with Special like other Ex command options.
- Don't highlight user-specified completion function args.
- Match :delcommand -buffer attribute.

closes: #15586

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-02 10:03:37 +02:00
Doug Kearns
d817609b87
runtime(vim): Update base-syntax, match bracket mark ranges
Match '(,'),'[,'],'{, and '} marks in Ex command ranges.

Thanks to Maxim Kim.

Fixes #15332.
Closes #15337.

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-31 16:57:32 +02:00
Doug Kearns
7866d54ecc
runtime(vim): Update base-syntax, match :loadkeymap after colon and bar
Match :loadkeymap after Ex colons and bars.

Don't generate :loadkeymap as it is matched with a custom syntax group.

closes: #15554

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-23 18:37:55 +02:00
Doug Kearns
7884cc7418
runtime(vim): Update base-syntax, improve :let-heredoc highlighting
The end marker is not required to match the indent of :let when "trim"
is specified, it may also appear without leading whitespace as normal.

closes: #15564

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-23 18:01:35 +02:00
Ken Takata
95e90781a4
runtime(vim): Improve heredoc handling for all embedded scripts
* Improve heredoc handling
  - Support "trim" for all the embedded scripts.
  - Check the indent of "trim" for "let" and all the embedded scripts.
* Update missing part of vim.vim.base in the commit
  d164f2a521f8e52e587727657fb1c19e9a25f32a.
* Update gen_syntax_vim.vim to catch up with 9.1.0685's source code.

closes: #15542

Signed-off-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-22 21:29:39 +02:00
Doug Kearns
d164f2a521
runtime(vim): Update base-syntax, improve :let-heredoc highlighting
The end marker must appear on line of its own without any trailing
whitespace.

Whitespace is incorrectly allowed before all end markers.  Limiting this
only to heredocs where "trim" was specified, and with the correct
indent, is currently an intractable problem given that contained syntax
groups (in this case :let) cannot be limited to start patterns.

Highlight interpolated expressions when "eval" is specified.

cloess: #15511

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-16 21:07:15 +02:00
Doug Kearns
ddbb6fe2d0
runtime(vim): Update base-syntax, improve :set highlighting
- Match bang, "all" and "termcap" options, and trailing command
  separator "|".
- Highlight set assignment operators.
- Match multiline :set and multiline option values.
- Mention the newer "0o" octal prefix at :help :set=.

closes: #15329

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-24 20:21:22 +02:00
Doug Kearns
99984fc58a
runtime(vim): Update base-syntax, improve :map highlighting
Match :map ( RHS properly.

Only match ! after :map, :noremap, :unmap and :mapclear.

closes: #15297

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-18 20:45:19 +02:00
Doug Kearns
d65e58f6f9
runtime(vim): Update base-syntax, match types in Vim9 variable declarations
Match types in Vim9 variable declarations.

Match Vim9 boolean and null literals. These are not matched in all
contexts yet.

related: #15277

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-17 19:34:14 +02:00
LemonBoy
5247b0b92e
patch 9.1.0572: cannot specify tab page closing behaviour
Problem:  cannot specify tab page closing behaviour
          (Gianluca Pacchiella)
Solution: Add the 'tabclose' option (LemonBoy).

fixes: #5967
closes: #15204

Signed-off-by: LemonBoy <thatlemon@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-12 19:36:53 +02:00
LemonBoy
a20bf69a3b
patch 9.1.0568: Cannot expand paths from 'cdpath' setting
Problem:  Cannot expand paths from 'cdpath' setting
          (Daniel Hahler)
Solution: Implement 'cdpath' completion, add the new 'dir_in_path'
          completion type (LemonBoy)

fixes #374
closes: #15205

Signed-off-by: LemonBoy <thatlemon@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-11 22:45:42 +02:00
Ernie Rael
0512425891
patch 9.1.0564: id() can be faster
Problem:  id() can be made faster
Solution: don't use printf(), use clever shift of pointer
          (Ernie Rael)

closes: #15207

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-11 22:16:28 +02:00
Doug Kearns
e85fdc730e
runtime(vim): Update base-syntax, improve :match command highlighting
Match group and pattern arguments to :match commands.

closes: #15096

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 20:45:37 +02:00
Doug Kearns
fc64ac0be2
runtime(vim): Update base-syntax, fix function tail comments
Match Vim9-script comments after :def and :enddef and legacy-script
comments after :func and :endfunc, in any definition context.

Highlight incorrect comment types after these commands as errors.

fixes: #15062
closes: #15072

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-22 11:20:36 +02:00