- Match Conceal, ComplMatchIns, MsgArea, Terminal, and User[1-9]
highlight groups.
- Generate the vimGroup syntax group from runtime/syncolor.vim.
- Match :SynColor and :SynLink as special user commands.
fixes#17467closes: #17556
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Generate Ex command modifiers from the modifier table in src/ex_docmd.c
closes: #17564
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Set minlines and maxlines to 100 and 200 respectively. Set these after
the script interface syntax files have been loaded to ensure the values
set in those are overridden.
fixes#17580closes: #17614
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: missing Wayland clipboard support
Solution: make it work (Foxe Chen)
fixes: #5157closes: #17097
Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
The unamed register may be referenced as both @" and @@.
Remove the unused vimPlainRegister syntax group.
fixes: #17603.
closes: #17605
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Don't match the OR operator in expressions as a trailing bar.
closes: #17533
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Remove unmatchable :normal {mark,register} matches. The arg to :normal
is now handled separately and contained marks and registers are no
longer matched.
closes: #17571
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
The required space in Vim9 continuation comments (#\ comment) was
accidentally removed in commit 6acca4b as trailing whitespace.
closes: #17573
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
There is no pattern after the user event name. The user event name is
the pattern.
closes: #17568
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
closes: #17525
Signed-off-by: Yuqian Yang <crupest@crupest.life>
Signed-off-by: James McCoy <jamessan@debian.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- Fix highlighting of function names including /fu\%[nction]/ (E.g.,
s:func(), foo.fu(), fu.func())
- Match :delfunction argument.
Reported by Aliaksei Budavei.
closes: #17428
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Limit heredoc matches to assignment statements. Matching these at the
top level is very slow.
closes: #17473
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
The opening curly brace must be followed by whitespace, comment or
trailing bar.
closes: #17454
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Complement the documented support for the recognition of all
public types of the "java.lang" package (":help java.vim").
(The original syntax item generator may have, inadvertently,
contributed via suppressing "NullPointerException"s to not
having annotation and interface types qualify in general.)
Also, re-link usage instructions for the alternative syntax
item generator to a rolling "master"'s version.
closes: #17419
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Match full :profile and :profdel commands.
closes: #17420
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- Match full :mark and :k commands.
- Match 2 and 3 letter :s repeat commands.
- Match :s [count] argument.
closes: #17408
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
And generalise the sourcing of "javaid.vim" for Java
buffers.
Resolves zzzyxwvut/java-vim#10.
closes: #17411
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- Match comments and trailing bar after :set without args.
- Match the <...> form for key code options.
- Remove orphaned vim_ex_python[3x]* dump files (Aliaksei Budavei).
closes: #17397
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
We shouldn't assume that the luaParenError syntax group is present in
the, possibly custom, included file or that it hasn't already been
removed. However, issue #11277 has been fixed so it no longer needs to
be cleared.
Fixes comment https://github.com/vim/vim/pull/15375#issuecomment-2899791944
related: #15375closes: #17357
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- Fixed syntax highlighting for ksh93 namespace variables starting
with '${.'
- Added support for the alarm, eloop, fds, mkservice, pids, poll and
sha2sum builtins (which are indeed ksh93 builtins, albeit whether or
not they are available depends on the ksh release and the compiled
SHOPT options).
- Added support for the many Unix commands provided by ksh93's libcmd
as builtin commands (since these are general commands, scripts for
other shells like bash will also highlight these).
- The dumps for the sh_0{2,5,6,8,9}.sh were recreated due to this
change affecting commands those scripts call (e.g. 'wc').
- Enabled ${parameter/pattern/string} and friends for ksh syntax.
- Enabled case modification for ksh. See also:
https://github.com/ksh93/ksh/commit/c1762e03
- Enabled ;;& support for ksh. See also:
https://github.com/ksh93/ksh/commit/fc89d20a
- Added many special ksh variables using 93u+m's data/variables.c
as a reference.
If vim can't figure out which ksh release is in play using e.g.
the hashbang path, in such a case a generic default that enables
everything and the kitchen sink will be used. Otherwise, features will
be disabled if it's absolutely known a certain feature will not be
present. Examples:
- ERRNO is ksh88 specific, so that is locked to ksh88.
- Only 93u+m (assumed for generic) has SRANDOM, and only 93u+m
and 93v- have case modification support.
- 93u+ and 93v- have VPATH and CSWIDTH variables (the latter
is vestigal, but still present in the hardcoded variable table).
- 93v- and ksh2020 have (buggy and near unusable) implementations
of compgen and complete.
- Only mksh provides function substitutions, i.e. ${|command;}.
This took the better part of my day to implement. It seems to work well
enough though. (Also had to regenerate the dumps again while testing
it, as now there are dup scripts with mere hashbang differences, used
solely for testing syntax highlighting differences.)
closes: #17348
Signed-off-by: Johnothan King <johnothanking@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- Match "autoload" as a keyword in :import commands.
- Match an expression argument for the filename.
closes: #15375
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- Normalise interface heredoc highlighting with that used for
:let-heredocs.
- Remove interface feature testing. The Lua and Python interface
command scripts are now highlighted by default. Loading all syntax
files incurs an undesirable load-time burden so highlighting of the
less popular MzScheme, Perl, Ruby and Tcl interfaces is disabled by
default. g:vimsyn_embed can still be used to customise the supported
interfaces.
- Always highlight interface ex-commands as valid commands, even when
the corresponding command-script highlighting is disabled.
- Highlight simple command-script statements as well as heredocs.
- Remove error highlighting of heredoc and statement command-script
regions when an interface is disabled. These are now highlighted as
plain text.
- Allow indented heredoc end tokens when "trim" is specified.
- Match interface heredocs in :def functions.
- Fix runaway vimEmbedError regions. These regions have been removed.
- Use python2 syntax for :python, and :pythonx when 'pyxversion' is
appropriately set.
closes: #15522
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim does not have a tabpanel
Solution: include the tabpanel feature
(Naruhiko Nishino, thinca)
closes: #17263
Co-authored-by: thinca <thinca@gmail.com>
Signed-off-by: Naruhiko Nishino <naru123456789@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Tag folding poses a few difficulties. Many elements, e.g.
"blockquote", are always delimited by start and end tags;
end tags for some elements, e.g. "p", can be omitted in
certain contexts; void elements, e.g. "hr", have no end tag.
Although the rules for supporting omissible end tags are
ad-hoc and involved, they apply to elements in scope.
Assuming syntactical wellformedness, an end tag can be
associated with its nearest matching start tag discoverable
in scope and towards the beginning of a file, whereas all
unbalanced tags and inlined tags can be disregarded.
For example:
------------------------------------------------------------
<!DOCTYPE html>
<html lang="en"> <!-- >1 : 1 -->
<body> <!-- >2 : 2 -->
<p>Paragraph #1. <!-- = : 2 -->
<p> <!-- >3 : 3 -->
Paragraph #2. <!-- = : 3 -->
</p> <!-- <3 : 3 -->
<p>Paragraph #3.</p> <!-- = : 2 -->
</body> <!-- <2 : 2 -->
</html> <!-- <1 : 1 -->
------------------------------------------------------------
(HTML comments here, "<!-- ... -->", record two values for
each folded line that are separated by ":", a value obtained
from "&foldexpr" and a value obtained from "foldlevel()".)
Innermost foldedable tags will be flattened. For example:
------------------------------------------------------------
<!DOCTYPE html>
<html lang="en"> <!-- >1 : 1 -->
<body> <!-- >2 : 2 -->
<div class="block"> <!-- >3 : 3 -->
<pre><code> <!-- >4 : 4 -->
[CODE SNIPPET] <!-- = : 4 -->
</code></pre> <!-- <4 : 4 -->
</div> <!-- <3 : 3 -->
</body> <!-- <2 : 2 -->
</html> <!-- <1 : 1 -->
------------------------------------------------------------
No folding will be requested for the "<code>"-"</code>" tag
pair and reflected by "&foldexpr" because such a fold would
have claimed the same lines that the immediate fold of the
"<pre>"-"</pre>" tag already claims.
Run-on folded tags may confuse Vim. When a file such as:
------------------------------------------------------------
<!DOCTYPE html>
<html lang="en"> <!-- >1 : 1 -->
<body> <!-- >2 : 2 -->
<div class="block"> <!-- >3 : 3 -->
<pre> <!-- >4 : 4 -->
<code> <!-- >5 : 5 -->
[CODE SNIPPET #1] <!-- = : 5 -->
</code> <!-- <5 : 5 -->
</pre> <!-- <4 : 4 -->
</div> <!-- <3 : 3 -->
<!-- = : 3 -->
<div class="block"> <!-- >3 : 3 -->
<pre> <!-- >4 : 4 -->
<code> <!-- >5 : 5 -->
[CODE SNIPPET #2] <!-- = : 5 -->
</code> <!-- <5 : 5 -->
</pre> <!-- <4 : 4 -->
</div> <!-- <3 : 3 -->
</body> <!-- <2 : 2 -->
</html> <!-- <1 : 1 -->
------------------------------------------------------------
is reformatted as follows:
------------------------------------------------------------
<!DOCTYPE html>
<html lang="en"> <!-- >1 : 1 -->
<body> <!-- >2 : 2 -->
<div class="block"> <!-- >3 : 3 -->
<pre> <!-- >4 : 4 -->
<code> <!-- >5 : 5 -->
[CODE SNIPPET #1] <!-- = : 5 -->
</code> <!-- <5 : 5 -->
</pre> <!-- <4 : 4 -->
</div><div class="block"><pre><code> <!-- <3 : 3 -->
[CODE SNIPPET #2] <!-- = : 2 ? -->
</code> <!-- <5 : 2 ? -->
</pre> <!-- <4 : 2 ? -->
</div> <!-- <3 : 2 ? -->
</body> <!-- <2 : 2 -->
</html> <!-- <1 : 1 -->
------------------------------------------------------------
"&foldexpr" values will not be used as is for the lines
between (and including) "[CODE SNIPPET #2]" and "</div>".
(Cf. v9.1.0002.)
Having syntax highlighting in effect, tag folding using the
"fold-expr" method can be enabled with:
------------------------------------------------------------
let g:html_expr_folding = 1
------------------------------------------------------------
By default, tag folding will be redone from scratch after
each occurrence of a TextChanged or an InsertLeave event.
Such frequency may not be desired, especially for large
files, and this recomputation can be disabled with:
------------------------------------------------------------
let g:html_expr_folding_without_recomputation = 1
doautocmd FileType
------------------------------------------------------------
To force another recomputation, do:
------------------------------------------------------------
unlet! b:foldsmap
normal zx
------------------------------------------------------------
References:
https://web.archive.org/web/20250328105626/https://html.spec.whatwg.org/multipage/syntax.html#optional-tagshttps://en.wikipedia.org/wiki/Dangling_elsecloses: #17141
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- Default to POSIX supported classes.
- Add a KornShell specific class list.
- Remove "or" from the Bash class list, presumably a typo.
closes: #17293
Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Sets 'syn iskeyword' in syntax/lf.vim to fix the missing lf keyword
highlighting in lines like 'map e :open; open' (first 'open' not
highlighted).
applies PR andis-sprinkis/lf-vim#21 by @joelim-work
closes: andis-sprinkis/lf-vim#14
Co-authored-by: Joe Lim <50560759+joelim-work@users.noreply.github.com>
Signed-off-by: Andis Spriņķis <andis@sprinkis.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Ignore single-quoted backslash escape sequences in parameter expansions.
\' is not an escaped single quote in ${foo:-'word\'}.
closes: #17261
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: filetype: GNU Radio config files are not recognized.
Solution: detect GNU Radio config files as confini filetype. Only
allow '#' as start of comment in confini syntax (zeertzjq).
Ref:
- https://wiki.gnuradio.org/index.php/Configuration_Filescloses: #17242
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>