Compare commits

...

375 Commits

Author SHA1 Message Date
Christian Brabandt
f1a9449206 patch 9.2.0403: Vim9: def function sandbox bypass
Problem:  Vim9: def function sandbox bypass
          (Srinivas Piskala Ganesh Babu)
Solution: Check for sandbox flag in call_user_func() and call_dfunc()
          when executing Vim9 script functions

closes: #20071

Supported by AI

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-27 18:14:49 +00:00
Yasuhiro Matsumoto
7070a85d94 patch 9.2.0402: pum: opacity not applied to wildmenu pum
Problem:  pum: opacity not applied to wildmenu pum
Solution: Call pum_call_update_screen() in cmdline_pum_display() when
          opacity is set, fix flicker by checking against expected row
          (Yasuhiro Matsumoto).

closes: #20072

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-27 18:05:12 +00:00
Christian Brabandt
0bc64b19a2 patch 9.2.0401: tests: still a few flaky tests
Problem:  tests: still a few flaky tests
Solution: Add WaitForAssert to test_messages.vim, use a smaller terminal
          window for test_tabpanel, add TermWait() in test_messages
          to handle DECQRM messages.

closes: #20074

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-27 18:00:14 +00:00
Barrett Ruth
dd9b31fb62 patch 9.2.0400: sandbox callbacks selected through 'complete'
Problem:  Modeline-tainted 'complete' values can invoke completion
          callbacks outside the sandbox.
Solution: Enter the sandbox for both 'complete' callback phases and add
          a regression test (Barrett Ruth)

closes: #20078

Signed-off-by: Barrett Ruth <br.barrettruth@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-27 17:18:17 +00:00
Yasuhiro Matsumoto
a622dda915 patch 9.2.0399: MS-Windows: compile warning in strptime.c
Problem:  MS-Windows: compile warning in strptime.c
          (John Marriott, after v9.2.0398)
Solution: Fix the compile warning (Yasuhiro Matsumoto).

Use _get_tzname() instead of the deprecated tzname[] global on UCRT and
MSVC builds; older MinGW (msvcrt.dll) keeps using tzname[] as a
fallback.

related: #20054
closes:  #20079

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-27 17:10:25 +00:00
Christian Brabandt
96be27309c runtime(doc): fix :z command description again
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-27 17:06:47 +00:00
Yasuhiro Matsumoto
036e40e6d8 patch 9.2.0398: MS-Windows: missing strptime() support
Problem:  MS-Windows: missing strptime() support
Solution: Port NetBSD's strptime fallback to Vim
          (Yasuhiro Matsumoto).

The MSVC and MinGW C runtimes do not provide strptime(), so the
strptime() builtin was unavailable on Windows.  Port NetBSD's
lib/libc/time/strptime.c (rev 1.67) and compile it into the Windows
builds.  The BSD 2-clause notice from the original is preserved in the
file.  Windows-specific adjustments: English-only locale tables, the
fromzone()/tzalloc() path is stubbed out (no IANA tzfile loader on
Windows), and tm_gmtoff / tm_zone stores are elided.

Also call tzset() before mktime() in f_strptime() so changes to \$TZ
are honored.

Skip the POSIX DST TZ assertion in Test_strptime() on MS-Windows since
the CRT tzset() does not parse POSIX TZ strings with DST rules.

closes: #20054

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-26 17:31:41 +00:00
Yasuhiro Matsumoto
22aedc4a90 patch 9.2.0397: tabpanel: double-click opens a new tab
Problem:  tabpanel: double-click opens a new tab page
Solution: Do not create a new tab page when using a double click
          (Yasuhiro Matsumoto).

The tabpanel click handler inherited the tabline behavior where a
double-click opens a new, empty tab page.  Unlike the tabline, the
tabpanel has no "empty area": every row maps to some tab, so this
fires on any double-click in the tabpanel and can generate stray
empty tabs.  The behavior is also not documented for the tabpanel.

Skip the new-tab branch when the click originated in the tabpanel
and fall through to the regular tab-switch path instead.  The
tabline behavior is unchanged.

closes: #20044

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-26 16:53:58 +00:00
Doug Kearns
076366bd4e runtime(javascript): Fix regex highlighting after (
- Fix regex highlighting after opening parens, javascriptParens was
  matching later.  Fixes issue #20069.
- Add missing regex flags.
- Mark the file as unmaintained.  Thanks Claudio for all your work.

closes: #20076

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-26 14:52:21 +00:00
zeertzjq
c23bfd7922 runtime(help): fix wrong check for existing HelpComplete function
To check for an existing HelpComplete function, exists('*HelpComplete')
should be used, as exists('HelpComplete') still returns 0 after sourcing
the ftplugin.

closes: #20073

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-26 14:36:23 +00:00
Doug Kearns
3cc7d50716 runtime(algol68): Add new syntax file, ftplugin and filetype detection
- Add a syntax file update to Neville Dempsey's long-serving version
- Add a new rudimentary ftplugin
- Add filetype detection

Changes to the syntax file include:
- improved prelude, number and symbol highlighting
- prelude highlighting tests
- updated boiler plate

Note that these runtime files currently target Algol 68 Genie employing
the default UPPER stropping regime.  Support for GNU Algol 68 should
also be usable with the UPPER stropping regime, although somewhat less
complete.  Full support for the SUPPER stropping regime in GNU Algol 68
is also planned.

closes: #19818

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Janis Papanagnou <janis_papanagnou@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-26 14:31:55 +00:00
Doug Kearns
1ce03d674a runtime(dockerfile): Update syntax, fix RUN command highlighting
Allow for docker comments to be interspersed in a multiline (continued)
RUN command argument.

fixes:  #8364
closes: #19829

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-26 14:26:19 +00:00
Yasuhiro Matsumoto
2baef82cd1 patch 9.2.0396: tests: Test_error_callback_terminal is flaky on macOS
Problem:  tests: Test_error_callback_terminal is flaky on macOS
Solution: Use WaitForAssert() to make it more reliable
          (Yasuhiro Matsumoto).

term_wait() only waits for terminal screen updates and does not
guarantee that the err_io 'pipe' callback has fired, so on macOS
the assert_match() against g:error frequently runs before sh has
written "sh: XXXX: not found", causing the test to flake.

Replace term_wait() + assert_match() with WaitForAssert() so each
assertion polls until the callback delivers the expected output.
Also defer sending "exit" until the stderr message has been seen,
to avoid losing the stderr write to the exit race.

closes: #20075

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-26 09:22:38 +00:00
Christian Brabandt
bf6892aaab runtime(doc): Update documentation on :z
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-26 09:18:07 +00:00
Peter Cardenas
0ca1121d1f runtime(help): make help omnifunc global
closes: #20024

Signed-off-by: Peter Cardenas <16930781+PeterCardenas@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-26 08:42:57 +00:00
D. Ben Knoble
8d9c383aaf patch 9.2.0395: tests: Test_backupskip() may read from $HOME
Problem:  tests: Test_backupskip() may read from $HOME
Solution: Set $HOME to an empty value, use --clean
          (D Ben Knoble)

Even though we unset HOME, we can see via scriptnames that user files
are still sourced! One of my installed plugins warns when not compiled
with +python3, so this test has a "press Enter" prompt.

Use `--clean` like most other GetVimProg()'s do to fix it. Some tests
use `system()` instead, but that turns this test into a failure rather
than passing; I'm not sure why other tests don't suffer from this.

To prove to ourselves, we can use code like this:

    diff --git i/src/testdir/test_options.vim w/src/testdir/test_options.vim
    index a408e20e1..044364a54 100644
    --- i/src/testdir/test_options.vim
    +++ w/src/testdir/test_options.vim
    @@ -1179,6 +1179,7 @@ func Test_backupskip()
       " P_NODUP).  Run this in a separate instance and write v:errors in a file,
       " so that we see what happens on startup.
       let after =<< trim [CODE]
    +      call writefile([execute('scriptnames')], 'foo')
           let bsklist = split(&backupskip, ',')
           call assert_equal(uniq(copy(bsklist)), bsklist)
           call writefile(['errors:'] + v:errors, 'Xtestout')
    @@ -1196,7 +1197,7 @@ func Test_backupskip()
       " unset $HOME, so that it won't try to read init files
       let saveenv['HOME'] = getenv("HOME")
       call setenv('HOME', v:null)
    -  exe 'silent !' . cmd
    +  exe 'silent !' . cmd .. ' --cmd "echo &rtp"'
       call assert_equal(['errors:'], readfile('Xtestout'))

       " restore environment variables

Here, that causes "foo" to include a bunch of files under ~/.vim. I'm
not sure why this happens, but lets paper over it for the test.

We can also tell that (orthogonal to --clean) setting HOME='' works too.
Let's do that in addition since unsetting HOME isn't quite enough.

closes: #20051

Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-26 08:33:59 +00:00
Yasuhiro Matsumoto
8f9cde4592 patch 9.2.0394: xxd: offsets greater than LONG_MAX print as negative
Problem:  xxd: offsets greater than LONG_MAX print as negative
Solution: Use "%lu" to print unsigned long value
          (Yasuhiro Matsumoto)

closes: #20055

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-26 08:22:23 +00:00
svardew
807f2cd789 CI: Fix syntax error in lychee URL checker
fixes: #20040

Signed-off-by: svardew <svardew@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-26 08:16:59 +00:00
Christian Brabandt
1de887681d No guidance for AI coding agents
Problem:  No guidance for AI coding agents working in the Vim
          repository.
Solution: Add AGENTS.md to the repository documenting build
          and test commands, repository layout, commit format,
          C and Vim9-script conventions, test conventions, help
          file style, and release policy, so that AI agents can
          produce patches that match project expectations.

closes: #20039

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-26 08:11:59 +00:00
dependabot[bot]
e7eef554f3 CI: Bump the github-actions group across 1 directory with 3 updates
Bumps the github-actions group with 3 updates in the / directory: [msys2/setup-msys2](https://github.com/msys2/setup-msys2), [actions/cache](https://github.com/actions/cache) and [github/codeql-action](https://github.com/github/codeql-action).

Updates `msys2/setup-msys2` from 2.31.0 to 2.31.1
- [Release notes](https://github.com/msys2/setup-msys2/releases)
- [Changelog](https://github.com/msys2/setup-msys2/blob/main/CHANGELOG.md)
- [Commits](https://github.com/msys2/setup-msys2/compare/v2.31.0...v2.31.1)

Updates `actions/cache` from 5.0.4 to 5.0.5
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v5.0.4...v5.0.5)

Updates `github/codeql-action` from 4.35.1 to 4.35.2
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v4.35.1...v4.35.2)

---
updated-dependencies:
- dependency-name: msys2/setup-msys2
  dependency-version: 2.31.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: actions/cache
  dependency-version: 5.0.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: github/codeql-action
  dependency-version: 4.35.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

closes: #20063

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-26 08:05:33 +00:00
Yasuhiro Matsumoto
0c2ac3480a patch 9.2.0393: MS-Windows: link error with XPM support on UCRT64
Problem:  MS-Windows: link error with XPM support on UCRT64
Solution: Make_cyg_ming.mak: allow XPM to point to system layout with
          X11/ headers (Yasuhiro Matsumoto)

When XPM is set to a system prefix such as /msys64/ucrt64 (where xpm.h
lives in include/X11/), the existing -I flags miss the header.  Add
-I $(XPM)/include/X11 so both the bundled layout (xpm/include/xpm.h)
and the system layout (include/X11/xpm.h) work.

closes: #20064

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-26 07:57:14 +00:00
Hirohito Higashi
32a30cb5a0 runtime(doc): Update docs about tabpanel
closes: #20067

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-25 17:56:30 +00:00
Christian Brabandt
1940bcb243 patch 9.2.0392: tests: Some tests are flaky
Problem:  tests: Some tests are flaky and cause CI to fail
Solution: Add WaitForAsserts() calls to reduce flakiness

closes: #20050

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-25 17:50:47 +00:00
Christian Brabandt
5f7c52408f runtime(doc): Update the ga output to match the actual output
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-25 17:46:51 +00:00
Christian Brabandt
10b57290d3 patch 9.2.0391: tests: Comment in test_vim9_cmd breaks syntax highlighting
Problem:  tests: Comment in test_vim9_cmd breaks syntax highlighting
Solution: Move the comment into the function and use the # as comment
          marker instead

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-25 16:49:21 +00:00
Vitaliy Gromov
0f9218851d translation(ru): Fix typo in "може" to "можете" in lang/README.ru.txt
closes: #20047

Signed-off-by: Vitaliy Gromov <101171374+VitaliyGromov@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-23 16:03:31 +00:00
Bruno Belanyi
521eac1877 patch 9.2.0390: filetype: some Beancount files are not recognized
Problem:  filetype: some Beancount files are not recognized
Solution: Detect *.bean files as beancount filetype
          (Bruno Belanyi)

closes: #20037

Signed-off-by: Bruno Belanyi <bruno@belanyi.fr>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-23 15:56:30 +00:00
Hirohito Higashi
44f707da6a patch 9.2.0389: DECRQM still leaves stray "pp" on Apple Terminal.app
Problem:  DECRQM was still sent to Apple Terminal.app before its DA2
          reply was processed, leaving a literal "pp" on screen.
          may_req_decrqm() was called from vim_main2()
          right after may_req_termresponse(), at which point
          term_props[TPR_DECRQM].tpr_status was still TPR_UNKNOWN, so
          the `!= TPR_NO` guard let the request through (after v9.2.0387)
Solution: Send DECRQM from handle_version_response() once
          term_props[TPR_DECRQM].tpr_status == TPR_YES, the same
          pattern already used for t_RS (TPR_CURSOR_STYLE) and t_RC
          (TPR_CURSOR_BLINK), which deliberately wait for the DA2
          reply to avoid the same echo-on-screen issue on Apple
          Terminal.app and Gnome terminal.  Drop the now-unused
          may_req_decrqm() helper and its call site in vim_main2()
          (Hirohito Higashi).

fixes:   #19852
related: #19938
closes:  #20038

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: John Marriott <basilisk@internode.on.net>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-22 20:29:08 +00:00
zeertzjq
f194676c93 patch 9.2.0388: strange indent in update_topline()
Problem:  strange indent in update_topline()
Solution: Fix the indentation (zeertzjq)

closes: #20033

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-22 16:09:06 +00:00
Hirohito Higashi
cee8fd73eb patch 9.2.0387: DECRQM request may leave stray chars in terminal
Problem:  Sending DECRQM from handle_version_response() caused DECRPM
          responses to arrive during user input processing, leaving
          bytes in typebuf when clear_showcmd() ran.  This made
          visual-mode showcmd (e.g. "7" line count after V<C-D><C-D>)
          intermittently disappear, failing many screendump tests on CI.
Solution: Move DECRQM request out of handle_version_response() and send
          it at startup via may_req_decrqm(), following the existing
          may_req_termresponse() and may_req_bg_color() pattern.
          Add TPR_DECRQM property set per terminal from the DA2 reply,
          and route DECRQM sends through a may_req_decrqm() helper using
          the termrequest_T pattern, skipping terminals known to
          mishandle it (Foxe Chen, Hirohito Higashi).

fixes:  #19852
closes: #19938

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Hirohito Higashi <h.east.727@gmail.com>
Co-Authored-By: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-21 21:03:25 +00:00
Yasuhiro Matsumoto
2ea4a7c3b7 patch 9.2.0386: No scroll/scrollbar support in the tabpanel
Problem:  No scroll/scrollbar support in the tabpanel
Solution: Add support for it (Yasuhiro Matsumoto)

closes: #19979

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-21 20:39:22 +00:00
D. Ben Knoble
10040bc9cd runtime(sh): allow "#" in special derefs
Code like ${!#} flags the "#" as shDerefWordError [1]; the "!prefix"
syntax region delegates to one of the shDerefSpecial handlers via
@shDerefList, but it misses the "#" case as valid for ${##} and ${!#}.

[1]: https://vi.stackexchange.com/q/48617/10604

Correct that. Indirection is only valid in Bash in Ksh, so rearrange the
"!" handling to be conditional.

closes: #20016

Helped-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-21 19:59:07 +00:00
zeertzjq
33f3965087 patch 9.2.0385: Integer overflow with "ze" and large 'sidescrolloff'
Problem:  Integer overflow with "ze" and large 'sidescrolloff'.
Solution: Check for overflow to avoid negative w_leftcol (zeertzjq).

closes: #20026

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-21 19:41:37 +00:00
zeertzjq
3918f3232f runtime(doc): fix incorrect description of 'scrolloffpad'
closes: #20029

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-21 19:34:18 +00:00
Jon Parise
16d28548d2 runtime(graphql): Update syntax script to September 2025 spec
A new graphqlEscape syntax graph has been introduced to represent escape
sequences within strings, including the braced unicode form (\u{H+})
added in the September 2025 specification.

See: https://spec.graphql.org/September2025/

closes: #20030

Signed-off-by: Jon Parise <jon@indelible.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-21 19:25:54 +00:00
Jaehwang Jung
d4fb31762e patch 9.2.0384: stale Insstart after <Cmd> cursor move breaks undo
Problem:  A <Cmd> command executed from Insert mode can sync undo and
          move the cursor before the next edit. stop_arrow() saved the
          new cursor line for undo, but left Insstart at the previous
          insertion point. A line-start backspace could then delete
          lines above the saved line without saving the joined range,
          leaving a pending undo entry whose bottom resolved above
          its top and raising E340.
Solution: Update Insstart and Insstart_textlen after the pending undo
          save so the next edit starts from the command-updated cursor
          position (Jaehwang Jung).

closes: #20031

AI-assisted: Codex

Signed-off-by: Jaehwang Jung <tomtomjhj@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-21 19:24:14 +00:00
Christian Brabandt
405e2fb6d5 patch 9.2.0383: [security]: runtime(netrw): shell-injection via sftp: and file: URLs
Problem:  runtime(netrw): shell-injection via sftp: and file: URLs
          (Joshua Rogers)
Solution: Escape temporary file names, harden filename suffix regex,
          drop unused g:netrw_tmpfile_escape variable

Supported by AI

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-21 19:08:05 +00:00
Foxe Chen
d0b6ee320b patch 9.2.0382: Wayland: focus-stealing is non-working
Problem:  Wayland: focus-stealing is non-working
Solution: Remove it, the feature could be re-implemented using
          clipboard-providers feature, see :h wayland-primary-selection
          (Foxe Chen).

closes: #19984

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-20 18:24:17 +00:00
Christian Brabandt
ec3f79e037 patch 9.2.0381: Vim9: Missing check_secure() in exec_instructions()
Problem:  Vim9: Missing check_secure() when executing ISN_STOREENV
          instruction (Andrej Tomči)
Solution: Add check_secure(), add test.

closes: #19992

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-20 17:44:45 +00:00
glepnir
b328686d6a patch 9.2.0380: completion: a few issues in completion code
Problem: ins_compl_stop() sets compl_best_matches = 0, but that's a
         pointer, should reset compl_num_bests instead,
         find_common_prefix() reads cpt_sources_array[cur_source] without
         checking cur_source != -1 which causes an OOB for -1,
         find_next_completion_match(): second `if` in the pending loop
         should be `else if`. Forward paging only moves one step per call.

Solution: Reset compl_num_bests instead, add a check for cur_source not
          equal -1, change if to else if (glepnir)

closes: #20000

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-20 17:36:56 +00:00
Hirohito Higashi
fe3c27ce0b patch 9.2.0379: gui.color_approx is never used
Problem:  gui.color_approx in gui_T has not been assigned anywhere since
          patch 7.4.2094 ("The color allocation in X11 is overly
          complicated", 2016), which dropped the single "gui.color_approx = TRUE;"
          site.  Because the member is zero-initialized and never written, the
          check "if (gui.color_approx)" in gui_mch_init() is always false and the
          "E458: Cannot allocate colormap entry, ..." warning can never be
          emitted.
Solution: Remove the struct member and the unreachable branch.  The E458
          error definition is removed. Update the example error code
          "E458" in the ex_eval.c comment to "E457" accordingly.

closes: #20007

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-20 17:24:15 +00:00
Hirohito Higashi
146d5da0d1 patch 9.2.0378: Using int as bool type in win_T struct
Problem:  Several win_T fields are declared as "int" or "char" but are
          used strictly as boolean flags with TRUE/FALSE values.  The
          integer types obscure the boolean intent and are wider than
          needed.
Solution: Change the following win_T members to bool (stdbool.h) and
          update their assignments from TRUE/FALSE to true/false
          accordingly.

The following conversions have been done:
- int -> bool (10 members):
  w_set_curswant, w_botfill, w_old_botfill, w_do_win_fix_cursor,
  w_popup_fixed, w_border_highlight_isset, w_cline_folded,
  w_redr_status, w_arg_idx_invalid, w_has_scrollbar
- char -> bool (4 members):
  w_topline_was_set, w_ru_empty, w_fold_manual, w_foldinvalid

No existing code compares these members against TRUE/FALSE explicitly or
uses ++/-- / bitwise ops on them, so only plain assignments are
affected.

Excluded:
- w_locked (recursion counter with ++/--),
- w_want_scrollbar (may hold -1 from dict_get_bool),
- w_winbar_height (used in arithmetic and exposed as number via
  getwininfo()).

related: #20005
closes:  #20008

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-20 17:12:29 +00:00
Hirohito Higashi
3c3050e648 patch 9.2.0377: Using int as bool type in gui_T struct
Problem:  Several gui_T fields are declared as "int" or "char" but are
          used strictly as boolean flags with TRUE/FALSE values.  The
          integer types obscure the boolean intent and are wider than
          needed.
Solution: Change the following gui_T members to bool (stdbool.h) and
          update their assignments from TRUE/FALSE to true/false
          accordingly (Hirohito Higashi)

The following conversions have been done:
- int -> bool (11 members):
  in_focus, in_use, starting, dying, dofork, dospawn,
  pointer_hidden, force_redraw, directx_enabled, font_can_bold,
  which_scrollbars[3]
- char -> bool (2 members):
  cursor_is_valid, menu_is_active

No existing code compares these members against TRUE/FALSE explicitly
(e.g. "== TRUE"), so only plain assignments are affected.

gui_init() used counter-style "--gui.starting" / "++gui.starting" to
temporarily clear the flag across a call to gui_mch_enable_menu().
With gui.starting now bool this triggers -Werror=bool-operation, so
replace it with an explicit save/restore.

X11 Bool members (rsrc_rev_video, color_approx) are intentionally left
unchanged: rsrc_rev_video is registered as an X Toolkit resource with
XtRBool / sizeof(Bool) and must keep the int-sized X11 Bool type.

closes: #20005

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-20 16:33:57 +00:00
Furkan Sahin
f74a41620b patch 9.2.0376: Vim9: elseif condition compiled in dead branch
Problem:  When an `if` condition is constant true, the `else` block is
          skipped during compilation. However, any `elseif` condition
          within that skipped block was still compiled. This caused
          errors when the condition referenced variables only declared
          in the skipped block or when it checked for missing features
          (like `has('clipboard')`) (Coacher)
Solution: In compile_elseif(), when scope->se_skip_save is
          already SKIP_YES, skip compiling the elseif condition
          expression using skip_expr_cctx() (Furkan Sahin)

fixes:  #19160
closes: #20021

Signed-off-by: Furkan Sahin <furkan-dev@proton.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-20 16:22:50 +00:00
Furkan Sahin
c9d4c1dc43 patch 9.2.0375: prop_find() does not find a virt text in starting line
Problem:  prop_find() does not find a virt text in the starting line
          (@rickhowe, after v9.2.0320)
Solution: Do not skip virtual text properties with tp_col == MAXCOL on
          the starting line (Furkan Sahin)

The column matching logic incorrectly skipped virtual text properties
with tp_col == MAXCOL on the starting line.  Exclude such properties
from the column range check so they are always found.

fixes:  #20013
closes: #20019

Signed-off-by: Furkan Sahin <furkan-dev@proton.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-20 16:20:12 +00:00
Barrett Ruth
c62342e5cf patch 9.2.0374: c_CTRL-{G,T} does not handle offset
Problem:  c_CTRL-{G,T} does not handle offset, when cycling between
          matches
Solution: Refactor parsing logic into parse_search_pattern_offset() and
          handle offsets, note: highlighting does not handle offsets
          yet (Barrett Ruth).

fixes:  #19991
closes: #19998

Signed-off-by: Barrett Ruth <br.barrettruth@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-20 16:08:47 +00:00
zeertzjq
49e8630a28 patch 9.2.0373: Ctrl-R mapping not triggered during completion
Problem:  Ctrl-R mapping not triggered during completion.
Solution: Move Ctrl-R check out of vim_is_ctrl_x_key()
          (zeertzjq).

fixes:  #20004
closes: #20006

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-20 15:46:08 +00:00
Yasuhiro Matsumoto
73ba353c9d patch 9.2.0372: pum: rendering issues with multibyte text and opacity
Problem:  pum: rendering issues with multibyte text and opacity
Solution: Fix trailing-cell handling near popup text boundary,
          use popup attrs on opaque popup text,
          preserve right border when bg wide char spills,
          blend popup text bg with underlying bg,
          fix wide background char corruption
          (Yasuhiro Matsumoto)

closes: #20017

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-20 15:35:39 +00:00
Eisuke Kawashima
1c88aee1fa runtime: Remove wrong syn oneline keyword from a few syntax files
Also:
- drop a few trailing whitespaces
- mark the oneline keyword for :syn keyword as error in the
  Vim syntax script, add tests for it.

closes: #20018

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-20 15:14:31 +00:00
Bez Hermoso
b30803b231 patch 9.2.0371: filetype: ghostty config files are not recognized
Problem:  filetype: ghostty config files are not recognized
Solution: Detect ghostty configuration files as ghostty filetype,
          include a simple ghostty filetype plugin (Bez Hermoso)

closes: #20002

Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Bez Hermoso <me@bez.dev>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-20 14:50:37 +00:00
Hirohito Higashi
2c436be6f7 patch 9.2.0370: duplicate code with literal string_T assignment
Problem:  Duplicate code with literal string_T assignment
Solution: Add STR_LITERAL_SET() macro for string_T literal assignment
          (Hirohito Higashi).

Previously, assigning a string literal to a string_T variable required
two lines that repeated the literal:

    s.string = (char_u *)"open";
    s.length = STRLEN_LITERAL("open");

Writing the literal twice is error-prone -- a typo in one of them
leaves the pointer and the cached length out of sync.

Add a STR_LITERAL_SET() macro in macros.h so that the assignment can
be written in one statement with the literal appearing only once:

    STR_LITERAL_SET(s, "open");

Replace all occurrences of the two-line pattern across the codebase
with the new macro.

No functional change.

related: #19999
related: #20023
closes:  #20025

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-20 14:43:52 +00:00
Hirohito Higashi
6ecff78129 patch 9.2.0369: multiple definitions of STRING_INIT macro
Problem:  multiple definitions of STRING_INIT macro
Solution: Refactor use of STRING_INIT and use a single
          STR_LITERAL_INIT() macro instead
          (Hirohito Higashi)

Consolidate the ad-hoc STRING_INIT() macros that were defined and used
locally in multiple source files. Define a single STR_LITERAL_INIT()
macro in macros.h and replace all previous STRING_INIT() usages with it.

No functional change.

related: #19999
closes:  #20023

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-19 21:51:51 +00:00
John Marriott
c13232699d patch 9.2.0368: too many strlen() calls when adding strings to dicts
Problem:  too many strlen() calls when adding strings to dicts
Solution: Refactor code to use string_T, use dict_add_string_len()
          instead of dict_add_string() (John Marriott)

Additionally:
- In textprop.c, in function prop_fill_dict() use a string_T to store
  local variable text_align.
- In popupwin.c, use a string_T to store struct member pp_name in struct
  poppos_entry_T.
- In mark.c, refactor function add_mark() to pass in the length of
  argument mname.
- In insexpand.c:
  ->Use a string_T to store the elements of static array
    ctrl_x_mode_names.
  ->Refactor function trigger_complete_done_event():
  ->->change type of argument char_u *word to string_T *word.
  ->->make one access of array ctrl_x_mode_names instead of two.
  ->Refactor function ins_compl_mode() to accept a string_T to return the
    resulting string.
- In fileio.c:
  ->Refactor function getftypewfd() to accept a string_T to return the
    resulting string.
  ->In function create_readdirex_item() use a string_T to store local
    variable q.
- In cmdexpand.c, store global cmdline_orig as a string_T.
- In autocmd.c, in function f_autocmd_get() use a string_T to store local
  variables event_name and group_name. Measure their lengths once when
  they are assigned so they are not remeasured on each call to
  dict_add_string() in the subsequent for loop.
- In channel.c, in function channel_part_info() drop local variable status
  and use s instead. Make s a string_T.

closes: #19999

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-19 21:10:43 +00:00
Yasuhiro Matsumoto
723c0acf25 patch 9.2.0367: runtime(netrw): ~ note expanded on MS Windows
Problem:  runtime(netrw): ~ note expanded on MS Windows
          (Tom Vamvanij)
Solution: Expand ~ on MS Windows (Yasuhiro Matsumoto)

On Windows, ":Explore ~" did nothing because the tilde expansion was
gated to Unix/Cygwin only.  Additionally, substitute() interprets
backslashes in the replacement string specially (e.g. \U as a case
modifier), which would corrupt $HOME values like C:\Users\name even
if the branch were taken.

Include has("win32") in the guard, anchor the pattern to the start of
the string, and escape backslashes, ampersands and tildes in $HOME
before substituting.

fixes:  #20003
closes: #20014

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-19 20:40:58 +00:00
Yasuhiro Matsumoto
237d77e07c patch 9.2.0366: pum: flicker when updating pum in place
Problem:  pum: flicker when updating pum in place
Solution: Skip update_screen() when the popup menu is redrawn
          at the same position (Yasuhiro Matsumoto).

closes: #20015

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-19 20:25:02 +00:00
Hirohito Higashi
1966a1c896 patch 9.2.0365: using int as bool
Problem:  using int as bool
Solution: refactor: use bool type for internal flags in buf_T
          (Hirohito Higashi)

Change the type of 23 internal state flag fields in buf_T from int
to bool for improved type clarity and code readability.

These fields are pure boolean flags that are never accessed via the
option system's varp (which uses *(int *)varp = value), never compared
with int fields holding non-0/1 values, and never use tristate values.

Converted fields:
- State flags: b_dev_valid, b_saving, b_mod_set, b_new_change,
  b_marks_read, b_modified_was_set, b_did_filetype, b_keep_filetype,
  b_au_did_filetype, b_u_synced, b_scanned, b_p_initialized
- Characteristic flags: b_has_textprop, b_may_swap, b_did_warn,
  b_help, b_spell, b_shortname, b_has_sign_column, b_netbeans_file,
  b_was_netbeans_file, b_write_to_channel, b_diff_failed

All TRUE/FALSE assignments to these fields have been updated to
true/false accordingly. The type of temporary save variables
(e.g. help_save in tag.c) has also been adjusted to bool.

Option value fields (b_p_XXX) are kept as int because they are
accessed via the option system and some use tristate (-1) semantics.
Fields compared with int option values (b_start_eof, b_start_eol,
b_start_bomb) are also kept as int to preserve comparison integrity.

closes: #20020

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-19 20:10:20 +00:00
Christian Brabandt
618a327ce6 patch 9.2.0364: tests: test_smoothscroll_textoff_showbreak() fails
Problem:  tests: test_smoothscroll_textoff_showbreak() fails
          (after v9.2.0363)
Solution: Add missing CheckRunVimInTerminal

related: #20011

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-19 20:01:11 +00:00
Furkan Sahin
f2e920321c patch 9.2.0363: Vim9: variable shadowed by script-local function
Problem:  Vim9: variable shadowed by script-local function
          (Mao-Yining)
Solution: Set is_global flag to true in find_func() (Furkan Sahin)

fixes:  #20009
closes: #20011

Signed-off-by: Furkan Sahin <furkan-dev@proton.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-19 18:44:45 +00:00
Jaehwang Jung
0e31fb024c patch 9.2.0362: division by zero with smoothscroll and small windows
Problem:  Resizing a smoothscrolled wrapped window to its textoff width
          with 'showbreak' can leave wrapped continuation lines with
          zero text width. win_lbr_chartabsize() still runs the partial max_head_vcol calculation in
          that state and divides by width2, crashing during redraw.
Solution: Skip that partial head calculation when the wrapped
          continuation width is zero, matching the other width2 guards
          in charset.c (Jaehwang Jung)

closes: #20012

AI-assisted: Codex

Signed-off-by: Jaehwang Jung <tomtomjhj@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-19 18:32:55 +00:00
dependabot[bot]
336533b355 CI: Bump the github-actions group across 2 directories with 4 updates
Bumps the github-actions group with 3 updates in the / directory: [msys2/setup-msys2](https://github.com/msys2/setup-msys2), [actions/cache](https://github.com/actions/cache) and [github/codeql-action](https://github.com/github/codeql-action).
Bumps the github-actions group with 1 update in the /.github/actions/test_artifacts directory: [actions/github-script](https://github.com/actions/github-script).

Updates `msys2/setup-msys2` from 2 to 2.31.0
- [Release notes](https://github.com/msys2/setup-msys2/releases)
- [Changelog](https://github.com/msys2/setup-msys2/blob/main/CHANGELOG.md)
- [Commits](https://github.com/msys2/setup-msys2/compare/v2...v2.31.0)

Updates `actions/cache` from 5 to 5.0.4
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v5...v5.0.4)

Updates `github/codeql-action` from 4 to 4.35.1
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v4...v4.35.1)

Updates `actions/github-script` from 8 to 9
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v8...v9)

---
updated-dependencies:
- dependency-name: msys2/setup-msys2
  dependency-version: 2.31.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: actions/cache
  dependency-version: 5.0.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: github/codeql-action
  dependency-version: 4.35.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: actions/github-script
  dependency-version: '9'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

closes: #20001

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-17 16:16:15 +00:00
Zdenek Dohnal
01d9a1951f patch 9.2.0361: tests: no tests for ch_listen() with IPs
Problem:  tests: no tests for ch_listen() with IPs
Solution: Add tests that this is disallowed
          (Zdenek Dohnal)

The functionality was removed, so the test is to make sure it fails
as expected.

closes: #19997

Signed-off-by: Zdenek Dohnal <zdohnal@redhat.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-17 15:55:53 +00:00
Keith Smiley
30d42855eb runtime(vim9): remove extra escaping in Open
Before 71fd19d7ac this function went
through a `:!` command on all platforms, so it needed special escaping for `#` and
others. After that commit it doesn't go through that path on unix
platforms. Then with 48581f2ba9 this
escaping was re-added on unix and it's needs since it goes through
`sh -c`, but it should not have the extra escaping specific to `:!`.

Specifically my original broken command is:

```
PATH=/usr/bin:/bin VIMRUNTIME=~/dev/vim/runtime ./src/vim -u NONE -c 'call dist#vim9#Open("7bce9f5c69/vimrc (L19)")'
```

Where the `#L19` ends up being opened as `%5C#L19`. But I verified this
case still works as well:

```
PATH=/usr/bin:/bin VIMRUNTIME=~/dev/vim/runtime ./src/vim -u NONE -c 'call dist#vim9#Open("foo bar.txt")'
```

Which is what would otherwise break if we weren't doing any shell
escaping on unix.

closes: #19996

Signed-off-by: Keith Smiley <keithbsmiley@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-17 15:02:39 +00:00
zeertzjq
e666597622 runtime(doc): make window option description a bit less vague
Say explicitly that ":setlocal" sets the local value, while ":set" also
sets the global value.

related: #19993

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-17 14:51:53 +00:00
tecis
68d3129a05 runtime(django): Removed unsupported template statements and filters by current LTS.
Removed djangoStatement:

- ifequal: Depricated version 4.0.
- endifequal: Depricated version 4.0.
- ifnotequal: Depricated version 4.0.
- endifnotequal: Depricated version 4.0.
- parsed
- trans: Renamed to `translate` in version 4.0.
- blocktrans: Renamed to `blocktranslate` in version 4.0.
- endblocktrans: Renamed to `endblocktranslate` in version 4.0.

Removed djangoFilter:

- fix_ampersands: Removed in version 1.8.
- length_is: Removed in version 5.1.

sources:

- Current LTS is version [5.2](https://www.djangoproject.com/download/#supported-versions).
- Documentation template builtins [5.2](https://docs.djangoproject.com/en/5.2/ref/templates/builtins/#truncatechars-html).
- Documentation template builtins [6](https://docs.djangoproject.com/en/6.0/ref/templates/builtins).
- [Django Deprecation Timeline](https://docs.djangoproject.com/en/6.0/internals/deprecation)

closes: #19994

Signed-off-by: tecis <67809811+tecis@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-17 14:48:23 +00:00
tecis
8bcae3ca5d runtime(django): Add missing djangoStatement get_language_info.
Source: [get_language_info](https://docs.djangoproject.com/en/6.0/topics/i18n/translation/#get-language-info) .

related: #19994

Signed-off-by: tecis <67809811+tecis@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-17 14:46:01 +00:00
tecis
6b26afea3b runtime(django): Add missing statements and filters.
Added the fallowing.

djangoStatement:

- querystring: Added in version Django 5.2.
- lorem: Added in version Django 1.8.
- verbatim: Added in version Django 1.10.

djangoFilter:

- force_escape: Added in version Django 1.8.
- iriencode: Added in version Django 1.8.
- json_script: Added in version 2.1.
- truncatechars_html: Added in version 1.7.

> According to current documentation the added keywords are supported [Django version 6](https://docs.djangoproject.com/en/6.0/ref/templates/builtins).

related: #19994

Signed-off-by: tecis <67809811+tecis@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-17 14:44:51 +00:00
Christian Brabandt
450895d86b runtime(make): fix wrong highlighting with $ inside double quotes
fixes: #19986

Co-authored-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-16 21:25:43 +00:00
Yasuhiro Matsumoto
1c299f2631 patch 9.2.0360: Cannot handle mouse-clicks in the tabpanel
Problem:  Cannot handle mouse-clicks in the tabpanel
Solution: Add support using the %[FuncName] atom for the tabpanel
          (Yasuhiro Matsumoto)

Extend the statusline/tabline click region mechanism to work with
'tabpanel'. The callback receives a dict with "area" set to "tabpanel"
and a "tabnr" key indicating which tab page label was clicked.

closes: #19960

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-16 20:33:00 +00:00
Hirohito Higashi
25e9fc44a8 patch 9.2.0359: wrong VertSplitNC highlighting on winbar
Problem:  wrong VertSplitNC highlighting on winbar
          (Maxim Kim, after v9.2.0349)
Solution: Use VertSplit instead of VertSplitNC for winbar rows
          (Hirohito Higashi).

vsep_row_is_curwin() and right_neighbor_at_row() used W_WINROW() which
excludes winbar rows from the window's range.  This caused the vertical
separator at winbar rows to use VertSplitNC even when curwin is adjacent.

Use w_winrow directly so winbar rows are included in the range check.

fixes:  #19985
closes: #19987

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-16 20:12:08 +00:00
Yasuhiro Matsumoto
b076c49282 patch 9.2.0358: runtime(vimball): still path traversal attacks possible
Problem:  runtime(vimball): still path traversal attacks possible
Solution: block Windows driver letter paths (Yasuhiro Matsumoto)

The path traversal check in vimball#Vimball() did not reject file
names starting with a Windows drive letter (e.g. "C:/foo"). Backslashes
are normalized to forward slashes earlier, so UNC paths are caught by
the leading-slash check, but absolute drive-letter paths slipped
through and could write outside of g:vimball_home on Windows.

Add a "^\a:" check next to the existing "^/" check, and cover it with
a new test.

closes: #19989

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-16 20:03:39 +00:00
Yasuhiro Matsumoto
ab02d65b1f runtime(gzip): Remove compatibility fall-backs, harden random filename generation
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-16 19:21:56 +00:00
Yasuhiro Matsumoto
21c0cd29f8 runtime(netrw): add missing escape() calls
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-15 20:47:29 +00:00
Christian Brabandt
e6a84bb6b0 runtime(tar): missing g:tar_secure in tar#Extract()
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-16 14:42:47 +02:00
Christian Brabandt
c78194e41d patch 9.2.0357: [security]: command injection via backticks in tag files
Problem:  [security]: command injection via backticks in tag files
          (Srinivas Piskala Ganesh Babu, Andy Ngo)
Solution: Disallow backticks before attempting to expand filenames.

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-cwgx-gcj7-6qh8

Supported by AI

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-15 20:24:21 +00:00
McAuley Penney
a414630393 patch 9.2.0356: Cannot apply 'scrolloff' context lines at end of file
Problem:  Cannot apply 'scrolloff' context lines at end of file
Solution: Add the 'scrolloffpad' option to keep 'scrolloff' context even
          when at the end of the file (McAuley Penney).

closes: #19040

Signed-off-by: McAuley Penney <jacobmpenney@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-15 19:17:13 +00:00
q1uf3ng
490b737f3e patch 9.2.0355: runtime(tar): missing path traversal checks in tar#Extract()
Problem:  runtime(tar): missing path traversal checks in tar#Extract()
Solution: Add check for leading slash, however gnu tar should already
          detect this (q1uf3ng)

tar#Extract() did not check for ../ sequences or absolute paths,
unlike zip#Extract() which was patched in recent commits. Add the
same checks: ../ (relative traversal), leading slash (Unix), drive
letter and UNC/leading slash (Windows).

closes: #19981

Signed-off-by: q1uf3ng <q1uf3ng@protone.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-15 18:36:20 +00:00
Martin Schwan
0e02be1919 patch 9.2.0354: filetype: not all Bitbake include files are recognized
Problem:  filetype: not all Bitbake include files are recognized
Solution: Enhance the file detection logic and consider varflags
          (Martin Schwan)

closes: #19983

Signed-off-by: Martin Schwan <m.schwan@phytec.de>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-15 18:11:07 +00:00
Martin Schwan
2041478e2a runtime(bitbake): support forward-slashes in bitbake varflags
Enable syntax highlighting for forward-slashes in Bitbake variables with
varflags. Bitbake allows for forward-slashes in both the variable name
and their potential varflags. E.g. the following should match:

    FOO_BAR[baz] = "foobar"
    FOO_BAR_foo/bar[baz] = "foobar"
    FOO_BAR_foo/bar[baz/bazzer] = "foobar"

Also allow plus-signs in variable names, to be in line with normal
variable names.

related: #19983

Signed-off-by: Martin Schwan <m.schwan@phytec.de>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-15 18:07:18 +00:00
John Marriott
7cc73a6c66 patch 9.2.0353: Missing out-of-memory check in register.c
Problem:  Missing out-of-memory check in register.c
Solution: Check for memory allocation failure and return NULL
          (John Marriott).

closes: #19949

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-15 17:54:22 +00:00
Hirohito Higashi
60e925ca0e runtime(doc): Tweak documentation style in channel.txt
closes: #19978

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-15 17:00:19 +00:00
Foxe Chen
2252d2c1e5 patch 9.2.0352: 'winhighlight' of left window blends into right window
Problem: 'winhighlight' of left window blends into right window
Solution: Allow to push a NULL highlight override (Foxe Chen)

closes: #19980

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-15 16:52:09 +00:00
Yasuhiro Matsumoto
bfa46a52f6 patch 9.2.0351: repeat_string() can be improved
Problem:  repeat_string() can be improved
Solution: Replace the for() loop by an exponential growing while loop
          (Yasuhiro Matsumoto)

closes: #19977

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-15 04:12:55 +00:00
q1uf3ng
351a16c88f runtime(zip): also block single leading slash and absolute paths in Extract
zip#Write(): the Windows path check did not match a single leading
slash (/path), which resolves to the current drive root on Windows.
Simplify the regex to match any leading slash or backslash.

zip#Extract(): add absolute path checks for both Unix and Windows,
matching the existing checks in zip#Write().

closes: #19976

Signed-off-by: q1uf3ng <glna9@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-15 04:03:02 +00:00
Christian Brabandt
4c28794716 patch 9.2.0350: Enabling modelines poses a risk
Problem:  Enabling modelines poses a risk, cannot whitelist specific
          modelines
Solution: Include the 'modelinestrict' option, enabled by default, that
          allows only a few very specific modelines, all others will be
          ignored

When set (which it is by default), only the following settings will be
applied, all others will be ignored:

  'autoindent'
  'cindent'
  'commentstring'
  'expandtab'
  'filetype'
  'foldcolumn'
  'foldenable'
  'foldmethod'
  'modifiable'
  'readonly'
  'rightleft'
  'shiftwidth'
  'smartindent'
  'softtabstop'
  'spell'
  'spelllang'
  'tabstop'
  'textwidth'
  'varsofttabstop'
  'vartabstop'

Supported by AI

closes: #19875

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-14 18:57:41 +00:00
Hirohito Higashi
c72196529b patch 9.2.0349: cannot style non-current window separator
Problem:  cannot style non-current window separator
Solution: Add the VertSplitNC highlighting group
          (Hirohito Higashi).

Add VertSplitNC highlight group for vertical separators of non-current
windows, similar to StatusLine/StatusLineNC distinction.  The separator
adjacent to the current window uses VertSplit, others use VertSplitNC.
Default: linked to VertSplit.

At the current window's status line rows, the separator cell is drawn as
a space with the StatusLine highlight so it blends into the status line
without a stray fillchar glyph.

Also:
- :redrawstatus[!] now also redraws vertical separators.
- statusline height changes trigger vsep redraw.

closes: #19951

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-14 18:42:38 +00:00
Christian Brabandt
91b402f575 patch 9.2.0348: potential buffer underrun when setting statusline like option
Problem:  potential buffer underrun when settings statusline like option
          (q1uf3ng)
Solution: Validate that p > out before accessing p[-1]

closes: #19961

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-14 18:18:36 +00:00
Ozaki Kiichi
f9cb0d14dc CI: Separate out ASan tests
closes: #19962

Signed-off-by: Ozaki Kiichi <gclient.gaap@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-14 18:13:32 +00:00
Yegappan Lakshmanan
39875daec2 patch 9.2.0347: Vim9: script-local variable not found
Problem:  Vim9: script-local variable not found after function call
          (Mao-Yining)
Solution: Accept a script local variable in a function which overrides a
          previous block-scope variable (Yegappan Lakshmanan)

fixes:  #19959
closes: #19963

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-14 17:02:21 +00:00
Hirohito Higashi
c4fe1e958a patch 9.2.0346: Wrong cursor position when entering command line window
Problem:  Wrong cursor position when entering command line window
Solution: Add check_cursor() command to verify the cursor position
          (Hirohito Higashi).

When opening the command-line window with CTRL-F after typing a command
that fills the screen width, the cursor was placed past the end of the
line.  Add check_cursor() after setting State to MODE_NORMAL so the
cursor is adjusted to the last character.

Also fix the cmdwin prefix character (e.g. ':') being drawn on wrapped
continuation rows.  Draw an empty space instead so that the text
alignment is preserved.

closes: #19964

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-14 16:56:03 +00:00
zeertzjq
efbd482116 patch 9.2.0345: Wrong autoformatting with 'autocomplete'
Problem:  Wrong autoformatting with 'autocomplete'.
Solution: Don't trigger autoformatting when ending autocompletion
          without selecting an item (zeertzjq).

fixes:  #19954
closes: #19970

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-14 16:48:55 +00:00
Zdenek Dohnal
962a540d76 patch 9.2.0344: channel: ch_listen() can bind to network interface
Problem:  channel: ch_listen() can bind to network interface
Solution: Only allow to use Unix domain sockets or localhost interface
          (Zdenek Dohnal)

related: #19231
related: #19799
closes:  #19973

Signed-off-by: Zdenek Dohnal <zdohnal@redhat.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-14 16:37:25 +00:00
Hirohito Higashi
4b6f3f1d16 runtime(doc): Tweak documentation style in options.txt
closes: #19971

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-14 16:31:10 +00:00
James McCoy
9d95410aa4 patch 9.2.0343: tests: test_clientserver may fail on slower systems
Problem:  tests: test_clientserver may fail on slower systems
Solution: Wait for argc() before checking argv() (James McCoy).

On slower systems, the argv() check may run before the server has
populated the arg list.

Add a wait for argc() to be 3 to be more tolerant of such systems

closes: #19974

Signed-off-by: James McCoy <jamessan@jamessan.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-14 16:25:50 +00:00
Christian Brabandt
c922202ea2 patch 9.2.0342: tests: test_excmd.vim leaves swapfiles behind
Problem:  tests: test_excmd.vim leaves swapfiles behind
Solution: Close open buffer using :bw!

related: #19975

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-14 16:12:10 +00:00
q1uf3ng
fcc4276db3 patch 9.2.0341: some functions can be run from the sandbox
Problem:  some functions can be run from the sandbox
Solution: Block them, so they are not accessible from a modeline
          (q1uf3ng)

closes: #19975

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: q1uf3ng <q1uf3ng@protone.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-14 15:58:40 +00:00
Christian Brabandt
6836599733 runtime(zip): Detect path traversal issues on Windows
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-14 14:42:48 +02:00
Christian Brabandt
86dcb1878c Revert "runtime(jjdescription): allow to configure summary width"
This reverts commit 86ae6858ab.

related: #19905

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-13 15:50:07 +02:00
Yasuhiro Matsumoto
efedcd1e6f patch 9.2.0340: pum_redraw() may cause flicker
Problem:  pum_redraw() may cause flicker
Solution: Wrap pum_redraw() in synchronized output to avoid flicker
          (Yasuhiro Matsumoto)

closes: #19955

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-12 16:24:09 +00:00
Yasuhiro Matsumoto
dc4734448b Fix a few typos
closes: #19953

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-12 16:19:36 +00:00
Yasuhiro Matsumoto
105d65e29b patch 9.2.0339: regexp: nfa_regmatch() allocates and frees too often
Problem:  nfa_regmatch() allocates and frees two list buffers on every
          call, causing unnecessary memory allocation overhead for
          frequently used patterns.
Solution: Cache the list buffers in the regprog struct and reuse them
          on subsequent top-level calls. Recursive calls still allocate
          their own buffers. Free cached buffers in nfa_regfree()
          (Yasuhiro Matsumoto).

Benchmark: 10K lines, `:%s` x50 iterations

| Pattern | Before | After | Improvement |
|---|---|---|---|
| `\<\(\w\+\%(ing\|tion\|ed\|ly\)\|\w\{3,}\)\>` (many matches) | 4.384s | 4.299s | -2% |
| `\(foo\|bar\|baz\)\{3,}\(qux\|quux\|corge\)\{2,}...` (no match, high nstate) | 16.927s | 3.015s | -82% |

closes: #19956

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-12 16:12:22 +00:00
Emilia
86ae6858ab runtime(jjdescription): allow to configure summary width
Allow to configure max length for the summary line and fall back to gits
setting.

closes: #19905

Signed-off-by: Emilia <emilia@bewitching.dev>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-11 15:37:40 +00:00
Yasuhiro Matsumoto
0802e00f2a patch 9.2.0338: Cannot handle mouseclicks in the tabline
Problem:  Cannot handle mouseclicks in the tabline
Solution: Support %[FuncName] click regions in 'tabline', add "area" key
          to the click info dict (Yasuhiro Matsumoto).

The previous implementation resolved and stored click regions only for
per-window statuslines; the tabline path in win_redr_custom() (wp==NULL)
parsed %[FuncName] but discarded the regions, and tabline clicks were
dispatched via TabPageIdxs[] which didn't know about them.

Add a global tabline_stl_click array populated from the tabline path,
refactor stl_click_handler() to take the regions directly, and dispatch
matching clicks from do_mouse() before falling through to tab selection.
The winid entry in the callback dict is 0 for tabline clicks.

related: #19841
closes:  #19950

Supported by AI.

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-11 15:26:14 +00:00
James McCoy
8fd37e42a6 patch 9.2.0337: list indexing broken on big-endian 32-bit platforms
Problem:  check_range_index_one() expects a long * but n1 is a
          varnumber_T. Casting varnumber_T * to long * is undefined
          behaviour and reads the wrong bytes on big-endian platforms
          (John Paul Adrian Glaubitz)
Solution: Use a local long variable and pass that pointer to
          check_range_index_one() (James McCoy)

fixes:  #19798
closes: #19952

Signed-off-by: James McCoy <jamessan@jamessan.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-11 15:04:00 +00:00
Christian Brabandt
01be43047f runtime(hlyank): verify winid in lambda before matchdelete()
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-11 14:53:48 +00:00
Cimbali
e29f33ef51 patch 9.2.0336: libvterm: no terminal reflow support
Problem:  libvterm: no terminal reflow support
Solution: Support for reflowing, sync libvterm to revision 843
          (Cimbali)

fixes:  #2865
closes: #8365
closes: #19863

Co-authored-by: Paul "LeoNerd" Evans <leonerd@leonerd.org.uk>
Signed-off-by: Cimbali <me@cimba.li>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-10 22:15:36 +00:00
Yasuhiro Matsumoto
71c10dcd58 patch 9.2.0335: json_encode() uses recursive algorithm
Problem:  json_encode() uses recursive algorithm
Solution: Convert from recursive to iterative algorithm to prevent
          stack overflow on deep recursive levels
          (Yasuhiro Matsumoto).

closes: #19839

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-10 21:37:44 +00:00
Gary Johnson
dd40b1af5b patch 9.2.0334: GTK: window geometry shrinks with with client-side decorations
Problem:  On GTK3 with client-side decorations the window opens with
          wrong &columns/&lines, and each :tabnew/:tabclose cycle
          shrinks the size further.
Solution: Measure and compensate for the CSD frame offset, discard
          spurious configure events from tabline show/hide
          (Gary Johnson).

closes: #19853

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Gary Johnson <garyjohn@spocom.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-10 21:23:38 +00:00
Nihaal Sangha
871e6c6cf9 patch 9.2.0333: filetype: PklProject files are not recognized
Problem:  filetype: PklProject files are not recognized
Solution: Detect PklProject files as pkl filetype
          (Nihaal Sangha).

Reference:
https://pkl-lang.org/
https://github.com/apple/pkl
https://github.com/apple/pkl-pantry

closes: #19948

Signed-off-by: Nihaal Sangha <nihaal.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-10 18:40:37 +00:00
Christian Brabandt
01e9670212 runtime(doc): Update documentation on statusline click handler
related: #19841

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-10 18:37:25 +00:00
Yasuhiro Matsumoto
7e0eb5271e patch 9.2.0332: popup: still opacity rendering issues
Problem:  popup: still opacity rendering issues
Solution: Fix remaining issues, see below
          (Yasuhiro Matsumoto).

This PR fixes the following issues:

- Padding blend hole at wide char boundary: when a padding cell overlaps
  the second half of a wide character, the right half's attr value is
  unreliable. Use the left half's saved attr for blending instead.

- Wide char background split at popup boundary: when a wide character in
  an upper popup straddles the edge of a lower opacity popup, both
  halves got different background colors. Since terminals cannot render
  different left/right background colors for a wide character, detect
  the lower popup with popup_is_over_opacity() and use the non-popup
  side's underlying attr for both halves.

- Wrong blend color with cterm-only highlights under 'termguicolors':
  when a popup highlight has ctermbg but no guibg, bg_rgb is set to
  CTERMCOLOR (not INVALCOLOR). hl_blend_attr() used this value as a real
  RGB color, producing gray instead of the intended color. Use
  COLOR_INVALID() to detect both INVALCOLOR and CTERMCOLOR, and fall back
  to converting the cterm color number to RGB.

closes: #19943

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-10 17:43:59 +00:00
Christian Brabandt
07faa961a0 patch 9.2.0331: spellfile: stack buffer overflows in spell file generation
Problem:  spell_read_aff() uses sprintf() into a fixed-size stack buffer
          without bounds checking. store_aff_word() uses STRCAT() to
          append attacker-controlled strings into newword[MAXWLEN] without
          checking remaining space. Both are reachable via :mkspell with
          crafted .aff/.dic files (xinyi234)
Solution: Replace sprintf() with vim_snprintf() in spell_read_aff().
          Replace STRCAT() with STRNCAT() with explicit remaining-space
          calculation in store_aff_word().

closes: #19944

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-09 22:27:36 +00:00
zeertzjq
2fbc69c9ad patch 9.2.0330: tests: some patterns in tar and zip plugin tests not strict enough
Problem:  Some patterns in tar and zip plugin tests not strict enough.
Solution: Use assert_equal() for lines that should match exactly. Match
          a literal dot properly (zeertzjq).

closes: #19946

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-09 22:21:23 +00:00
Christian Brabandt
158947e294 patch 9.2.0329: tests: test_indent.vim leaves swapfiles behind
Problem:  tests: test_indent.vim leaves swapfiles behind
Solution: Close open buffer using :bw! instead of :close!

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-09 21:30:19 +00:00
Yasuhiro Matsumoto
d42b047f78 patch 9.2.0328: Cannot handle mouseclicks in the statusline
Problem:  Cannot handle mouseclicks in the statusline
Solution: Add the %[FuncName] statusline item to define clickable
          regions with a callback function. (Yasuhiro Matsumoto)

closes: #19841

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-09 21:15:30 +00:00
Christian Brabandt
6c16ccaf61 patch 9.2.0327: filetype: uv scripts are not detected
Problem:  filetype: uv scripts are not detected
          (Asger Hautop Drewsen)
Solution: Detect uv scripts as python filetype if the shebang line
          contains "uv run"

Reference:
https://docs.astral.sh/uv/guides/scripts/#using-a-shebang-to-create-an-executable-file

fixes: #19941

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-09 20:50:01 +00:00
Joël Stemmer
f554a7c709 runtime(jjdescription): Add highlighting for 'Renamed' status lines
`jj status` output uses the 'R' prefix for renamed files.

closes: #19879

Signed-off-by: Joël Stemmer <jstemmer@google.com>
Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-09 19:33:05 +00:00
Joël Stemmer
959817472d runtime(jjdescription): Anchor status matches to start of line
The regex for status line highlighting was too broad, `jjComment` lines
containing e.g. the letter 'A' followed by a space anywhere in the line
were highlighted.

related: #19879

Signed-off-by: Joël Stemmer <jstemmer@google.com>
Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-09 19:30:53 +00:00
Aaron Burrow
4a1bcc67b4 patch 9.2.0326: runtime(tar): but with dotted path
Problem:  runtime(tar): but with dotted path
Solution: Do not strip everything after the first dot
          (Aaron Burrow)

tar#Extract was getting the extensionless basename by
stripping away everything starting with the leftmost
dot.  So if a directory had a dot or the file had an
'extra' dot then the code did the wrong thing.  For
example, if it was given:

  /tmp/foo.bar/baz.tar.gz

Then it would treat /tmp/foo as the extensionless
basename, but it actually should have grabbed:

  /tmp/foo.bar/baz

This patch fixes the issue by instead looking at the
rightmost dot(s).

This bug was discovered by ChatGPT 5.4.  I wrote the
patch and tested vim.

closes: #19930

Signed-off-by: Aaron Burrow <burrows@fastmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-09 19:11:16 +00:00
Aaron Burrow
00285c035a patch 9.2.0325: runtime(tar): bug in zstd handling
Problem:  patch 9.2.0325: runtime(tar): bug in zstd handling
Solution: use correct --zstd argument, separated from other arguments,
          rework testing framework (Aaron Burrow).

The tar.vim plugin allows vim to read and manipulate zstd archives,
but it had a bug that caused extraction attempts to fail.
Specifically, if the archive has a .tar.zst or .tzst extension, then
the code was generating invalid extraction commands that looked like
this:

  tar --zstdpxf foo.tar.zst foo

When they should be like this:

  tar --zstd -pxf foo.tar.zst foo

This patch changes the flag manipulation logic so that --zstd isn't
glued to pxf.

The labor for this change was divided between ChatGPT 5.4 and me.
ChatGPT 5.4 identified the issue (from a code scan?), and I wrote
the patch and tested vim.

related: #19930

Signed-off-by: Aaron Burrow <burrows@fastmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-09 19:06:13 +00:00
zeertzjq
3e2012914e patch 9.2.0324: 0x9b byte not unescaped in <Cmd> mapping
Problem:  0x9b byte not unescaped in <Cmd> mapping (BenYip).
Solution: Translate K_CSI to CSI like what is done in vgetc().
          (zeertzjq).

fixes:  #19936
closes: #19937

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-09 18:55:02 +00:00
Hirohito Higashi
9d9381fb28 runtime(doc): Tweak documentation style a bit
closes: #19939

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-09 18:49:43 +00:00
Maxim Kim
c23aebdf99 runtime(org): Link to generic bold/Italic highlighting groups
fixes: #19933

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-09 18:44:45 +00:00
Hirohito Higashi
72cefe6b72 runtime(help): support highlighting groups in translated syntax doc
closes: #19942

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-09 18:38:35 +00:00
Christian Brabandt
3e194b1068 runtime(vimball): detect more path traversal attacks
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-09 18:35:39 +00:00
Stefan VanBuren
c2734dc03c patch 9.2.0323: filetype: buf.lock files are not recognized
Problem:  filetype: buf.lock files are not recognized
Solution: Detect buf.lock files as yaml filetype
          (Stefan VanBuren)

Reference:
https://buf.build/docs/configuration/v2/buf-lock/

closes: #19935

Signed-off-by: Stefan VanBuren <svanburen@buf.build>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-08 18:30:46 +00:00
Yasuhiro Matsumoto
3d224e42e7 patch 9.2.0322: tests: test_popupwin fails
Problem:  tests: test_popupwin fails (after v9.2.0319)
Solution: Regenerate the dump file (Yasuhiro Matsumoto).

The reference dump for Test_popupwin_opacity_wide_2 was not updated
when patch 9.2.0319 changed the blending behavior for double-width
characters at popup padding boundaries. The covered half of a
double-width character now correctly shows a space instead of the
full character.

related: #19881
closes:  #19934

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-08 18:21:13 +00:00
Yasuhiro Matsumoto
ea7bf9aa8a patch 9.2.0321: MS-Windows: No OpenType font support
Problem:  MS-Windows: No OpenType font support
Solution: Allow specifying OpenType font features directly in 'guifont'
          (Yasuhiro Matsumoto).

Allow specifying OpenType font features directly in 'guifont' using
the ':f' option (e.g., :set guifont=Cascadia_Code:h14:fss19=1:fcalt=0).
Each ':fXXXX=N' sets a single OpenType feature tag with a parameter
value.  Multiple features can be specified by repeating the ':f' option.

This only takes effect when 'renderoptions' is set to use DirectWrite
(type:directx).  Default features (calt, liga, clig, rlig, kern) are
preserved unless explicitly overridden.

closes: #19857

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-07 21:07:46 +00:00
Hirohito Higashi
ff41e9d853 patch 9.2.0320: several bugs with text properties
Problem:  several bugs with text properties
Solution: Fix the bugs, rework the text properties work

related: #19685
fixes:   #19680
fixes:   #19681
fixes:   #12568
fixes:   #19256
closes:  #19869

Co-Authored-By: Paul Ollis <paul@cleversheep.org>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-07 20:46:10 +00:00
Yasuhiro Matsumoto
c79edc0df9 patch 9.2.0319: popup: rendering issues with partially transparent popups
Problem:  popup: rendering issues with partially transparent popups.
Solution: Redraw the area under the old popup position on move or
          resize. Apply the background blend only to the covered half of
          a double-width character. (Yasuhiro Matsumoto)

closes: #19881

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-07 20:26:17 +00:00
Yasuhiro Matsumoto
317351c745 patch 9.2.0318: cannot configure opacity for popup menu
Problem:  cannot configure opacity for popup menu
Solution: Add the 'pumopt' option, consolidate existing pum options into
          the pumopt option (Yasuhiro Matsumoto)

closes: #19931

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-07 19:51:20 +00:00
Christian Brabandt
f3cba4a205 runtime(doc): document gitcommit_summary_length
related: #19905

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-07 19:37:14 +00:00
Antonin Godard
15e988810e runtime(bitbake): Update syntax script
1) add syntax for include_all

The include_all directive was introduced in [1]. It uses the same syntax
as include or require, taking one or more paths as argument.

2) add syntax for inherit_defer

The inherit_defer directive was introduced in [2]. It uses the same syntax
as inherit, taking one or more class name as argument.

3) add syntax for addpylib

The addpylib directive was introduced in [3]. It uses a syntax similar
to addtask or addhandler, taking a directory and python namespace as
argument.

[1]: https://git.openembedded.org/bitbake/commit/?id=d01d5593e7829ac60f37bc23cb87dc6917026471
[2]: https://git.openembedded.org/bitbake/commit/?id=5c2e840eafeba1f0f754c226b87bfb674f7bea29
[3]: https://git.openembedded.org/bitbake/commit/?id=afb8478d3853f6edf3669b93588314627d617d6b

Signed-off-by: Antonin Godard <antonin@godard.cc>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-07 19:28:27 +00:00
Christian Brabandt
fd836aab13 patch 9.2.0317: listener functions do not check secure flag
Problem:  listener functions do not check secure flag
          (syndicate)
Solution: Call check_secure()

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-07 18:57:04 +00:00
Christian Brabandt
7ab76a8604 patch 9.2.0316: [security]: command injection in netbeans interface via defineAnnoType
Problem:  [security]: The netbeans defineAnnoType command passes typeName, fg and bg
          unsanitized to coloncmd(), allowing a malicious server to inject
          arbitrary Ex commands via '|'. Similarly, specialKeys does not
          validate key tokens before building a map command.
Solution: Validate typeName, fg and bg against an allowlist of safe
          characters before passing them to coloncmd()

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-mr87-rhgv-7pw6

Supported by AI

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-07 18:42:18 +00:00
Christian Brabandt
794c304479 runtime(doc): clarify incsearch feature and typed chars
fixes: #19886

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-06 14:01:20 +00:00
Yasuhiro Matsumoto
8d23fcb603 patch 9.2.0315: missing bound-checks
Problem:  missing bound-checks
Solution: Add defensive guards against potential buffer overflow
          (Yasuhiro Matsumoto)

Add bounds checking and integer overflow guards across multiple files
as a defensive measure. While these code paths are unlikely to be
exploitable in practice, the guards prevent undefined behavior in
edge cases.

- libvterm/vterm.c: use heap tmpbuffer instead of stack buffer in
  vsprintf() fallback path
- channel.c: validate len in channel_consume() before mch_memmove()
- spell.c: use long instead of int for addlen to avoid signed overflow
  in size_t subtraction
- alloc.c: add SIZE_MAX overflow check in ga_grow_inner() before
  itemsize multiplication
- list.c: add overflow check before count * sizeof(listitem_T)
- popupwin.c: add overflow check before width * height allocation
- insexpand.c: add overflow check before compl_num_bests multiplication
- regexp_bt.c: replace sprintf() with vim_snprintf() in regprop()
- spellfile.c: use SIZE_MAX instead of LONG_MAX for allocation overflow
  check

closes: #19904

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-06 13:53:31 +00:00
Zdenek Dohnal
c3c3478810 patch 9.2.0314: channel: can bind to all network interfaces
Problem:  channel: can bind to all network interfaces in ch_listen()
          (after v9.2.0153)
Solution: Restrict to a valid hostname, do not allow to bind on all
          network interfaces (Zdenek Dohnal).

This will prevent unintentional binding the process to public network
interfaces, and opening Vim to communication from outside network if
firewall allows it.

related: #19231
closes:  #19799

Signed-off-by: Zdenek Dohnal <zdohnal@redhat.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-06 13:48:15 +00:00
Foxe Chen
aef812446b patch 9.2.0313: Callback channel not registered in GUI
Problem:  Callback channel not registered in GUI
Solution: Call channel_gui_register_one() in GUI mode
          (Foxe Chen).

closes: #19858

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-06 13:35:27 +00:00
Eisuke Kawashima
a5b6c2d6e9 patch 9.2.0312: C-type names are marked as translatable
Problem:  C-type names are marked as translatable
Solution: Use them as-is, do not translate them
          (Eisuke Kawashima)

closes: #19861

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-06 13:32:23 +00:00
Yasuhiro Matsumoto
c4921023b1 patch 9.2.0311: redrawing logic with text properties can be improved
Problem:  redrawing logic with text properties can be improved in
          win_line()
Solution: Avoid repeated sorts, use stack storage for small
          properties, pre-compute whether trailing virtual text follows
          (Yasuhiro Matsumoto)

closes: #19880

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-06 13:19:04 +00:00
Yasuhiro Matsumoto
f9981bbc8e patch 9.2.0310: unnecessary work in vim_strchr() and find_term_bykeys()
problem:  unnecessary work in vim_strchr() and find_term_bykeys()
Solution: Redirect vim_strchr() to vim_strbyte() for ASCII input
          Add an early exit to find_term_bykeys() using the terminal
          leader table, mirroring check_termcode(). Reduces instruction
          count on startup by about 27%. (Yasuhiro Matsumoto)

closes: #19902

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-06 13:12:39 +00:00
John Marriott
4368ad34df patch 9.2.0309: Missing out-of-memory check to may_get_cmd_block()
Problem:  Missing out-of-memory check to may_get_cmd_block()
Solution: Return p unchanged in case of out-of-memory (John Marriott)

closes: #19906

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-06 13:07:31 +00:00
Mao-Yining
f1dbca200c runtime(log): clean up and modernize log syntax
- Rename groups to consistent log* naming (LogString→logString, etc.)
- Remove redundant logOperator/logBrackets, use logSymbol for special chars
- Simplify level keywords by removing case variants
- Consolidate syslog column patterns into logSysColumn
- Move custom highlights to portable ctermfg/guifg names
- Update maintainer email address

closes: #19917

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-06 13:02:04 +00:00
Mao-Yining
ea5084d1f1 patch 9.2.0308: Error message E1547 is wrong
Problem:  Error message E1547 is wrong
Solution: Fix error message, re-generate Chinese translations
          (Mao-Yining).

closes: #19920

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-06 12:54:33 +00:00
Hirohito Higashi
002fddecde patch 9.2.0307: more mismatches between return types and documentation
Problem:  more mismatches between return types and documentation
Solution: Update documentation, fix return type for remote_foreground()
          and test_mswin_event() (Hirohito Higashi)

Doc summary table fixes:
- ch_info: String -> Dict
- spellbadword: String -> List
- undotree: List -> Dict
- test_getvalue: any -> Number
- instanceof, popup_filter_menu, popup_filter_yesno: Number -> Bool
- remote_foreground: Number -> none
- test_mswin_event: bool -> Bool

evalfunc.c fixes:
- remote_foreground: ret_string -> ret_void
- test_mswin_event: ret_number -> ret_bool

Detail "Return type:" fixes:
- instanceof: Number -> vim9-boolean
- remote_foreground: Number -> void
- popup_filter_menu, popup_filter_yesno: Number -> vim9-boolean

related: #19922
closes:  #19923

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-06 12:49:53 +00:00
Aaron Burrow
78954f86c2 patch 9.2.0306: runtime(tar): some issues with lz4 support
Problem:  runtime(tar): some issues with lz4 support
Solution: Fix bugs (see below) (Aaron Burrow)

The tar plugin allows users to extract files from tar archives that are
compressed with lz4. But, tar#Extract() builds malformed extraction commands
for lz4-compressed tar archives. This commit fixes three issues in that code.
The first affects archives with a .tlz4 extension and the other two affect
archives with .tar.lz4 extension (but one of these is symmetric to the issue
that .tlz4 archives had).

(1) When trying to extract .tlz4 archives the command created by
tar#Extract looked like this:

    tar -I lz4pxf foo.tlz4 foo

This isn't right.  It should be something like this:

    tar -I lz4 -pxf foo.tlz4 foo

This was happening because tar.plugin is just substituting on the
first - in "tar -pxf".  This works fine if we just add a simple flag for
extraction (eg, z for .tgz), but for lz4 we need to add "-I lz4".

I don't believe that there is an obvious good way to fix this without
reworking the way the command is generated.  Probably we should collect
the command and flags separately and the flags should be stored in a
set. Then put everything together into a string just before issuing it
as an extraction command.  Unfortunately, this might break things for users
because they have access to tar_extractcmd.

This patch just makes the substitution a little bit more clever so that it
does the right thing when substituting on a string like "tar -pxf".

(2) .tar.lz4 extractions had the same issue, which my patch fixes in
the same way.

(3) .tar.lz4 extractions had another issue.  There was a space missing
in the command generated by tar#Extract.  This meant that commands
looked like this (notice the lack of space between the archive and output
file names):

    tar -I lz4pxf foo.tar.lz4foo

This patch just puts a space where it should be.

Finally, I should note that ChatGPT 5.4 initially identified this issue
in the code and generated the test cases.  I reviewed the test cases,
wrote the patch, and actually ran vim against the tests (both with and
without the patch).

closes: #19925

Signed-off-by: Aaron Burrow <burrows@fastmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-06 12:46:40 +00:00
Furkan Sahin
48581f2ba9 runtime(vim9): Fix dist#vim9#Open() spaced paths and SIGPIPE crashes
Problem:    dist#vim9#Open() fails to open files with spaces on Linux
            because Launch() splits the command string. Also,
            background GUI viewers (e.g., xdg-open) crash with SIGPIPE
            when Vim destroys the default job_start() IO pipes.
Solution:   Use job_start() with 'sh -c' to let the POSIX shell parse
            the shellescaped quotes safely. Set 'in_io', 'out_io', and
            'err_io' to 'null' to completely detach the background
            process and prevent pipe crashes. Unify the Launch()
            execution block across all operating systems.

closes: #19928
fixes:  #19916

Signed-off-by: Furkan Sahin <furkan-dev@proton.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-06 12:43:07 +00:00
Hirohito Higashi
365d58a539 patch 9.2.0305: mismatch between return types and documentation
Problem:  mismatch between return types and documentation
Solution: Fix documentation, update f_err_teapot() return type to void
          (Hirohito Higashi)

- Fix summary table in builtin.txt: feedkeys, foreground, setcharsearch,
  term_wait, test_void, wildtrigger, ch_sendraw from non-none to none;
  listener_remove and prop_add from none to Number
- Fix err_teapot in evalfunc.c: ret_number_bool to ret_void
- Fix "Return type:" in detailed doc sections (64 functions across builtin.txt,
  channel.txt, terminal.txt, popup.txt, testing.txt, textprop.txt) from wrong
  types to void
- Add missing "Return type: void" for prompt_setcallback and prop_add_list

closes: #19922

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-05 16:53:52 +00:00
zeertzjq
b03970f41f patch 9.2.0304: tests: test for 9.2.0285 doesn't always fail without the fix
Problem:  When the terminal is very large, test for 9.2.0285 doesn't
          trigger an ASAN error without the fix.
Solution: Use a window with fixed height (zeertzjq)

closes: #19924

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-05 16:45:29 +00:00
zeertzjq
a1f4259e68 patch 9.2.0303: tests: zip plugin tests don't check for warning message properly
Problem:  zip plugin tests may match messages from previous test cases
          when checking for warning message.
Solution: Clear messages at the start of these tests (zeertzjq).

closes: #19926

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-05 16:41:15 +00:00
Christian Brabandt
ab4ebb62ee patch 9.2.0302: runtime(netrw): RFC2396 decoding double escaping spaces
Problem:  runtime(netrw): RFC2396 decoding double escaping spaces
          (lilydjwg, after 3e60f03d94)
Solution: Remove escape() call, since we are using fnameescape() anyhow

fixes: #19913

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-05 16:36:42 +00:00
Hirohito Higashi
f07a1ed903 patch 9.2.0301: Vim9: void function return value inconsistent
Problem:  Vim9: void function return value inconsistent between
          script and :def
Solution: Make void built-in functions like bufload() return void
          consistently (Hirohito Higashi)

In Vim9 script, calling a void built-in function (e.g. bufload()) at the
script level did not set rettv to VAR_VOID, making it appear to return
0. Inside :def it correctly returned VAR_VOID and raised E1031.  Set
rettv to VAR_VOID after calling a ret_void built-in function in Vim9
script so the behavior is consistent.

Also fix the documentation for bufload() and ch_logfile() to correctly
state that the return type is void.

closes: #19919

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-05 16:17:58 +00:00
Christian Brabandt
9e041457a5 patch 9.2.0300: The vimball plugin needs some love
Problem:  The vimball plugin needs some love
          (syndicate)
Solution: Clean-up, refactor and update the plugin,
          in particular, catch path traversal attacks

This change does the following
- Clean up Indentation and remove calls to Decho
- Increase minimum Vim version to 7.4 for mkdir()
- Use mkdir() consistently
- Update Metadata Header
- Remove check for fnameescape()
- Catch path traversal attacks
- Add vimball basic tests
- Remove mentioning of g:vimball_mkdir in documentation

closes: #19921

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-05 16:11:53 +00:00
Christian Brabandt
46f530e517 patch 9.2.0299: runtime(zip): may write using absolute paths
Problem:  runtime(zip): may write using absolute paths
          (syndicate)
Solution: Detect this case and abort on Unix, warn in the documentation
          about possible issues

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-05 15:58:00 +00:00
Carlo Klapproth
5943c57173 runtime(zathurarc): Update page-padding, wrap the zathurarcOption keywords
page-padding was split in page-v-padding and page-h-padding

closes: #19899

Signed-off-by: Carlo Klapproth <6682561+elcarlosIII@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-04 09:22:50 +00:00
Hirohito Higashi
3c79e33aeb patch 9.2.0298: Some internal variables are not modified
Problem:  Some internal variables are not modified
Solution: Add const qualifier to static table data
          (Hirohito Higashi).

Several static arrays that are never modified at runtime were missing the
const qualifier. Add const to move them from .data to .rodata section.

closes: #19901

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-04 09:09:13 +00:00
Yasuhiro Matsumoto
77e7a40af2 patch 9.2.0297: libvterm: can improve CSI overflow code
Problem:  libvterm: can improve CSI overflow code
Solution: Handle overflow cases better (Yasuhiro Matsumoto)

closes: #19903

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-04 09:04:34 +00:00
zeertzjq
18cd55dbc4 patch 9.2.0296: Redundant and incorrect integer pointer casts in drawline.c
Problem:  Currently `colnr_T` and `int` and the same type, so casting
          `int *` to `colnr_T *` is redundant. Additionally, even if
          they are changed to different types in the future, these casts
          are incorrect as they won't work on big-endian platforms.
Solution: Remove the casts. Also fix two cases of passing false instead
          of 0 to an integer argument (zeertzjq).

related: #19672
closes:  #19907

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-04 08:55:59 +00:00
zeertzjq
08bd9114c1 patch 9.2.0295: 'showcmd' shows wrong Visual block size with 'linebreak'
Problem:  'showcmd' shows wrong Visual block size with 'linebreak' after
          end char (after 7.4.467).
Solution: Exclude 'linebreak' from end position. Also fix confusing test
          function names.

closes: #19908

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-04 08:50:46 +00:00
Yee Cheng Chin
22db4a3c57 patch 9.2.0294: if_lua: lua interface does not work with lua 5.5
Problem:  if_lua: lua interface does not work with lua 5.5
          (Lyderic Landry)
Solution: Use the new lua API `luaL_openselectedlibs()`
          (Yee Cheng Chin)

Lua 5.5 removed the API function `openlibs` with `openselectedlibs`,
with `luaL_openlibs` replaced by a macro that just calls the new
`luaL_openselectedlibs` in the headers (see lua/lua@d738c8d18). This
broke Vim's dynamic Lua build as we try to redefine `luaL_openlibs`
ourselves and also this function can no longer be loaded from the lib.
Update the code to use the new API call instead to fix the issue.

fixes:  #19814
closes: #19842
closes: #19909

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-04 08:37:47 +00:00
dependabot[bot]
bd8b6c6b05 CI: Bump codecov/codecov-action
Bumps the github-actions group with 1 update in the / directory: [codecov/codecov-action](https://github.com/codecov/codecov-action).

Updates `codecov/codecov-action` from 5 to 6
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

closes: #19910

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-04 08:35:52 +00:00
zeertzjq
bc182ae56e patch 9.2.0293: :packadd may lead to heap-buffer-overflow
Problem:  :packadd may lead to heap-buffer-overflow when all entries in
          'runtimepath' have the same length (after 9.2.0291).
Solution: Check for comma after current entry properly (zeertzjq).

related: #19854
closes:  #19911

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-04 08:32:33 +00:00
Hirohito Higashi
a9d01da661 patch 9.2.0292: E340 internal error when using method call on void value
Problem:  E340 internal error when using method call on void value
          (Peter Kenny)
Solution: Check for void value (Hirohito Higashi)

Using a method call on a void return value (e.g. "echo F()->empty()"
where F() returns void) caused an internal error E340. Now it properly
reports E1031 or E1186 depending on the context.

Changes:
- eval.c: check for void value before -> method call at runtime
- vim9expr.c: check for void type before -> method call at compile time
- vim9execute.c: check for void value in builtin function arguments and in
  ISN_STORE

fixes:  #19897
closes: #19912

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-04 08:31:21 +00:00
John Marriott
cb51add7ae patch 9.2.0291: too many strlen() calls
Problem:  too many strlen() calls
Solution: refactor concat_fname() and remove calls to strlen()
          (John Marriott)

Function `concat_fnames()` can make up to 5 calls to `STRLEN()` (either
directly or indirectly via `STRCAT()`). In many cases the lengths of
arguments `fname1` and/or `fname2` are either known or can simply be
calculated.

This Commit refactors this function to accept the lengths of arguments
`fname1` and `fname2` as arguments. It also adds new argument `ret` to
return the resulting string as a `string_T`.

Additionally:
- function `add_pack_dir_to_rtp()` in `scriptfile.c`:
   Use a `string_T` to store local variables `new_rtp` and `afterdir`.
   Replace calls to `STRCAT()` with calls to `STRCPY()`.
   Change type of variable `keep` to `size_t` for consistency with
   other lengths.

- function `qf_get_fnum()` in `quickfix.c`:
  Use a `string_T` to store local variables `ptr` and `bufname`
- function `qf_push_dir()` in `quickfix.c`:
  Use a `string_T` to store local variable `dirname`.
  Replace call to `vim_strsave()` with `vim_strnsave()`.

- function `qf_guess_filepath()` in `quickfix.c`:
  Use a `string_T` to store local variable `fullname`.

- function `make_percent_swname()` in `memline.c`:
  Rename some variables to better reflect their use.
  Use a `string_T` to store local variables `d` and `fixed_name`.
  Slightly refactor to remove need to create an extra string.
- function `get_file_in_dir()` in `memline.c`:
  Use a `string_T` to store local variables `tail` and `retval`.
  Move some variables closer to where they are used.

- function `cs_resolve_file()` in `if_cscope.c`:
  Use a `string_T` to store local variable `csdir`.
  Remove one call to `STRLEN()`.

- function `add_pathsep()` in `filepath.c`:
  Refactor and remove 1 call to `STRLEN()`

- function `set_init_xdg_rtp()` in `option.c`:
  Use a `string_T` to store local variable `vimrc_xdg`.

closes: #19854

Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-03 15:14:24 +00:00
Duncan Bowring
b7205b6426 patch 9.2.0290: Amiga: no support for AmigaOS 3.x
Problem:  Amiga: no support for AmigaOS 3.x
Solution: Add support for building Vim on classic AmigaOS 3.x with the
          bebbo cross-compiler and libnix (-noixemul) runtime
          (Duncan Bowring).

The existing Make_ami.mak targets AmigaOS 4 (clib2), AROS, and MorphOS.
This patch adds a fourth target for classic 68k AmigaOS 3.x systems
(A1200, A4000, accelerated A500/A2000) using:
```
  make -f Make_ami.mak UNM=AmigaOS3 BUILD=normal
```

Changes:

os_amiga.c:
- Add 256 KiB __stack cookie for OS3 (conservative for limited RAM)
- Add safe_Lock() wrapper to suppress "Please insert volume" system
  requesters during path probing (benefits all Amiga targets)
- Suppress system requesters globally in mch_init() via pr_WindowPtr=-1
  (Vim probes many paths at startup; Lock()/Open() on non-existent
  volume names triggers blocking system requesters)
- Fix mch_get_host_name() for OS3 (libnix has no gethostname)
- Fix Delay() prototype for non-LATTICE compilers
- Fix nilfh file handle leak on error exit in mch_check_win()

os_amiga.h:
- Add fchown/fchmod/ftruncate no-op stubs for OS3/libnix

os_amiga_stubs.c (new):
- IM function stubs (referenced by optiondefs.h, no X11 on Amiga)
- mch_rmdir() via AmigaDOS DeleteFile()
- getpwuid()/getgrgid()/getuid() stubs (single-user system)

Make_ami.mak:
- Add AmigaOS3 target with -noixemul, -std=gnu99, -DWORDS_BIGENDIAN

blowfish.c:
- Accept WORDS_BIGENDIAN or AMIGA without requiring HAVE_CONFIG_H

xdiff/xmacros.h:
- Make SIZE_MAX fallback unconditional (not just hpux/VMS)

All OS3-specific changes are guarded by:
  #if defined(__GNUC__) && defined(AMIGA) && !defined(__amigaos4__)

Tested on FS-UAE with Workbench 3.1: 23 automated tests passing.
Binary size: 2.2 MiB with -Os -m68020 -DFEAT_NORMAL.

This is the first modern Vim build for classic 68k AmigaOS since
Vim 5.8 circa 1998.  Vim was originally released on the Amiga
(Fred Fish Disk 591, 1991).

closes: #19840

Signed-off-by: Duncan Bowring <duncan@bowring.us>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-03 14:50:07 +00:00
zeertzjq
23be1889d1 patch 9.2.0289: 'linebreak' may lead to wrong Visual block highlighting
Problem:  'linebreak' may lead to wrong Visual block highlighting when
          end char occupies multiple cells (after 7.4.467).
Solution: Exclude 'linebreak' from the ending column instead of setting
          'virtualedit' temporarily (zeertzjq).

fixes:  #19898
closes: #19900

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-03 09:48:49 +00:00
zeertzjq
af58a9f5e9 runtime(doc): adjust :h 'autowrite' and :h 'autowriteall'
- Don't go over 78 columns.
- Change the first "and" to "or", as "or" is used below.
- Change "takes one" to "switches", as "one" may be mistaken as
  referring to the command instead of the user.
- Use backticks in :h 'autowriteall' like in :h 'autowrite'.

closes: #19859

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-03 09:40:23 +00:00
Christian Brabandt
71a0a552cf patch 9.2.0288: libvterm: signed integer overflow parsing long CSI args
Problem:  Accumulating CSI argument digits without an upper bound causes
          signed integer overflow when the argument exceeds LONG_MAX.
Solution: Clamp CSI argument accumulation to CSI_ARG_MISSING to prevent
          signed integer overflow (Yasuhiro Matsumoto).

closes: #19894

Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-03 09:36:56 +00:00
Hannah
863e85e00a patch 9.2.0287: filetype: not all ObjectScript routines are recognized
Problem:  filetype: not all ObjectScript routines are recognized
Solution: Also detect "%RO" and "iris" patterns inside *.rtn files
          (Hannah Kimura)

closes: #19873

Signed-off-by: Hannah Kimura <hannah.kimura@intersystems.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-03 09:14:43 +00:00
Antonio Giovanni Colombo
aca677de0e translation(it): Update Italian translation
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-03 08:47:51 +00:00
Felix Pehla
ff6f277a4d runtime(swayconfig): add additional criteria and hdr
Sway 1.11 added `security_context_v1` metadata as criteria:
 - `sandbox_engine`
 - `sandbox_app_id`
 - `sandbox_instance_id`

Sway 1.12 will add the `tag` criteria for `xdg_toplevel_tag_v1`, as
well as the `hdr` output option (with options `on`, `off`, and
`toggle`).

closes: #19884

Signed-off-by: Felix Pehla <29adc1fd92@gmail.com>
Signed-off-by: James Eapen <james.eapen@vai.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-03 08:43:53 +00:00
Yasuhiro Matsumoto
28e75c5f31 patch 9.2.0286: still some unnecessary (int) casts in alloc()
Problem:  still some unnecessary (int) casts in alloc()
Solution: Remove more unnecessary (int) casts before alloc() calls
          (Yasuhiro Matsumoto).

Follow-up to patch 9.2.0283. Remove remaining (int) casts in
vim9script.c and netbeans.c.

vim9script.c: lengths are derived from STRLEN() on file paths,
bounded by PATH_MAX. netbeans.c: all operands are already int,
so the (int) cast is redundant and no truncation can occur.

related: #19888
closes:  #19893

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-03 08:39:11 +00:00
zeertzjq
b7cffc8434 patch 9.2.0285: :syn sync grouphere may go beyond end of line
Problem:  :syn sync grouphere may go beyond end of line.
Solution: Start searching for the end of region at the end of match
          instead of a possibly invalid position (zeertzjq).

closes: #19896

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-03 08:30:40 +00:00
Peter Kenny
880cf88ea6 runtime(doc): Various fixes for ft_rust.txt (tw78, grammar, spaces)
closes: #19887

Signed-off-by: Peter Kenny <github.com@k1w1.cyou>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-03 08:29:09 +00:00
Christian Brabandt
9d83ca5ca2 runtime(preproc_indent): Ignore Swapfiles when loading buffers
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-02 17:53:30 +00:00
Christian Brabandt
b2fbb7c32d patch 9.2.0284: tabpanel: crash when tabpanel expression returns variable line count
Problem:  When a tabpanel expression returns a different number of lines on
          successive evaluations, the computed row offset can become negative,
          causing screen_fill() to receive an invalid start_row and crash
          (after v9.1.1391).
Solution: Clamp the row argument in screen_fill_tailing_area() to zero,
          add a safety check in screen_fill() for negative start_row
          (Michał Majchrowicz)

Supported by AI

Co-authored-by: Michał Majchrowicz <mmajchrowicz@afine.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-02 17:37:58 +00:00
Aliaksei Budavei
12f6f20552 runtime(sh): Keep function name patterns engine neutral
Request less backtracking to function-name candidates for
nonlinear patterns with any regexp engine BUT force using
the old engine with these patterns to avoid incurring an
additional penalty, according to ":syntime report", when the
new regexp engine is preferred.

fixes:  #19847
closes: #19849

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-02 16:59:28 +00:00
Yasuhiro Matsumoto
964b7b5d7b patch 9.2.0283: unnecessary (int) casts before alloc() calls
Problem:  unnecessary (int) casts before alloc() calls, can cause
          truncation and heap overflows (sgInnora)
Solution: Remove casts (Yasuhiro Matsumoto)

alloc() already accepts size_t, so (int) casts on size_t values are
redundant and could theoretically cause truncation on values > INT_MAX.

Remove the casts and change alloc_cmdbuff() signature from int to
size_t to match.

Note: list_alloc_with_items() keeps its int parameter since lv_len and
lv_with_items are int, and the call site already has an INT_MAX guard.

fixes:  #19888
closes: #19889

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-02 16:41:01 +00:00
Hirohito Higashi
0646047b68 runtime(doc): clarify term_start() I/O behavior for Unix pty and MS-Windows ConPTY
Explain how stdin/stdout/stderr are connected in term_start():
- On Unix, they default to pty; only "err_cb" switches stderr to a pipe,
  which may cause output order differences due to buffering.
- On MS-Windows with ConPTY, they are always pipes and stdout/stderr
  share the same pipe, so "err_cb" cannot separate them.

related: #16354

Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-02 16:36:48 +00:00
Yasuhiro Matsumoto
b2ff915fe4 patch 9.2.0282: tests: Test_viminfo_len_overflow() fails
Problem:  tests: Test_viminfo_len_overflow() fails
Solution: Catch E342 (Yasuhiro Matsumoto).

Test_viminfo_len_overflow tries to allocate ~4GB, which may throw E342
(out of memory) depending on the platform's memory allocation behavior.
This is an acceptable outcome since the test's purpose is to verify
that Vim does not crash on a crafted viminfo entry.

closes: #19891

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-02 16:30:05 +00:00
Yasuhiro Matsumoto
c91081d0e5 patch 9.2.0281: tests: Test_netrw_FileUrlEdit.. fails on Windows
Problem:  tests: Test_netrw_FileUrlEdit.. fails on Windows
          (after 3e60f03d94)
Solution: Skip the test on Windows (Yasuhiro Matsumoto).

The Test_netrw_FileUrlEdit_pipe_injection() test fails on Windows with
E303 because '|' is not a valid filename character on Windows.  Since
the pipe character cannot appear in a Windows filename, the command
injection vector this test guards against does not apply on Windows.

closes: #19890

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-02 16:22:42 +00:00
Christian Brabandt
7088926316 patch 9.2.0280: [security]: path traversal issue in zip.vim
Problem:  [security]: path traversal issue in zip.vim
          (Michał Majchrowicz)
Solution: Detect more such attacks and warn the user.

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-jc86-w7vm-8p24

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-01 16:23:49 +00:00
Christian Brabandt
fe05143f5d patch 9.2.0279: terminal: out-of-bounds write with overlong CSI argument list
Problem:  libvterm CSI parser does not bounds-check argi against
          CSI_ARGS_MAX, allowing excess ';'-separated arguments to
          write past the end of the args array (sentinel404).
Solution: Drop excess arguments.

Supported by AI

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-01 15:36:23 +00:00
Christian Brabandt
b2e55ed1d6 patch 9.2.0278: viminfo: heap buffer overflow when reading viminfo file
Problem:  Reading a crafted viminfo file can cause a heap buffer
          overflow because the length value from getdigits() is cast to
          int, truncating large size_t values
Solution: Remove the (int) cast when calling alloc() (sentinel404)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-01 15:06:21 +00:00
Christian Brabandt
3e60f03d94 runtime(netrw): use fnameescape() with FileUrlEdit()
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-01 14:47:16 +00:00
Christian Brabandt
2c976d0de4 SECURITY.md: clarify the use of AI
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-01 10:33:42 +00:00
Christian Brabandt
82ebaa79b0 runtime(racket): Make visual K mapping more robust for shell injection
fyi @benknoble

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-01 08:10:15 +00:00
zeertzjq
8c8772c6b3 patch 9.2.0277: tests: test_modeline.vim fails
Problem:  tests: test_modeline.vim fails (after v9.2.0276)
Solution: Rewrite the tests to use the existing s:modeline_fails()
          function, update documentation (zeertzjq).

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-01 07:33:46 +00:00
Eisuke Kawashima
52169dbc28 translation(cleanup): squeeze successive empty lines and remove stray comments
closes: #19860

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-31 19:12:36 +00:00
Christian Brabandt
75661a66a1 patch 9.2.0276: [security]: modeline security bypass
Problem:  [security]: modeline security bypass
Solution: disallow mapset() from secure mode, set the P_MLE flag for the
          'complete', 'guitabtooltip' and 'printheader' options.

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-8h6p-m6gr-mpw9

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-31 18:29:00 +00:00
Christian Brabandt
4cc3ab7401 patch 9.2.0275: tests: test_options.vim fails
Problem:  tests: test_options.vim fails
          (after v9.2.0273)
Solution: allow column value of 0

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-31 17:44:00 +00:00
Yasuhiro Matsumoto
309332a32e patch 9.2.0274: BSU/ESU are output directly to the terminal
Problem:  BSU/ESU are output directly to the terminal
Solution: Route them through out_buf() and flush the output directly,
          increase the OUT_SIZE terminal buffer (Yasuhiro Matsumoto)

Route synchronized-output control sequences through out_buf and flush
explicitly at protocol boundaries, instead of forcing BSU/ESU through
ui_write() directly.

Also increase the terminal output buffer from 2047 to 8191 bytes so
large redraws are emitted in fewer writes.

The important guarantee here is terminal-visible ordering: BSU must
reach the terminal before the batched redraw bytes, ESU must reach the
terminal after them, and FLUSH must emit ESU and BSU together, then
flush immediately.

Benchmark: PTY redraw workload with TERM=xterm-256color, long wrapped
lines, cursorline, listchars, horizontal scrolling, and repeated redraw!.

write syscalls: 8514 -> 5094 (-40.2%)
wall time: 0.568s -> 0.495s (-12.9%) on valid runs in this environment

closes: #19862

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-31 16:34:23 +00:00
Christian Brabandt
ac18dff65a patch 9.2.0273: tabpanel: undefined behaviour with large tabpanelop columns
Problem:  tabpanel: undefined behaviour with large tabpanelop columns
          (Michał Majchrowicz)
Solution: Error out for too large column values

Co-authored-by: Michał Majchrowicz <mmajchrowicz@afine.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-31 16:13:25 +00:00
RestorerZ
e4502b6037 translation(ru): updated lang/README.ru.txt
closes: #19865

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-31 15:51:32 +00:00
RestorerZ
f4f175332c translation(ru): updated the Russian man page the xxd
closes: #19867

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-31 15:49:44 +00:00
Thomas Braun
12c6417587 runtime(sshconfig): Add missing kex algorithm
These are available already with openssh 10.2p1.

closes: #19864

Signed-off-by: Thomas Braun <thomas.braun@byte-physics.de>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-31 15:46:04 +00:00
Christian Brabandt
374f06ffd8 runtime(racket): Use shellescape() to harden the K mapping
fyi: @benknoble

Co-authored-by: Michał Majchrowicz <mmajchrowicz@afine.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-31 15:38:30 +00:00
zeertzjq
b5efce0765 Fix a few typos in tests
closes: #19871

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-31 15:20:08 +00:00
Christian Brabandt
e551e71d7e runtime(tera): use fnameescape() when loading separate syntax files
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-31 15:04:48 +00:00
RestorerZ
70afdfc127 translation(ru): updated translations
closes: #19868

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-30 10:32:10 +00:00
Christian Brabandt
068c0604c9 runtime(rustfmt): not correctly escaping directory names
Problem:  runtime(rustfmt): not correctly escaping directory names
Solution: Use fnamescape() (Michał Majchrowicz)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-30 10:18:35 +00:00
Christian Brabandt
91900b9a5c runtime(vimgoto): Not correctly escaping the filanems
Problem:  runtime(vimgoto): not correctly escaping the filenames
Solution: Use fnamescape() (Michał Majchrowicz)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-30 10:15:19 +00:00
Christian Brabandt
aa5c9310f5 runtime(typeset): Use fnameescape() for the :lcd command
Problem:  runtime(typeset) does not escape the detected directory
Solution: Use fnameescape() (Michał Majchrowicz)

fyi @lifepillar

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-30 10:12:03 +00:00
Christian Brabandt
84a8ee4353 runtime(context): use fnameescape() for the Log command
Problem:  runtime(context) does not escape the detected log file
Solution: Use fnameescape() (Michał Majchrowicz)

fyi @lifepillar

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-30 09:58:07 +00:00
Christian Brabandt
664701eb75 patch 9.2.0272: [security]: 'tabpanel' can be set in a modeline
Problem:  'tabpanel' can be set in a modeline
Solution: Set the P_MLE flag for the 'tabpanel' option, disable
          autocmd_add()/autocomd_delete() functions in restricted/secure
          mode.

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-2gmj-rpqf-pxvh

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-30 08:50:10 +00:00
Koda Reef
3c0f8000e1 patch 9.2.0271: buffer underflow in vim_fgets()
Problem:  buffer underflow in vim_fgets()
Solution: Ensure size is always greater than 1
          (Koda Reef)

Signed-off-by: Koda Reef <kodareef5@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-29 15:30:11 +00:00
Paul Ollis
211ceea602 patch 9.2.0270: test: trailing spaces used in tests
Problem:  test: trailing spaces used in tests
Solution: Rewrite tests to avoid trailing spaces (Paul Ollis).

Some tests currently rely on trailing whitespace at the end of lines,
escaped with '\'. I have demonstrated in another PR, such spaces can be
inadvertently removed and this is difficult to spot.

Note: there are more trailing spaces in a few more test files, see
testdir/test_codestyle.vim. Those are not yet removed.

closes: #19838

Signed-off-by: Paul Ollis <paul@cleversheep.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-29 14:21:11 +00:00
Christian Brabandt
b8a653a377 patch 9.2.0269: configure: Link error on Solaris
Problem:  configure: Link error on Solaris
          (idgn23, after v9.2.0153)
Solution: Move the check for the nsl library a bit earlier,
          regenerate configure

fixes: #19803

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-29 14:00:51 +00:00
Huihui Huang
30bac359dc patch 9.2.0268: memory leak in call_oc_method()
Problem:  memory leak in call_oc_method()
Solution: Clean up argvars in the failure case
          (Huihui Huang)

closes: #19828

Signed-off-by: Huihui Huang <625173@qq.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-29 13:56:42 +00:00
rendcrx
466b5f531a patch 9.2.0267: 'autowrite' not triggered for :term
Problem:  'autowrite' not triggered for :term
Solution: Trigger autowrite for :term command
          (rendcrx)

closes: #19855

Signed-off-by: rendcrx <974449413@qq.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-29 09:22:48 +00:00
Yasuhiro Matsumoto
8ea5f27745 patch 9.2.0266: typeahead buffer overflow during mouse drag event
Problem:  typeahead buffer overflow during mouse drag event
Solution: Change the guard from 5 to 10 to account for the worst case
          (Yasuhiro Matsumoto).

The typeahead buffer guard in mch_inchar() only reserved 5 bytes per
iteration, but a mouse event writes up to 7 bytes (3 header + 4
coordinates) and a scroll event with modifiers writes up to 10 bytes
(3 modifier + 3 scroll + 4 coordinates).  During fast mouse dragging,
3+ events could queue up and overflow the 20-byte buffer, corrupting
adjacent static variables and causing garbage bytes (including Ctrl-Z)
to be fed into the input stream, which triggered nv_suspend/ex_stop.

closes: #19851

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-29 09:15:14 +00:00
thinca
f89662722d patch 9.2.0265: unnecessary restrictions for defining dictionary function names
Problem:  unnecessary restrictions for defining dictionary function
          names
Solution: Allow defining dict function with bracket key that is not a
          valid identifier (thinca)

In Vim script, "function obj.func()" and "function obj['func']()" both
define a dictionary function.  However, the bracket form required the
key to match function naming rules (eval_isnamec), so
"function obj['foo-bar']()" failed with E475.

Assigning and calling already work: "let obj['foo-bar'] = obj.func"
and "call obj['foo-bar']()" are valid.  Only the definition was
incorrectly restricted.

Skip the identifier check when the name comes from fd_newkey (i.e. the
key was given in bracket notation).  Dictionary keys may be any string.

Supported by AI

closes: #19833

Signed-off-by: thinca <thinca@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-28 10:07:27 +00:00
Julio B
d13f135295 patch 9.2.0264: Cannot disable kitty keyboard protocol in vim :terminal
Problem:  Cannot disable kitty keyboard protocol in vim :terminal
Solution: Handle "CSI <u" sequence in libvterm (Julio B).

related: v9.0.0930
closes: #19837

Signed-off-by: Julio B <julio.bacel@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-28 10:01:38 +00:00
Yasuhiro Matsumoto
8e29c35a04 patch 9.2.0263: hlset() cannot handle attributes with spaces
Problem:  hlset() cannot handle attributes with spaces
Solution: Handle attributes with spaces by quoting those
          (Yasuhiro Matsumoto).

hlset(hlget('Normal')) fails with E416 when a highlight attribute value
contains spaces (e.g. font name "Monospace 10"). hlg_add_or_update()
builds a string like "font=Monospace 10" and passes it to do_highlight(),
whose parser splits on whitespace and treats "10" as a separate key
without "=".

Fix by quoting values with single quotes (e.g. font='Monospace 10')
when the value contains spaces and the attribute is a key=value pair.
do_highlight() already supports single-quoted values.

closes: #19843

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-28 09:47:15 +00:00
Pierluigi Lenoci
80a0c355cf patch 9.2.0262: invalid lnum when pasting text copied blockwise
Problem:  invalid lnum when pasting text copied blockwise
          (KillTheMule)
Solution: Subtract nr_lines from curwin->w_cursor.lnum when calling
          changed_lines() in do_put() (Pierluigi Lenoci)

When doing a blockwise paste beyond the end of the buffer, new lines are
appended and nr_lines is incremented accordingly. However, the
changed_lines() call used curwin->w_cursor.lnum as the "lnume" argument
(the first line below the changed lines BEFORE the change), which is
incorrect because the cursor has already been moved past the newly
appended lines.

Fix by subtracting nr_lines from curwin->w_cursor.lnum, so that lnume
correctly reflects the state before the change, as documented in
changed_lines().

Add a listener test to verify the correct values are reported.

Port of neovim/neovim#12733.

fixes:  #6660
closes: #19844

Signed-off-by: Pierluigi Lenoci <pierluigi.lenoci@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-27 15:49:27 +00:00
Yasuhiro Matsumoto
54b6c0c0e7 patch 9.2.0261: terminal: redraws are slow
Problem:  terminal: redraws are slow (Mao-Yining)
Solution: Disable redrawing in handle_movecursor()
          (Yasuhiro Matsumoto)

handle_movecursor callback was calling update_cursor() with redraw=TRUE
on every cursor move inside vterm_input_write(). This triggered
gui_mch_flush() (GdiFlush + DWriteContext_Flush) and TextChangedT
autocmd for each cursor move. ConPTY output contains ~17 cursor moves
per 4KB chunk, each flush taking ~5ms, resulting in 80-110ms per chunk.

Fix by passing FALSE to update_cursor() in handle_movecursor since
write_to_term() already calls update_cursor() with proper redraw after
vterm_input_write() finishes.

Also set vterm_screen_set_damage_merge() to VTERM_DAMAGE_SCROLL so that
damage callbacks are buffered until vterm_screen_flush_damage() instead
of being emitted per cell.

fixes:  #19845
closes: #19846

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-26 22:12:52 +00:00
Yasuhiro Matsumoto
575961c791 patch 9.2.0260: statusline not redrawn after closing a popup window
Problem:  When a popup window overlapping a status line is closed or
          hidden, the status line is not redrawn, leaving ghost
          artifacts from the popup.
Solution: popup_free() and popup_hide() call
          redraw_all_later(UPD_NOT_VALID) which marks window contents
          for redraw but does not set w_redr_status. The diff-based path
          in may_update_popup_mask() that normally sets w_redr_status
          is skipped when redrawing_all_win is TRUE. Add status_redraw_all
          calls to ensure status lines are properly redrawn
          (Yasuhiro Matsumoto).

closes: #19830

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-26 21:19:34 +00:00
Yasuhiro Matsumoto
f6e1dd11f4 patch 9.2.0259: tabpanel: corrupted display during scrolling causing flicker
Problem:  tabpanel: corrupted tabpanel during scrolling causing flicker
Solution: When the tabpanel is visible, force a line-by-line redraw in
          win_do_lines() similarly to popup handling (Yasuhiro Matsumoto).

When a vertical tabpanel is visible, terminal scroll operations in
win_do_lines() affect the full screen width, corrupting the tabpanel
area. The tabpanel is then redrawn via redraw_tabpanel, causing visible
flicker. Return FAIL to force line-by-line redraw instead, analogous to
the existing popup_visible check.

closes: #19832

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-26 21:03:46 +00:00
Huihui Huang
b90145672d patch 9.2.0258: memory leak in add_mark()
Problem:  memory leak in add_mark()
Solution: Free lpos in the error case when it hasn't been added to the
          dict yet (Huihui Huang)

closes: #19827

Signed-off-by: Huihui Huang <625173@qq.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-26 20:59:03 +00:00
Shane Harper
02abcf381f patch 9.2.0257: unnecessary memory allocation in set_callback()
Problem:  Unnecessary memory allocation in set_callback(); after
          set_callback(), callers must manually free the source
          callback's name if cb_free_name is set.
Solution: Refactor set_callback() to re-use the callback name when
          possible to avoid extra memory allocations and clean up so the
          callers do not have to take care themselves (Shane Harper).

closes: #19831

Signed-off-by: Shane Harper <shane@shaneharper.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-26 20:46:52 +00:00
zeertzjq
06aa378056 patch 9.2.0256: visual selection size not shown in showcmd during test
Problem:  The visual selection size is not displayed in the showcmd area
          when entering visual mode from a script or mapping, because
          char_avail() incorrectly reports input as pending. This causes
          test failure on CI with the ASAN CI runner.
Solution: Replace char_avail() with explicit checks for an empty stuff
          buffer, empty typeahead buffer, and not running a script
          (zeertzjq).

related: #19801
closes:  #19824

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-26 20:38:39 +00:00
Christian Brabandt
96898d7324 patch 9.2.0255: tests: Test_popup_opacity_vsplit() fails in a wide terminal
Problem:  tests: Test_popup_opacity_vsplit() fails in a wide terminal
          (after v9.2.0230)
Solution: Reduce terminal window size to 60, force termguicolors to make
          the opacity visible; enable termguicolors so that the opacity
          is visually apparent in the screen dump.

related: #19824

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-26 20:35:34 +00:00
Sean Dewar
7cb43f286e patch 9.2.0254: w_locked can be bypassed when setting recursively
Problem:  w_locked can be bypassed when recursively set if not restored
          to its prior value.
Solution: Rather than save/restore everywhere, just make it a count,
          like other locks (Sean Dewar)

Requires the previous commit, otherwise b_nwindows will be wrong in
tests, which causes a bunch of weird failures.

closes: #19728

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-26 20:27:56 +00:00
Sean Dewar
bf21df1c7b patch 9.2.0253: various issues with wrong b_nwindows after closing buffers
Problem:  close_buffer() callers incorrectly handle b_nwindows,
          especially after nasty autocmds, allowing it to go
          out-of-sync.  May lead to buffers that can't be unloaded, or
          buffers that are prematurely freed whilst displayed.
Solution: Modify close_buffer() and review its callers; let them
          decrement b_nwindows if it didn't unload the buffer.  Remove
          some now unneeded workarounds like 8.2.2354, 9.1.0143,
          9.1.0764, which didn't always work (Sean Dewar)

close_buffer() now doesn't decrement b_nwindows when not unloading buf, or when
buf isn't w_buffer after autocmds (they would've already decremented it).
Callers are now expected to decrement b_nwindows if w_buffer is not NULL after
close_buffer(), and when still intending to switch buffers or close win, for two
reasons:
- close_buffer() autocmds may have switched buffers.  The new w_buffer's
  b_nwindows would also need decrementing.
- After close_buffer(), callers may opt to not switch w_buffer or close win.
  b_nwindows would need to be incremented again.  (unless w_buffer is NULL from
  being unloaded; callers are already forced to find a new buffer then)
These were the main causes of b_nwindows bugs, as these cases could not be
reliably detected, and went largely unhandled.

NOTE: if close_buffer() autocmds switch buffers, close_buffer() is not called
for that new buffer before decrementing b_nwindows.  This may skip side-effects
like from 'bufhidden', but I think it's mostly harmless, and was already
happening in other places.

Let's see how this goes...  Other details: (I have lots to say!)

It's OK to pass a win to close_buffer() that isn't showing buf (used by
set_curbuf()).  In that case, we skip some side-effects and don't decrement
b_nwindows, but may still unload buf if hidden.

buf_freeall() now returns whether it freed anything.  Removes some repeated
checks in close_buffer().

Preserve close_buffer()'s behaviour when called by win_free_popup() after its
popup was already removed from the window list.  This made win_valid_any_tab()
return FALSE, so we skip things that originally checked it in that case.

Add "set_context" to close_buffer() to preserve do_ecmd()'s behaviour of only
setting b_last_cursor and/or calling buflist_setfpos() when not splitting
(see 7.2.041: https://groups.google.com/g/vim_dev/c/ZGgNvaylNzI/m/WHxjhnuxqB0J)
Without this, Test_marks_cmd() fails from its ' mark differing.  Don't use
oldwin though; it's not always the window with the closed buf, especially
after BufLeave autocmds in do_ecmd().  Also, only set context if win is really
displaying buf.

Don't bail in do_ecmd() if buf was deleted but curwin->w_buffer is NULL; that
leaves curwin open to a NULL buffer!  Use lastbuf instead, like set_curbuf().
I don't think it's possible for buf to be deleted by close_buffer() anyway, as
b_locked was set (which I can't see a way to bypass, unlike b_locked_split).
Maybe such checks can be removed, but I'd rather not risk that here.

Don't set curwin to previouswin in set_curbuf(); shouldn't be needed, otherwise
may lead to curbuf != curwin->w_buffer if autocmds switch to a window showing
buf, as that skips enter_buffer()?  Was introduced back in 7.3.557 to avoid
cases where autocmds switch windows, possibly leaving previouswin with a NULL
buffer.  Since 7.4.2312 and 7.4.2328, close_buffer() and buf_freeall() already
handles this.  I've added an assert() as a sanity check anyway.

In free_all_mem(), set b_nwindows to 0 before close_buffer() so buffers can be
wiped if still in a window before win_free_all().  Needed as close_buffer() now
skips unloading buffers that aren't hidden if win is NULL.  If it's possible for
free_all_mem()'s :tabonly! and :only! to not close all windows before freeing,
then this issue was also previously possible if b_nwindows > 1.

related: #19728

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-26 20:27:47 +00:00
Sean Dewar
a8fdfd4fcb patch 9.2.0252: Crash when ending Visual mode after curbuf was unloaded
Problem:  if close_buffer() in set_curbuf() unloads curbuf, NULL pointer
          accesses may occur from enter_buffer() calling
          end_visual_mode(), as curbuf is already abandoned and possibly
          unloaded.  Also, selection registers may not contain the
          selection with clipboard+=autoselect(plus).
Solution: Move close_buffer()'s end_visual_mode() call to buf_freeall(), after
          any autocmds that may restart it, but just before freeing anything
          (Sean Dewar)

related: #19728

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-26 20:05:31 +00:00
Yasuhiro Matsumoto
68b3585e1d patch 9.2.0251: Link error when building without channel feature
Problem:  Compile error when building without channel feature
          (John Marriott, after v9.2.0250)
Solution: Update ifdefs and move implementation out of FEAT_JOB_CHANNEL
          (Yasuhiro Matsumoto)

Move build_argv_from_list() and mch_get_cmd_output_direct() out of
FEAT_JOB_CHANNEL guards so that system() with a List argument works
in builds that have FEAT_EVAL but not FEAT_JOB_CHANNEL (e.g.
FEAT_NORMAL without GUI).

related: #19791
closes:  #19826

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-26 19:32:49 +00:00
Ola Söder
c84526dd29 runtime(amiga): revamp syntax highlighting and add new maintainer
closes: #19825

Signed-off-by: Ola Söder <rolfkopman@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-26 19:25:30 +00:00
Antonio Giovanni Colombo
be7ef8a19e translation(it): Update Italian xxd man page
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-25 22:11:55 +00:00
Antonio Giovanni Colombo
e09000a786 runtime(doc): Update examples in xxd.1 manpage
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-25 22:10:09 +00:00
Yasuhiro Matsumoto
30f012d8bc patch 9.2.0250: system() does not support bypassing the shell
Problem:  system() and systemlist() only accept a String, requiring
          manual shell escaping for arguments with special characters.
Solution: Accept a List as the first argument and execute the command
          bypassing the shell (Yasuhiro Matsumoto).

fixes:  #19789
closes: #19791

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-25 22:04:13 +00:00
Foxe Chen
bde5832216 patch 9.2.0249: clipboard: provider reacts to autoselect feature
Problem:  clipboard: provider reacts to autoselect feature
Solution: Disable autoselection when using clipboard provider feature
          (Foxe Chen).

closes: #19812

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-25 21:30:59 +00:00
Yasuhiro Matsumoto
af3ccc2845 patch 9.2.0248: json_decode() is not strict enough
Problem:  json_decode() accepted keywords case-insensitively, violating
          RFC 7159. Both json_decode() and js_decode() silently accepted
          lone surrogates, which are invalid Unicode.
Solution: Only allow lowercase keyword in json_decode(), reject lone
          surrogates, improve encoding performance in write_string() and
          blob byte serialization.

1. Fix surrogate pair range check (0xDFFF -> 0xDBFF) so only high
   surrogates trigger pair decoding. Reject lone surrogates that do
   not form a valid pair instead of producing invalid UTF-8.
2. Use case-sensitive matching for JSON keywords (true, false, null,
   NaN, Infinity) in json_decode() per RFC 7159. js_decode() retains
   case-insensitive behavior.
3. Replace double ga_append() calls for escape sequences with single
   GA_CONCAT_LITERAL() calls, halving function call and buffer growth
   check overhead.
4. Replace vim_snprintf_safelen() for blob byte encoding (0-255) with
   direct digit conversion.

closes: #19807

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-25 21:20:21 +00:00
Hirohito Higashi
c0f0a34ea3 patch 9.2.0247: popup: popups may not wrap as expected
Problem:  popup: popups may not wrap as expected
          (Enrico Maria De Angelis, after v9.1.0949)
Solution: don't shift popupwin left when 'wrap' is on and maxwidth is
          set (Hirohito Higashi)

When a non-fixed popup with 'wrap' enabled and an explicit maxwidth was
placed near the right edge of the screen, the shift-left logic increased
maxwidth beyond the user-specified value, preventing text from wrapping.

Instead cap the shift amount so that maxwidth does not exceed w_maxwidth
when wrapping is enabled, letting text wrap as expected.

fixes:  #19767
closes: #19809

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-25 20:12:28 +00:00
Huihui Huang
418400075a patch 9.2.0246: memory leak in globpath()
Problem:  memory leak in globpath()
Solution: Free the individual allocated strings when ga_grow() fails
          (Huihui Huang)

closes: #19817

Signed-off-by: Huihui Huang <625173@qq.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-25 19:51:42 +00:00
Hirohito Higashi
1578ea9d97 patch 9.2.0245: xxd: color output detection is broken
Problem:  xxd: color output detection is broken
          (Juergen Weigert)
Solution: Fix the issues (Hirohito Higashi)

- Disable auto color when output goes to a file (two-argument form)
- Check TERM variable: disable color when unset, empty or "dumb"
- Add color_forced flag to preserve -R always behavior
- Add tests for the new behavior

fixes:  #19790
closes: #19813

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-25 19:38:51 +00:00
Huihui Huang
e2cf84d0a0 patch 9.2.0244: memory leak in eval8()
Problem:  memory leak in eval8()
Solution: Free type_list() even when evaluate is FALSE
          (Huihui Huang)

closes: #19819

Signed-off-by: Huihui Huang <625173@qq.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-25 19:26:38 +00:00
Huihui Huang
0effd2faf9 patch 9.2.0243: memory leak in change_indent()
Problem:  memory leak in change_indent()
Solution: Free orig_line in the error case
          (Huihui Huang)

closes: #19820

Signed-off-by: Huihui Huang <625173@qq.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-25 19:18:20 +00:00
Huihui Huang
a4c0119786 patch 9.2.0242: memory leak in check_for_cryptkey()
Problem:  memory leak in check_for_cryptkey()
Solution: Free cryptkey if it had been allocated
          (Huihui Huang)

closes: #19821

Signed-off-by: Huihui Huang <625173@qq.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-25 19:11:13 +00:00
Christian Brabandt
742e8722b3 patch 9.2.0241: tests: Test_visual_block_hl_with_autosel() is flaky
Problem:  tests: Test_visual_block_hl_with_autosel() is flaky on ASAN CI
          (after v9.2.0221)
Solution: Add a TermWait() call

related: #19784

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-25 19:03:50 +00:00
Yasuhiro Matsumoto
b435da0b4f patch 9.2.0240: syn_name2id() is slow due to linear search
Problem:  Looking up highlight group names uses a linear scan of the
          highlight table, which is slow at startup when many groups
          are defined.
Solution: Use a hashtable for O(1) highlight group name lookup.
          (Yasuhiro Matsumoto).

Benchmark (523 highlight groups, :highlight + highlight link + syntax
keyword + hlID() + redraw, 20 iterations):

master:      0.057 sec (~295,000 ops/sec)
this branch: 0.036 sec (~463,000 ops/sec)
speedup:     ~1.57x

closes: #19788

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-24 20:47:27 +00:00
Aliaksei Budavei
955c02dff7 runtime(sh): Distinguish parts of function definitions
- Highlight keywords "function" and "namespace" with
  the "Keyword" group ("shFunctionKey").
- Highlight function body delimiters "{" and "}" with the
  "Delimiter" group ("shFunctionExprRegion").
- Highlight function body delimiters "(" and ")" with the
  "Operator" group ("shFunctionSubShRegion").
- Also, follow one style in folding all supported variants
  of function bodies for grouping commands too by enclosing
  a delimited function body, e.g. "{" and "}", in a fold and
  leaving its function header, e.g. "function f()", out of
  it when the header is written on a separate line.

To restore previous colouring, add to "after/syntax/sh.vim":
------------------------------------------------------------
hi link shFunctionKey Function
hi link shFunctionExprRegion Function
hi link shFunctionSubShRegion Function
------------------------------------------------------------

fixes:  https://github.com/vim/vim/pull/19638#issuecomment-4052635546
closes: #19638

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-24 20:36:23 +00:00
Aliaksei Budavei
9c0d057e3d runtime(sh): Improve the matching of function definitions
- Drop the remaining undefined "shFunctionStart" references
  (gone in v7.2b.000, c236c16d0).
- Revise nestable contexts where function definitions are
  supported:
  * Stop looking for function definitions in arithmetic
    expressions.
  * Recognise function definitions enclosing other function
    definitions.
- In addition to grouping commands "{}" and "()", also match
  other compound commands (e.g. "if"; see "shFunctionCmd*")
  whenever these commands are supported as complete function
  bodies.
- Balance body delimiters "(" and ")" for "shFunctionFour"
  in Bash; match such function bodies whenever the use of
  the function parameter list "()" token is optional, i.e.
  when the "function" reserved word is present.
- Enable the use of "shFunctionFour" definitions.
- Do not claim optional leading whitespace characters before
  a matched function definition.
- Prefer patterns with ASCII atoms (e.g. "\h") to equivalent
  collections (e.g. "[A-Za-z_]") for speed.
- Accommodate word-boundary assertions in function name
  patterns to names that may start and/or end with supported
  non-word characters, e.g. "@test:".
- Match more valid function names in Bash: non-ASCII names,
  non-word names.
- Allow for function names with "do", "done", etc. prefixes;
  confine these name checks to "shDoError" and "shIfError".

fixes:   #19619
related: #19638

References:
https://pubs.opengroup.org/onlinepubs/9799919799/utilities/V3_chap02.html#tag_19_09_04
https://gitweb.git.savannah.gnu.org/gitweb/?p=bash.git;a=blob_plain;f=doc/bash.html;hb=637f5c8696a6adc9b4519f1cd74aa78492266b7f
https://web.archive.org/web/20151105130220/http://www.research.att.com/sw/download/man/man1/ksh88.html
https://web.archive.org/web/20151025145158/http://www2.research.att.com/sw/download/man/man1/ksh.html
http://www.mirbsd.org/htman/i386/man1/mksh.htm

Co-authored-by: Johnothan King <johnothanking@protonmail.com>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-24 20:35:48 +00:00
Yasuhiro Matsumoto
4292eea714 patch 9.2.0239: signcolumn may cause flicker
Problem:  Changing the 'signcolumn' may cause flicker, because it uses
          the P_RCLR flag for redrawing (Yggdroot)
Solution: Change 'signcolumn' to use P_RWIN instead of P_RCLR, matching
          the behavior of 'number' and 'foldcolumn'
          (Yasuhiro Matsumoto).

fixes:  #19663
closes: #19713

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-24 20:25:06 +00:00
Hirohito Higashi
9a2260d6cf patch 9.2.0238: showmode message may not be displayed
Problem:  showmode message may not be displayed (Yee Cheng Chin)
Solution: Don't call char_avail() in skip_showmode(), but check
          for anything in the stuff and typeahead buffer
          (Hirohito Higashi).

Fix "-- VISUAL --" not shown when terminal responses are pending

When starting Vim with a script that enters Visual mode (e.g.
"vim -S script.vim"), the "-- VISUAL --" mode message sometimes
doesn't appear. This happens because skip_showmode() calls
char_avail(), which reads raw terminal input and picks up terminal
response escape sequences (e.g. t_RV response). Combined with
!KeyTyped (which is TRUE after script execution), this causes
skip_showmode() to return TRUE, preventing the mode from being
displayed.

Fix this by checking only the stuff buffer and typeahead buffer for
pending characters, instead of char_avail() which also reads raw
terminal input. This way, terminal response sequences no longer
interfere with mode display.

fixes:  #16620
closes: #19801

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-24 20:11:07 +00:00
Hannah Kimura
25f6539645 patch 9.2.0237: filetype: ObjectScript routines are not recognized
Problem:  filetype: ObjectScript routines are not recognized
Solution: Add ObjectScript routines detection for .mac, .int, and .inc
          files (Hannah Kimura)

Reference:
https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GORIENT_ch_intro#GORIENT_intro_routines

closes: #19805

Signed-off-by: Hannah Kimura <hannah.kimura@intersystems.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-24 19:58:01 +00:00
Yasuhiro Matsumoto
a603175c6c runtime(manpager): use \x07 instead of \a for BEL in OSC 8 regex
\a in Vim's regex matches [A-Za-z], not the BEL character (0x07).
This caused the OSC 8 hyperlink stripping pattern to incorrectly
match alphabetic characters, breaking man page display.

Use \x07 (inside []) and %x07 (outside []) to correctly match BEL.

closes: #19806

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-24 19:48:44 +00:00
Yasuhiro Matsumoto
abd2d7d453 patch 9.2.0236: stack-overflow with deeply nested data in json_encode/decode()
Problem:  stack-overflow with deeply nested data in json_encode/decode()
          (ZyX-I)
Solution: Add depth limit check using 'maxfuncdepth' to
          json_encode_item() and json_decode_item() to avoid crash when
          encoding/decoding deeply nested lists, dicts, or JSON arrays/objects,
          fix typo in error name, add tests (Yasuhiro Matsumoto).

fixes:  #588
closes: #19808

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-23 21:42:04 +00:00
Aliaksei Budavei
c9eaff0a8a runtime(java): Make changes for JDK 26
Reintroduce supported syntax-preview-feature numbers 455,
488, and 507 as _a new number_ 530.

Reference:
https://openjdk.org/jeps/530 (Primitive Types in Patterns etc.)

closes: #19793

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-23 19:54:00 +00:00
Anakin Childerhose
8c116bbe79 patch 9.2.0235: filetype: wks files are not recognized.
Problem:  filetype: wks files are not recognized.
Solution: Detect *.wks, *.wks.in and *.wks.inc as wks filetype,
          include a filetype and syntax plugin (Anakin Childerhose)

The OpenEmbedded Image Creation tool, `wic` uses wic kickstarter files
to define image partition and bootloader layouts.
wks files can end with .wks, .wks.in for templated wks files, and
.wks.inc for including in other .wks files.

The autocmd for *.wks.inc needs to come before *.inc in
runtime/ftdetect.vim

Reference:
https://docs.yoctoproject.org/ref-manual/kickstart.html#openembedded-kickstart-wks-reference
https://git.openembedded.org/openembedded-core/tree/scripts/lib/wic/canned-wks

closes: #19796

Signed-off-by: Anakin Childerhose <anakin@childerhose.ca>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-23 19:43:57 +00:00
Yasuhiro Matsumoto
3abbe31fe0 patch 9.2.0234: test: Test_close_handle() is flaky
Problem:  test: Test_close_handle() is flaky
Solution: Use WaitForAssert() to wait for the channel to be closed
          (Yasuhiro Matsumoto)

Ch_close_handle() did not wait for the channel to be fully closed,
which could cause Ch_CloseHandler to fire during the next test's
GetPort() sleep loop, resulting in E906.

Wait for ch_status() to become 'closed' before returning.

closes: #19797

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-23 19:29:57 +00:00
Hirohito Higashi
347e8c1e7d patch 9.2.0233: Compiler warning in strings.c
Problem:  Compiler warning in strings.c
          (Timothy Rice, after v9.2.0031)
Solution: Return early when str_m is zero
          (Hirohito Higashi)

fixes:  #19795
closes: #19800

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-23 18:46:31 +00:00
Hirohito Higashi
3d472d8675 patch 9.2.0232: fileinfo not shown after :bd of last listed buffer
Problem:  fileinfo not shown after :bd of last listed buffer
          (memeplex)
Solution: Set need_fileinfo to true in empty_curbuf()
          (Hirohito Higashi)

When deleting the last listed buffer with :bd, the new empty buffer's
file info (e.g. "[No Name]" --No lines in buffer--) was not displayed.
do_ecmd() only calls fileinfo() for existing buffers (oldbuf), not for
newly created empty buffers.

Set need_fileinfo in empty_curbuf() so the file info is displayed after
redraw.

fixes:  #548
closes: #19802

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-22 21:41:42 +00:00
Ola Söder
0172ff5542 patch 9.2.0231: Amiga: Link error for missing HAVE_LOCALE_H
Problem:  AROS/MorphOS/AmigaOS tiny/small link error
Solution: Include get_cmd_output by defining HAVE_LOCALE_H
          (Ola Söder)

closes: #19792

Signed-off-by: Ola Söder <rolfkopman@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-22 21:03:45 +00:00
Yasuhiro Matsumoto
196cf9f644 patch 9.2.0230: popup: opacity not working accross vert splits
Problem:  popup: opacity not working across vert splits
Solution: Iterate over the full popup width to find all underlying
          windows (Yasuhiro Matsumoto)

redraw_win_under_opacity_popup() only checked the popup's left column
to find underlying windows. When a popup spans a vertical split, the
right-side window was never forced to redraw, causing blended
ScreenAttrs values to accumulate across redraw cycles.

Iterate across the full popup width to find and redraw all underlying
windows.

closes: #19737

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-22 20:38:22 +00:00
AstroSnail
1fe0d1e8f5 patch 9.2.0229: keypad keys may overwrite keycode for another key
Problem:  In XTerm, with 'xtermcodes' enabled (default), vim will
          request keypad keys after editing pad keys, and will remove
          the latter when they're duplicates of the former.
Solution: When a termcode reply is a keypad key and it would replace a
          different key, skip it.

fixes:   #19182 (case 2)
related: #19643
closes:  #19644

Signed-off-by: AstroSnail <astrosnail@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-22 20:21:50 +00:00
Antonio Giovanni Colombo
6463c32e20 translation(it): Update Italian translation
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-22 18:16:43 +00:00
Antonio Giovanni Colombo
243dcd1bcb translation(it): Update Italian xxd man page
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-22 18:13:45 +00:00
Yasuhiro Matsumoto
0b257ecb90 patch 9.2.0228: still possible flicker
Problem:  still possible flicker
Solution: Use redraw_as_cleared() instead of screenclear() to avoid
          flicker (Yasuhiro Matsumoto).

When the window width matches the frame width, screenclear() causes
visible flicker. Use redraw_as_cleared() instead which marks the
screen for redraw without actually clearing it.

closes: #19732

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-22 17:21:09 +00:00
Yasuhiro Matsumoto
aeb716ea77 patch 9.2.0227: MS-Windows: CSI sequences may be written to screen
Problem:  MS-Windows: CSI sequences may be written to screen
          (after v9.2.0200).
Solution: Move the CSI parsing and skipping logic outside of the USE_VTP
          guard in mch_write() so that sequences are always consumed
          even if VTP is inactive (Yasuhiro Matsumoto).

After v9.2.0200 added send_decrqm_modes(), running vim -u NONE -U NONE
-N on Windows displays raw ESC[?2026$p on screen. This is because
USE_VTP is false when termguicolors is off and t_colors < 256, and the
CSI skip logic in mch_write() was inside the if (USE_VTP) block, so
s/len were never advanced and the escape sequence leaked out as plain
text.

Move the CSI parsing/skipping outside the USE_VTP guard so sequences are
always consumed. Only the vtp_printf() pass-through for DECSCUSR (q)
remains conditional on USE_VTP.

related: #19755
closes:  #19762

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-22 17:05:14 +00:00
Hirohito Higashi
48137e4e48 patch 9.2.0226: No 'incsearch' highlighting support for :uniq
Problem:  No 'incsearch' highlighting support for :uniq
Solution: Add :uniq support (Hirohito Higashi)

closes: #19780

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-22 17:00:46 +00:00
Aditya Malik
e147b635fc patch 9.2.0225: runtime(compiler): No compiler plugin for just
Problem:  runtime(compiler): No compiler plugin for just
Solution: Add a compiler plugin for the just command runner, add a test
          (Aditya Malik)

Sets makeprg and a custom errorformat to parse just's multi-line
error output into quickfix entries with file, line, column, and
message. Includes a test.

Reference:
- https://github.com/casey/just

closes: #19773

Signed-off-by: Aditya Malik <adityamalik2833@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-22 16:46:41 +00:00
Hirohito Higashi
9e55474849 patch 9.2.0224: channel: 2 issues with out/err callbacks
Problem:  channel: 2 issues with out/err callbacks
Solution: fix indentation and output order with term_start()
          (Hirohito Higashi).

When term_start() is called with err_cb (and optionally out_cb),
two issues occur:
1. Unexpected indentation in the terminal buffer display: stderr
   arrives via a pipe which lacks the PTY ONLCR line discipline,
   so bare LF moves the cursor down without a CR, causing each
   subsequent line to be indented one column further.

2. stdout appears in the terminal and callbacks before stderr,
   even when the child process writes to stderr first.  This is
   because channel_parse_messages() iterates parts in enum order
   (PART_OUT before PART_ERR), so when both have buffered data
   they are always processed in the wrong order.

Solution:
- In may_invoke_callback(), before writing PART_ERR data to the
  terminal buffer, convert bare LF to CR+LF so that vterm renders
  each line at column 0.

- In channel_parse_messages(), when about to process PART_OUT of a
  terminal PTY job, if PART_ERR already has readahead data, skip
  PART_OUT and process PART_ERR first.  This works without any
  artificial delay because channel_select_check() reads all ready
  file descriptors into their readahead buffers in a single
  select() pass before any callbacks are invoked; by the time
  channel_parse_messages() runs, both buffers are populated and
  the skip logic can enforce the correct order.

- Also add a per-line split for out_cb/err_cb on terminal PTY
  jobs: instead of passing a potentially multi-line raw chunk to
  the callback, split on NL and strip trailing CR so each callback
  receives exactly one clean line.

Add Test_term_start_cb_per_line() to verify that err_cb and out_cb
each receive one line per call, with correct stderr-before-stdout
ordering, without any sleep between the writes.

fixes:  #16354
closes: #19776

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-22 16:42:53 +00:00
Mao-Yining
de10c87bed translation: Regenerate desktop files in runtime directory
I don't know whether it is necessary to copy desktop files to runtime/
manually, but these two files seem not to have been updated for some
time.

The change in Makefile is because the previous pattern will throw an error:

	C:\msys64\ucrt64\bin\sed.exe: -e expression #1, char 3: unknown command: `.'

which I am not sure why.

closes: #19777

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-22 16:27:43 +00:00
Hirohito Higashi
e2f4e18437 patch 9.2.0223: Option handling for key:value suboptions is limited
Problem:  Option handling for key:value suboptions is limited
Solution: Improve :set+=, :set-= and :set^= for options that use
          "key:value" pairs (Hirohito Higashi)

For comma-separated options with P_COLON (e.g., diffopt, listchars,
fillchars), :set += -= ^= now processes each comma-separated item
individually instead of treating the whole value as a single string.

For :set += and :set ^=:
- A "key:value" item where the key already exists with a different value:
  the old item is replaced.
- An exact duplicate item is left unchanged.
- A new item is appended (+=) or prepended (^=).

For :set -=:
- A "key:value" or "key:" item removes by key match regardless of value.
- A non-colon item removes by exact match.

This also handles multiple non-colon items (e.g., :set
diffopt-=filler,internal) by processing each item individually, making
the behavior order-independent.

Previously, :set += simply appended the value, causing duplicate keys to
accumulate.

fixes:  #18495
closes: #19783

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-22 16:19:31 +00:00
zeertzjq
5a3b75d67b patch 9.2.0222: "zb" scrolls incorrectly with cursor on fold
Problem:  "zb" scrolls incorrectly with cursor on fold.
Solution: Set w_botline to the line below the fold (zeertzjq).

related: neovim/neovim#38413
closes:  #19785

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-22 15:49:59 +00:00
zeertzjq
03e89ccf33 patch 9.2.0221: Visual selection drawn incorrectly with "autoselect"
Problem:  Visual selection may be drawn incorrectly with "autoselect".
Solution: Restore w_virtcol after getting clipboard selection
          (zeertzjq).

fixes:  #19590
closes: #19784

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-22 15:44:47 +00:00
Muraoka Taro
2f8bd14198 patch 9.2.0220: MS-Windows: some defined cannot be set on Cygwin/Mingw
Problem:  In Cygwin and MinGW, options like MODIFIED_BY cannot be set.
          MSVC (Make_mvc.mak) allows you to build optional features
          without modifying the source code by specifying DEFINES in the
          nmake options. However, this is not the case in
          Make_cyg_ming.mak.
Solution: Since DEFINES is used in many places, we will provide
          EXTRA_DEFINES assuming that the user will define it. By adding
          this to DEFINES, it will be possible to specify it in the same
          way as in MSVC.

closes: #19786

Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-22 15:35:20 +00:00
Yasuhiro Matsumoto
9774651ecf runtime(manpager): Strip OSC 8 hyperlink sequences in manpager plugin
fixes:  #19726
closes: #19787

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-22 15:30:53 +00:00
Sergey Vlasov
8e0483c2f4 patch 9.2.0219: call stack can be corrupted
Problem:  call stack can be corrupted, because calculated remaining
          capacity for call stack string can underflow (after v9.1.1983)
Solution: Calculate capacity against maximum capacity
          (Sergey Vlasov).

closes: #19759

Signed-off-by: Sergey Vlasov <sergey@vlasov.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-20 23:21:28 +00:00
Shane Harper
60edf94c4e patch 9.2.0218: visual selection highlighting in X11 GUI is wrong.
Problem:  The check for whether an X connection was opened was incorrect
          (after v9.2.0158).
Solution: Use X_DISPLAY instead of xterm_dpy (Shane Harper)

Note: xterm_dpy would be NULL if Vim was started in GUI mode.

Previously, starting two instances of gvim that use GTK3 with:
GDK_BACKEND=x11 gvim and making a visual selection in both would leave
both selections highlighted with the Visual highlight group. Now, when
the second selection is made the first selection will be highlighted
with VisualNOS.

closes: #19752

Signed-off-by: Shane Harper <shane@shaneharper.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-20 23:12:33 +00:00
Jamie Shorten
68f9dedba4 patch 9.2.0217: filetype: cto files are not recognized
Problem:  filetype: cto files are not recognized
Solution: Detect *.cto as concerto filetype (Jamie Shorten)

Add filetype detection for the Concerto Modelling Language. Concerto
is a schema language by the Accord Project for defining data models
used in smart legal contracts and business networks.

Reference:
Language spec: https://concerto.accordproject.org
Tree-sitter grammar: https://github.com/accordproject/concerto-tree-sitter

closes: #19760

Signed-off-by: Jamie Shorten <jamie@jamieshorten.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-20 23:07:02 +00:00
Yasuhiro Matsumoto
b3d8a0f349 patch 9.2.0216: MS-Windows: Rendering artifacts with DirectX
Problem:  MS-Windows: Rendering artifacts with DirectX
          (Alexander Zhura)
Solution: Force redraw (Yasuhiro Matsumoto)

DirectWrite subpixel rendering (especially with CFF/OTF fonts) can
extend glyph pixels beyond cell boundaries.  Vim already handles the
forward direction (redraw the next character when the current one
changes) for MS-Windows antialiasing, but the backward direction was
missing.

Add gui.directx_enabled flag accessible from screen.c and extend the
existing spill-over handling to:
- Redraw the current character when the previous one changed (backward)
- Force redraw of the next character in screen_puts_len() and
  screen_fill() paths

fixes:  #19586
closes: #19761

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-20 22:51:30 +00:00
Muraoka Taro
890d5fd138 patch 9.2.0215: MS-Windows: several tests fail in the Windows CUI.
Problem:  The Windows CUI actively buffers transmissions to terms. Patch
          0200 changed the timing of DECRQM transmissions, and
          out_flush() is no longer called after transmission. Therefore,
          actual term initialization does not occur until the buffer is
          flushed, causing the following tests to fail:
            - test_autocmd.vim - Test_Changed_FirstTime()
            - test_mapping.vim - Test_error_in_map_expr()
            - test_messages.vim - Test_mode_message_at_leaving_insert_with_esc_mapped()
            - test_search.vim - Test_search_cmdline_incsearch_highlight_attr()

            The failures since version 200 can be confirmed in the following CI jobs.
            - 9.2.0200 https://github.com/vim/vim/actions/runs/23312934497
                - https://github.com/vim/vim/actions/runs/23312934497/job/67804736843
                - https://github.com/vim/vim/actions/runs/23312934497/job/67804736752
                - https://github.com/vim/vim/actions/runs/23312934497/job/67804736735
            - 9.2.0199 https://github.com/vim/vim/actions/runs/23311871938
                - The above test can be confirmed to be successful.
Solution: After sending DECRQM in send_decrqm_modes(), explicitly call
          out_flush() to ensure terminal initialization (Muraoka Taro).

closes: #19764

Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-20 22:46:13 +00:00
Yasuhiro Matsumoto
2b7b745bb5 patch 9.2.0214: tests: Test_gui_system_term_scroll() is flaky
Problem:  tests: Test_gui_system_term_scroll() is flaky
          (after: v9.2.0208)
Solution: Fix test (Yasuhiro Matsumoto)

Remove timer-based screen check and use a simple command instead
of ping.  The timer could fire before ConPTY initialization was
complete, causing screenstring() to return an empty string.

Check screenstring() directly after the command finishes instead.

related: #19735
closes:  #19765

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-20 22:34:11 +00:00
Shane Harper
b1a247d659 patch 9.2.0213: Crash when using a partial or lambda as a clipboard provider
Problem:  Crash when using a partial or lambda as a clipboard provider
Solution: Don't call free_callback() from clip_provider_get_callback()
          (Shane Harper).

closes: #19766

Signed-off-by: Shane Harper <shane@shaneharper.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-20 22:26:59 +00:00
Mao-Yining
3ee2b76ba1 patch 9.2.0212: MS-Windows: version packing may overflow
Problem:  MS-Windows: version packing may overflow (after v9.2.0206)
Solution: Explicitly clamp the version components using min()
          (Mao-Yining).

The version components (major, minor, build) from RtlGetVersion are now
clamped to their maximum bit widths (8 bits, 8 bits, 15 bits) before
being packed into a 32-bit integer. This prevents overflow when storing
unexpectedly large values.

This fixes a regression introduced in patch 9.2.0206 where the previous
clamping logic was accidentally removed.

The MAKE_VER macro is simplified by removing bit masks, as clamping is
now done at the call site, making the macro clearer and reducing
redundant masking.

closes: #19769

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-20 22:06:58 +00:00
Mao-Yining
c4d2fa018c translation(zh): Update the Simplify Chinese translation
closes: #19771

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-20 22:03:10 +00:00
Mao-Yining
b3dba929cb translation: align sponsor menu string spacing
Normalize white space in the "menu Help->Sponsor" message across all
translation files and the version.c intro handler. This ensures
consistent column alignment when displayed in the user interface.

related: #19771

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-20 21:59:11 +00:00
Foxe Chen
88cded7ac0 patch 9.2.0211: possible crash when setting 'winhighlight'
Problem:  possible crash when setting 'winhighlight'
Solution: Validate the option value more carefully (Foxe Chen)

closes: #19774

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-20 21:45:13 +00:00
Phạm Bình An
ce4fbda992 runtime(fish): Add matchit support to filetype plugin
closes: #19701

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Phạm Bình An <phambinhanctb2004@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-20 21:29:57 +00:00
Muraoka Taro
076404ae41 patch 9.2.0210: tests: Test_xxd tests are failing
Problem:  tests: Test_xxd tests are failing, after changing the xxd
          manpage (after v9.2.0205)
Solution: Update the manpage, shorten the date and update the example,
          regenerate the expected test output, skip the first 30 bytes
          for the one of the xxd tests (Muraoka Taro)

Some of the Test_xxd tests depend on the contents of xxd.1. The patch
9.2.0205 changed xxd.1, but the test fixes were insufficient. The test
that dumps the beginning of xxd.1 and the test that reads 13 bytes
starting from byte 0x33 from the beginning were failing.

closes: #19763

Co-authored-by: James McCoy <jamessan@debian.org>
Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-20 21:19:03 +00:00
Antonio Giovanni Colombo
c9e5aeff35 runtime(doc): Update Italian xxd manpage
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-19 22:12:44 +00:00
Yasuhiro Matsumoto
332dd22ed4 patch 9.2.0209: freeze during wildmenu completion
Problem:  Vim may freeze if setcmdline() is called while the wildmenu or
          cmdline popup menu is active (rendcrx)
Solution: Cleanup completion state if cmdbuff_replaced flag has been set
          (Yasuhiro Matsumoto)

fixes:  #19742
closes: #19744

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-19 21:59:45 +00:00
Yasuhiro Matsumoto
67ae763557 patch 9.2.0208: MS-Windows: excessive scroll-behaviour with go+=!
Problem:  MS-Windows: excessive scroll-behaviour with go+=! after
          switching to ConPTY as default (after v9.2.0048).
Solution: Use tl_cursor_pos to determine the number of lines to scroll
          (Yasuhiro Matsumoto).

Since patch 9.2.0048 (71cc1b12) made ConPTY the default on Windows 11,
running :!cmd with guioptions+=! scrolls up the entire window height
instead of only the output lines.

ConPTY damages all terminal rows on initialization even when they are
empty, which causes tl_dirty_row_end to equal Rows.  The scroll-up loop
in update_system_term() then scrolls the full screen because
(Rows - tl_toprow) < tl_dirty_row_end is always true until tl_toprow
reaches 0.

Use the cursor position instead of tl_dirty_row_end for the scroll
calculation, since it reflects where actual content has been written.

The scroll bug only occurs with ConPTY.  With winpty the terminal
finishes too quickly for the timer-based screen check to work.

closes: #19735

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-19 21:48:57 +00:00
Yasuhiro Matsumoto
6391a38e5e patch 9.2.0207: MS-Windows: freeze on second :hardcopy
Problem:  MS-Windows: freeze on second :hardcopy
          (antoniopaolini)
Solution: Enable PrintHookProc in GUI mode to ensure the print dialog is
          brought to the foreground (Yasuhiro Matsumoto).

Enable PrintHookProc for GUI mode so that the print dialog is brought
to the foreground via BringWindowToTop/SetForegroundWindow.  Without
the hook, the second PrintDlgW() modal dialog appears behind gvim due
to Windows foreground lock timeout, making gvim unresponsive.

Also add NULL checks for hDlgPrint in SendMessage calls.

fixes:  #19715
closes: #19754

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-19 21:44:01 +00:00
Yasuhiro Matsumoto
f445ed0d56 patch 9.2.0206: MS-Window: stripping all CSI sequences
Problem:  MS-Window: stripping all CSI sequences
          (Ke Mao, after v9.2.0184)
Solution: Restore vtp_printf() to pass-through DECSUSR codes
          (Yasuhiro Matsumoto).

Patch 9.2.0184 discards all CSI sequences in mch_write() when VTP is
active to prevent unwanted DECRQM responses.  However, this also
removed the existing DECSCUSR pass-through, breaking cursor shape
changes (t_SI/t_SR/t_EI) on Windows Terminal.

Restore vtp_printf() pass-through for DECSCUSR (final byte 'q') while
continuing to discard other CSI sequences.

related: #19694
related: #11532
fixes:   #19750
closes:  #19755

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-19 21:31:34 +00:00
Christian Brabandt
a907a7f73b runtime(doc): disable color codes when generating ascii man pages in Makefile
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-19 21:29:51 +00:00
Lukáš Jiřiště
4d262b4952 patch 9.2.0205: xxd: Cannot NUL terminate the C include file style
Problem:  xxd: Cannot NUL terminate the C include file style
Solution: Add option -t to end output with terminating null
          (Lukáš Jiřiště).

fixes:  #14409
closes: #19745

Signed-off-by: Lukáš Jiřiště <kyci@ljiriste.work>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-19 21:22:27 +00:00
Guillaume Barbier
53884ba7a8 patch 9.2.0204: filetype: cps files are not recognized
Problem:  filetype: cps files are not recognized
Solution: Detect *.cps files as json filetype (Guillaume Barbier).

Reference:
https://github.com/cps-org/cps
https://cps-org.github.io/cps/

closes: #19758

Signed-off-by: Guillaume Barbier <barbier.guillaume60@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-19 20:24:40 +00:00
Hirohito Higashi
d2dc9a4f37 patch 9.2.0203: Patch v9.2.0185 was wrong
Problem:  Patch v9.2.0185 was wrong
Solution: Revert patch v9.2.0185, root cause fixed in v9.2.0197
          (Hirohito Higashi).

related: #19730
related: #19734
closes:  #19749

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-19 20:19:07 +00:00
pyllyukko
645ed6597d patch 9.2.0202: [security]: command injection via newline in glob()
Problem:  The glob() function on Unix-like systems does not escape
          newline characters when expanding wildcards. A maliciously
          crafted string containing '\n' can be used as a command
          separator to execute arbitrary shell commands via
          mch_expand_wildcards(). This depends on the user's 'shell'
          setting.
Solution: Add the newline character ('\n') to the SHELL_SPECIAL
          definition to ensure it is properly escaped before being
          passed to the shell (pyllyukko).

closes: #19746

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-w5jw-f54h-x46c

Signed-off-by: pyllyukko <pyllyukko@maimed.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-19 20:07:51 +00:00
Furkan Sahin
cc8798e719 patch 9.2.0201: filetype: Wireguard config files not recognized
Problem:  filetype: Wireguard config files not recognized
Solution: Detect /etc/wireguard/*.conf files as dosini filetype
          (Furkan Sahin).

closes: #19751

Signed-off-by: Furkan Sahin <furkan-dev@proton.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-19 19:28:39 +00:00
Foxe Chen
1da42ee271 patch 9.2.0200: term: DECRQM codes are sent too early
Problem:  term: DECRQM codes are sent too early, the resulting DECRPM
          responses can arrive after Vim has already exited, leaking
          into the shell's input buffer (Christian Brabandt).
Solution: Only send DECRQM codes once termcap_active is set
          (Foxe Chen).

related: #19660
fixes:   #19660#issuecomment-4085448070
closes:  #19748

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-19 19:19:30 +00:00
ichizok
ecf90b92f1 CI: make dependabot monitor .github/actions directory
and also set `cooldown`, `groups`

related: #19747
closes:  #19756

Signed-off-by: Ozaki Kiichi <gclient.gaap@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-19 19:04:44 +00:00
Christian Brabandt
7aca0e14de patch 9.2.0199: tests: test_startup.vim fails
Problem:  tests: test_startup.vim fails, because the command line is
          getting too long so that the shell prompt line get shifted by one
          additional screen line down (after v9.2.0194).
Solution: Partly revert Patch v9.2.0194 and do not set termresize and
          termsync options.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-19 18:54:09 +00:00
Christian Brabandt
2f5fe8827e patch 9.2.0198: cscope: can escape from restricted mode
Problem:  cscope: can escape from restricted mode (pyllyukko)
Solution: Disallow :cscope in restricted mode (like :grep),
          add a tests for restricted mode using :grep and :cscope

closes: #19731

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-18 21:29:13 +00:00
Barrett Ruth
faad250544 runtime(doc): Fix typo in if_pyth.txt
closes: #19733

Signed-off-by: Barrett Ruth <br.barrettruth@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-18 21:22:46 +00:00
Hirohito Higashi
a4cf812462 patch 9.2.0197: tabpanel: frame width not updated for existing tab pages
Problem:  When 'showtabpanel' is set before any window exists (e.g. via
          --cmd) and multiple tab pages are opened with -p, the tabpanel
          appears when the second tab page is created.  At that point
          shell_new_columns() only updates the current (new) tab page's
          frame width; existing tab pages retain the wrong width.
Solution: After calling shell_new_columns() in win_new_tabpage(), iterate
          all other tab pages and update their frame widths with
          frame_new_width() (Hirohito Higashi).

related: #19730
closes:  #19734

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-18 21:16:14 +00:00
Thomas Dupuy
39ee7d17b9 runtime(yara): add ftplugin for yara filetype
Add a minimal ftplugin `runtime/ftplugin/yara.vim` that sets:
- `commentstring` for YARA line comments (`//`)
- `comments` for YARA block comment (`/* */`)
- `formatoptions` to wrap comment lines and continue comment after newlines
This was heavily inspired from `runtime/ftplugin/c.vim`

closes: #19736

Signed-off-by: Thomas Dupuy <thom4s.d@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-18 21:13:12 +00:00
Hirohito Higashi
0c109e4e60 patch 9.2.0196: textprop: negative IDs and can cause a crash
Problem:  textprop: negative IDs and can cause a crash without "text"
          (Paul Ollis)
Solution: Strictly reserve negative IDs for virtual text, ignore "id"
          when "text" is provided in prop_add() (Hirohito Higashi).

When prop_add() was called with a negative id and no "text", the
property was stored with a negative tp_id.  A subsequent call to
prop_list() or screen redraw would then treat it as a virtual text
property and dereference b_textprop_text.ga_data, which is NULL when
no virtual text properties exist.

Negative ids are reserved for virtual text properties, so always
reject them with E1293 regardless of whether virtual text properties
exist.  Also, when "text" is specified any user-provided id is now
silently ignored and an internal negative id is assigned.

Remove the now-unnecessary did_use_negative_pop_id flag and E1339.
Update E1293's message and the documentation accordingly.

related: #19684
closes:  #19741

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-18 21:11:41 +00:00
ichizok
2b70de167e CI: bump actions/upload-artifact to v7
closes: #19747

Signed-off-by: Ozaki Kiichi <gclient.gaap@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-18 20:57:15 +00:00
Christian Brabandt
e5df6e8d42 patch 9.2.0195: CI: test-suite gets killed for taking too long
Problem:  test_codestyle.vim takes too much time and takes more than
          90s, this contributes to the overall time for all runners and
Solution: Create a dedicated 'make codestyle' target in the testdir
          Makefiles. Remove test_codestyle from the main test list.
          Update GitHub CI to run this check as a separate step
          in the 'normal' features build.
          Increase CI timeout to 45 minutes.

fixes: #19740

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-18 20:51:12 +00:00
Christian Brabandt
32e453d339 patch 9.2.0194: tests: test_startup.vim leaves temp.txt around
Problem:  tests: test_startup.vim leaves temp.txt around
Solution: Disable termresize and termsync explicitly to stop outputting
          DEC mode chars, delete all chars before the rm command

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-18 20:42:22 +00:00
John Marriott
a74e5fc5b9 patch 9.2.0193: using copy_option_part() can be improved
Problem:  using copy_option_part() can be improved
Solution: Refactor and use the return value of copy_option_part() to
          avoid strlen() calls (John Marriott).

In addition, this commit includes the following changes:

memline.c:
- In recover_names():
  - Replace calls to vim_strsave() with vim_strnsave() for the literal
    strings
  - Use a string_T to store local variable dir_name.

bufwrite.c:
- In buf_write()
  - move variable wp to where it is used.

help.c:
- In fix_help_buffer():
  - replace call to add_pathsep() with after_pathsep()

optionstr.c:
- In export_myvimdir():
  - use a string_T to store local variable buf
  - replace call to add_pathsep() with after_pathsep()

scriptfile.c:
- In do_in_path():
  - use a string_T to store local variable buf
  - measure the lengths of prefix and name once before the while loop
  - replace call to add_pathsep() with after_pathsep()
  - move some variables closer to where they are used

spellfile.c:
- In init_spellfile():
  - use a string_T to store local variable buf

closes: #19725

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-18 19:25:22 +00:00
AstroSnail
c4d212257d patch 9.2.0192: not correctly recognizing raw key codes
Problem:  When "k" is excluded from cpoptions, vim should be able to
          recognize raw key codes in mappings and replace them with
          builtin codes (e.g. ^[OA is replaced with <Up>) so that
          changing the builtin code also changes the mapping to match.
          Currently, this only works properly if the builtin code does
          not contain modifiers (e.g. @;*).
Solution: Teach find_term_bykeys how to recognize keys with modifiers
          (AstroSnail).

fixes:  #19182
closes: #19643

Signed-off-by: AstroSnail <astrosnail@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-17 21:26:24 +00:00
TomIO
d41cd5dce4 patch 9.2.0191: Not possible to know if Vim was compiled with Android support
Problem:  The "android" and "termux" feature flags have been shipped in
          Termux's downstream vim / vim-gtk package for 5+ years but were
          never properly documented in the downstream patch.
Solution: Upstream the "android" and "termux" feature flags into Vim as
          decoupled feature flags, this enables the "android" feature in
          particular to be available independently of the "termux"
          feature for builds of Vim against the Android NDK, but not
          including the Termux NDK patchset.

closes: #19623

Co-authored-by: Lethal Lisa <43791059+lethal-lisa@users.noreply.github.com>
Co-authored-by: shadmansaleh <13149513+shadmansaleh@users.noreply.github.com>
Signed-off-by: TomIO <tom@termux.dev>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-17 21:08:44 +00:00
Hirohito Higashi
1f4cd5fb52 patch 9.2.0190: Status line height mismatch in vertical splits
Problem:  When 'laststatus' changes, the status line can become
          misaligned.
Solution: Update last_status_rec() to calculate the maximum status line
          height required across all windows in a vertical row.

closes: #19688

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-17 21:00:45 +00:00
Yasuhiro Matsumoto
019c53b37f patch 9.2.0189: MS-Windows: opacity popups flicker during redraw in the console
Problem:  When using transparent popups in the Win32 console, redrawing
          background windows causes flickering. This happens because
          the background is drawn opaquely before the popup blends
          and draws on top.
Solution: Implement a Z-index mask  to suppress screen_char() output for
          cells covered by an opacity popup. Disable the Clear-to-EOL
          (T_CE) optimization for lines overlapping these popups to
          prevent accidental erasure (Yasuhiro Matsumoto).

closes: #19697
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-17 20:51:22 +00:00
pyllyukko
15a96a04ad patch 9.2.0188: Can set environment variables in restricted mode
Problem:  Can set environment variables in restricted mode
Solution: Disallow setting environment variables using legacy Vim script
          (pyllyukko).

related: #13394
related: #19705
closes:  #19704

Signed-off-by: pyllyukko <pyllyukko@maimed.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-17 20:19:59 +00:00
Yasuhiro Matsumoto
6238ee9f89 patch 9.2.0187: MS-Windows: rendering artifacts with DirectX renderer
Problem:  MS-Windows: rendering artifacts with DirectX renderer
Solution: Enable ETO_CLIPPED for DirectWrite rendering in
          gui_mch_draw_string() to ensure glyphs stay within their
          cell boundaries (Yasuhiro Matsumoto).

closes: #19711

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-17 19:37:02 +00:00
Kaixuan Li
f9bed026ac patch 9.2.0186: heap buffer overflow with long generic function name
Problem:   Using a long generic function name may cause a heap buffer
           overflow in common_function().
Solution:  Allocate memory for the full name instead of using IObuff
           (Kaixuan Li).

closes: #19727

Signed-off-by: Kaixuan Li <kaixuanli0131@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-17 19:10:15 +00:00
thinca
ed7c7fb225 patch 9.2.0185: buffer overflow when redrawing custom tabline
Problem:  When drawing a custom tabline, if topframe->fr_width is
          larger than Columns (possible during tab closure with
          showtabpanel=1), Vim writes past the end of the
          TabPageIdxs[] array.
Solution: Cap the column limit at Columns to ensure TabPageIdxs is
          never accessed out-of-bounds (thinca).

closes: #19725

Supported by AI

Signed-off-by: thinca <thinca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-17 18:52:58 +00:00
elig0n
3f53a2ce2f runtime(doc): Fix typo in cmdline.txt
closes: #19724

Signed-off-by: elig0n <31196036+elig0n@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-16 22:20:15 +00:00
Yasuhiro Matsumoto
74c53196cc patch 9.2.0184: MS-Windows: screen flicker with termguicolors and visualbell
Problem:  When 'termguicolors' is used on MS-Windows (VTP mode), sending
          CSI query sequences (like DECRQM) causes the console to
          generate responses that are misinterpreted as keystrokes.
          The leading ESC triggers a beep or 'visualbell' flash.
Solution: In mch_write(), discard CSI sequences when USE_VTP is active
          so the console does not process queries and generate unwanted
          input responses (Yasuhiro Matsumoto).

related: #11532
closes:  #19694

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-16 22:09:35 +00:00
Yasuhiro Matsumoto
cce17de845 patch 9.2.0183: channel: using deprecated networking APIs
Problem:  gethostbyname() and inet_ntoa() are deprecated and cause
          build errors on modern MSVC versions.
Solution: Use getaddrinfo() and inet_ntop() when FEAT_IPV6 and
          HAVE_INET_NTOP are defined. Keep the old functions as
          fallbacks for legacy platforms (Yasuhiro Matsumoto).

closes: #19719

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-16 22:02:13 +00:00
Sean Dewar
bae31c35bb patch 9.2.0182: autocmds may leave windows with w_locked set
Problem:  autocmds that switch windows may cause them to remain with
          w_locked set, preventing them from being closed longer than
          intended.
Solution: Unset w_locked in the window where it was set (Sean Dewar).

closes: #19716

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-16 21:54:28 +00:00
ichizok
955d28799b patch 9.2.0181: line('w0') moves cursor in terminal-normal mode
Problem:  line('w0') moves cursor in terminal-normal mode
          (Biebar, after v9.2.0127)
Solution: Check that the terminal is not in terminal-normal-mode
          (Ozaki Kiichi).

fixes:  #19717
closes: #19718

Signed-off-by: Ozaki Kiichi <gclient.gaap@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-16 21:47:36 +00:00
Hirohito Higashi
a5d9654620 patch 9.2.0180: possible crash with winminheight=0
Problem:  possible crash with winminheight=0
          (Emilien Breton)
Solution: Use <= instead of < when checking reserved room in
          frame_setheight() to correctly handle the zero-height
          boundary case (Hirohito Higashi).

In frame_setheight(), when shrinking the current window and the only
other window has 'winfixheight' with 'winminheight'=0, room_reserved
was not cleared because the condition used '<' instead of '<='.
The freed rows were discarded, leaving fr_height sum less than
topframe fr_height.  Subsequent resize operations then computed a
wrong room_cmdline that expanded topframe beyond the screen, causing
a crash.

fixes:  #19706
closes: #19712

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-16 21:44:17 +00:00
ichizok
e06d084735 patch 9.2.0179: MS-Windows: Compiler warning for converting from size_t to int
Problem:  MS-Windows: Compile warning for converting from size_t to int
          breaks the Appveyor CI (after v9.2.0168)
Solution: Explicitly cast to int in convert_string() (ichizok).

closes: #19722

Signed-off-by: ichizok <gclient.gaap@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-16 21:31:14 +00:00
Foxe Chen
d737e24437 patch 9.2.0178: DEC mode requests are sent even when not in raw mode
Problem:  Vim sends DEC mode query requests (DECRQM) regardless of the
          terminal mode.
Solution: Only send DEC mode requests when cur_tmode is TMODE_RAW, but
          e.g not for gui mode (Foxe Chen).

fixes:  #19709
closes: #19710

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-16 21:25:10 +00:00
pyllyukko
36d0022b3b patch 9.2.0177: Vim9: Can set environment variables in restricted mode
Problem:  Vim9: Can set environment variables in restricted mode
Solution: Disallow settings variables in exec_instructions() when in
          restricted mode (pyllyukko)

related: #13394
closes:  #19705

Signed-off-by: pyllyukko <pyllyukko@maimed.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-16 21:19:08 +00:00
pyllyukko
8faba24ca7 patch 9.2.0176: external diff is allowed in restricted mode
Problem:  When 'diffopt' does not include "internal", Vim attempts to
          execute an external diff command even in restricted mode.
          This could be used to bypass restricted mode.
Solution: Call check_restricted() in diff_file() before attempting to
          execute an external diff (pyllyukko).

closes: #19696

Signed-off-by: pyllyukko <pyllyukko@maimed.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-16 19:49:35 +00:00
Christian Brabandt
e22b31887a patch 9.2.0175: No tests for what v9.2.0141 and v9.2.0156 fixes
Problem:  No tests for what v9.2.0141 and v9.2.0156 fixes
Solution: Add tests for using :perldo and rubeval() in sandbox mode

related: #19664
related: #19653
closes:  #19699

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-16 19:36:46 +00:00
HarshK97
42c6686c78 patch 9.2.0174: diff: inline word-diffs can be fragmented
Problem:  When using 'diffopt=inline:word', lines were excessively
          fragmented with punctuation creating separate highlight
          blocks, making it harder to read the diffs.
Solution: Added 'diff_refine_inline_word_highlight()' to merge
          adjacent diff blocks that are separated by small gaps of
          non-word characters (up to 5 bytes by default) (HarshK97).

When using inline:word diff mode, adjacent changed words separated by
punctuation or whitespace are now merged into a single highlight block
if the gap between them contains fewer than 5 non-word characters.

This creates more readable diffs and closely matches GitHub's own diff
display.

closes: #19098

Signed-off-by: HarshK97 <harshkapse1234@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-16 19:32:21 +00:00
Christian Brabandt
e21c4a649a patch 9.2.0173: tests: Test_balloon_eval_term_visual is flaky
Problem:  tests: Test_balloon_eval_term_visual is flaky
Solution: Use redraw and WaitForAssert() to make it more reliable

Previously, it failed about 1 out of 4 runs for me, now I got it down to
1 out of 10. It's not perfect, but better than before.

closes: #19692

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-15 15:42:34 +00:00
Yasuhiro Matsumoto
a72926fa51 patch 9.2.0172: Missing semicolon in os_mac_conv.c
Problem:  Missing semicolon in os_mac_conv.c (after v9.2.0168)
Solution: Add it (Yasuhiro Matsumoto).

The missing semicolon was introduced in patch 9.2.0168
(b00f441e6), which breaks the macOS build.

closes: #19695

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-15 15:39:34 +00:00
Mao-Yining
ca62f84503 patch 9.2.0171: MS-Windows: version detection is deprecated
Problem:  MS-Windows: GetVersionEx() is deprecated since Windows 8.
          Version checks for specific features (like dark mode or title
          bar colors) are duplicated across files using multiple boolean flags.
Solution: Use RtlGetVersion() to centralize detection in a single
          win_version variable. Use the MAKE_VER() macro to check
          against major, minor, and build numbers. Update titlebar
          colors and dark theme to use proper version thresholds
          (Mao-Yining).

closes: #19673

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-15 09:49:33 +00:00
Murasame
98fe2b6c71 translation(zh_CN): Fix translation for 'paste' in zh_CN.UTF-8.po
Corrected the translation for 'paste' from '粘帖' to '粘贴'.

In Chinese, the correct term for the computer action "paste" is 粘贴
(zhān tiē). The original translation used 粘帖, which contains a very
common typo. The second character was mistakenly written as 帖 (which
means a note or invitation) instead of the correct character 贴 (which
means to stick or paste).

closes: #19689

Signed-off-by: Murasame <88932464+CuteMurasame@users.noreply.github.com>
Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-15 09:40:32 +00:00
Christian Brabandt
7a9548c400 runtime(doc): Update help tags references
related: #19691

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-15 09:35:35 +00:00
Yasuhiro Matsumoto
e05d897258 patch 9.2.0170: channel: some issues in ch_listen()
Problem:  channel: some issues in ch_listen()
          (char101, after v9.2.0153)
Solution: On MS-Windows, initialize using channel_init_winsock() and use
          SO_EXCLUSIVEADDRUSE instead of SO_REUSEADDR, allow to use port
          0 to have the OS assign a port (Yasuhiro Matsumoto).

related: #19231
closes:  #19690

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-15 09:32:19 +00:00
Yasuhiro Matsumoto
751b59e539 runtime(doc): clarify :silent usage for system()/systemlist()
When system() or systemlist() is called without :silent from a
statusline expression, autocommand, or timer callback, the terminal
is temporarily set to cooked mode, which re-enables ECHO on the tty.
If a terminal response (e.g. DECRPM for cursor blink mode) arrives
during this window, the tty driver echoes it to the screen, leaving
stray characters that require CTRL-L to remove.

This behavior was intentionally addressed in patch 7.4.427 by
skipping cooked mode when :silent is prepended.  However, the
documentation only mentioned this for system() and did not cover
systemlist() at all.  The guidance to use :silent in non-interactive
contexts (statusline, autocommands, timers) was also not explicit.

closes #19691

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-15 09:16:42 +00:00
Foxe Chen
a8052afcb6 patch 9.2.0169: assertion failure in syn_id2attr()
Problem:  assertion failure in syn_id2attr()
          (@julio-b, after v9.2.0093)
Solution: Set tp_curwin to a valid window in popup_close_tabpage()
          and return early in update_winhighlight() if there are
          no highlight overrides to update (Foxe Chen).

fixes:  #19650
closes: #19670

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-15 09:05:14 +00:00
James McCoy
b00f441e69 patch 9.2.0168: invalid pointer casting in string_convert() arguments
Problem:  invalid pointer casting in string_convert() arguments
Solution: Use a temporary local int variable (James McCoy)

string_convert()/string_convert_ext() accept an "int *lenp" parameter,
however a few call sites were taking the address of a possibly larger
type (long, size_t) and casting it as an int * when calling these
functions.

On big-endian platforms, this passes the (likely) zeroed high bytes of
the known length through to string_convert(). This indicates it received
an empty string and returns an allocated empty string rather than
converting the input. This is exhibited by test failures like

  From test_blob.vim:
  Found errors in Test_blob2str_multi_byte_encodings():
  command line..script src/testdir/runtest.vim[636]..function RunTheTest[63]..Test_blob2str_multi_byte_encodings line 2: Expected ['Hello'] but got ['']
  command line..script src/testdir/runtest.vim[636]..function RunTheTest[63]..Test_blob2str_multi_byte_encodings line 3: Expected ['Hello'] but got ['']
  command line..script srctestdir/runtest.vim[636]..function RunTheTest[63]..Test_blob2str_multi_byte_encodings line 6: Expected ['Hello'] but got ['']

Instead, use a temporary local int variable as the in/out variable for
string_convert() and assign the result back to the larger typed length
variable post-conversion.

closes: #19672

Signed-off-by: James McCoy <jamessan@debian.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-15 08:58:11 +00:00
Christian Brabandt
ba27e4fffa patch 9.2.0167: terminal: setting buftype=terminal may cause a crash
Problem:  setting buftype=terminal may cause a crash
          (lacygoill, after v9.2.0127)
Solution: Validate that curwin->w_buffer->b_term is not null

fixes:  #19686
closes: #19676

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-14 17:31:45 +00:00
Christian Brabandt
84c7a5d18f patch 9.2.0166: Coverity warning for potential NULL dereference
Problem:  Coverity warning for potential NULL dereference in channel.c
          (after v9.2.0153)
Solution: Use empty string in case hostname is NULL.

CID: 1686330

related: #19676

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-14 17:27:47 +00:00
Christian Brabandt
3f89324b3a patch 9.2.0165: tests: perleval fails in the sandbox
Problem:  tests: perleval fails in the sandbox
          (after v9.2.0156)
Solution: Update tests and assert that it fails

related: #19676

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-14 17:23:04 +00:00
Christian Brabandt
ef3cee793f patch 9.2.0164: build error when XCLIPBOARD is not defined
Problem:  build error when XCLIPBOARD is not defined
          (Tony Mechelynck, after v9.2.0158)
Solution: Update ifdefs

related: #19676

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-14 17:10:21 +00:00
John Marriott
09af51afbe patch 9.2.0163: MS-Windows: Compile warning for unused variable
Problem:  MS-Windows: Compile warning for unused variable
          (after v9.2.0160)
Solution: Add ifdef HAVE_TGETENT (John Marriott).

related: #19676

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-14 17:06:19 +00:00
zeertzjq
81d5329ace patch 9.2.0162: tests: unnecessary CheckRunVimInTerminal in test_quickfix
Problem:  tests: unnecessary CheckRunVimInTerminal in test_quickfix.vim
          (after v9.2.0159)
Solution: Remove it (zeertzjq).

closes: #19671

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-14 16:50:43 +00:00
Foxe Chen
ef3d79ebbe patch 9.2.0161: intro message disappears on startup in some terminals
Problem:  intro message disappears on startup in some terminals
          (chdiza, after v9.2.0139)
Solution: Only call set_shellsize() in handle_csi() if the reported
          width or height actually differs from the current
          Rows or Columns. (Foxe Chen)

fixes:  #19656
closes: #19660

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-13 22:14:36 +00:00
Foxe Chen
13b25e2f34 patch 9.2.0160: terminal DEC mode handling is overly complex
Problem:  terminal DEC mode handling is overly complex (after v9.2.0139)
Solution: Refactor DEC mode handling (Foxe Chen).

related: #19596
related: #19541
closes:  #19641

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-13 22:02:10 +00:00
Christian Brabandt
8d13b8244a patch 9.2.0159: Crash when reading quickfix line
Problem:  Crash when reading quickfix line (Kaiyu Xie)
Solution: Make sure line is terminated by NUL

closes: #19667

Supported by AI

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-13 21:45:26 +00:00
Shane Harper
8b009a3bbf patch 9.2.0158: Visual highlighting might be incorrect
Problem:  Vim could use the VisualNOS highlight group when not connected
          to an X server.
Solution: Always highlight visual selections with Visual when not
          connected to an X server (Shane Harper)

When Vim is running with X11 support it chooses between the Visual and
VisualNOS highlight groups for a visual selection based on whether it
believes it owns the X selection. According to :help hl-VisualNOS,
VisualNOS should only be used by the X11 GUI or when using the
xterm-clipboard feature, however, prior to this commit Vim could choose
VisualNOS when a clipboard provider was used, even when Vim was not
connected to an X server.

closes: #19659

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-13 21:39:46 +00:00
John Marriott
90d751b3fb patch 9.2.0157: Vim9: concatenation can be improved
Problem:  Vim9: concatenation can be improved
Solution: Cache string segments lengths in exe_concat() and avoid
          strlen() calls (John Marriott).

closes: #19647

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-13 21:26:55 +00:00
pyllyukko
fba75cad9a patch 9.2.0156: perleval() and rubyeval() ignore security settings
Problem:  perleval() and rubyeval() ignore security settings
Solution: Disable those functions in restricted (-Z) or 'secure' mode
          (pyllyukko).

closes: #19664

Signed-off-by: pyllyukko <pyllyukko@maimed.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-13 21:22:28 +00:00
Hannah
b11c8efbe6 patch 9.2.0155: filetype: ObjectScript are not recognized
Problem:  filetype: ObjectScript are not recognized
Solution: Add ObjectScript filetype detection for *.cls files
          (Hannah Kimura)).

Reference:
https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GCOS_intro

closes: #19668

Signed-off-by: Hannah <hannah.kimura@intersystems.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-13 21:08:42 +00:00
Christian Brabandt
e88e360a51 patch 9.2.0154: if_lua: runtime error with lua 5.5
Problem:  Lua 5.5 makes for-loop control variables read-only.
          The path-parsing logic in if_lua.c attempts to modify the
          loop variable 's', causing the script to fail during
          runtime initialization (Binbin Qian)
Solution: Use a Lua capture group in gmatch() to extract the path
          without the semicolon, avoiding the need to re-assign
          to the loop variable.

fixes:  #19639
closes: #19658

supported by AI

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-13 19:26:05 +00:00
Yasuhiro Matsumoto
ba861f8c53 patch 9.2.0153: No support to act as a channel server
Problem:  Vim can only act as a channel client (ch_open). There is
          no way for an external process to initiate a connection
          to a running Vim instance using the Channel API.
Solution: Implement ch_listen() and the underlying server-side
          socket logic. This allows Vim to listen on a port or
          Unix domain socket. When a client connects, a new
          channel is automatically created and passed to a
          user-defined callback (Yasuhiro Matsumoto).

closes: #19231

Co-authored-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
2026-03-13 19:15:25 +00:00
Yasuhiro Matsumoto
16d421a4d9 patch 9.2.0152: concatenating strings is slow
Problem:  concatenating strings is slow
Solution: Use grow_string_tv() to grow the existing string buffer in
          place when possible (Yasuhiro Matsumoto).

closes: #19642

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-13 17:45:36 +00:00
Yasuhiro Matsumoto
475d6e2f1d patch 9.2.0151: blob_from_string() is slow for long strings
Problem:  blob_from_string() is slow for long strings
Solution: Use ga_grow() to allocate memory once, perform a bulk copy
          with mch_memmove() then translate NL to NUL in-place
          (Yasuhiro Matsumoto).

closes: #19665

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-13 17:36:34 +00:00
Yasuhiro Matsumoto
7c8168aa0a patch 9.2.0150: synchronized terminal update may cause display artifacts
Problem:  When using synchronized terminal output, the internal
          output buffer  is not flushed before sending the
          End Synchronized Update (ESU) sequence. This causes
          redrawing artifacts.
Solution: Call out_flush() immediately before sending the ESU
          sequence to ensure all pending drawing commands are
          contained within the synchronized update window.
          (Yasuhiro Matsumoto)

closes: #19662

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-13 17:08:17 +00:00
Christian Brabandt
3697153993 patch 9.2.0149: Vim9: segfault when unletting an imported variable
Problem:  do_unlet_var() unconditionally calls dictitem_remove() in its
          final else branch, but for imported items lp->ll_dict is NULL,
          causing a segfault (Peter Kenny)
Solution: Add a NULL check and return E1260 instead.

Affects :unlet at vim9script level and inside legacy :function.
The :def case already worked (handled in vim9cmds.c).

fixes:  #19637
closes: #19657

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-13 16:57:00 +00:00
John Marriott
9f983a9560 patch 9.2.0148: Compile error when FEAT_DIFF is not defined
Problem:  Compile error when FEAT_DIFF is not defined (after v9.2.0144)
Solution: Add ifdefs around those lines (John Marriott).

related: #19622

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-12 21:27:58 +00:00
Eisuke Kawashima
3697c6b020 runtime(ssh): ignore case in 'keywordprg', update syntax script
- ftplugin(sshdconfig): use "-I" for 'keywordprg' to search
  case-insensitive in the man page
- syntax(sshdconfig,sshconfig): Mark "lowdelay", "throughput", and
  "reliability" as deprecated for IPQoS, highlighting them as
  errors/warnings to reflect OpenSSH 10.1p1 release

Reference:
https://www.openssh.org/releasenotes.html#10.1p1

closes: #19636

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Jakub Jelen <jakuje@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-12 20:04:17 +00:00
Yasuhiro Matsumoto
67deae3b77 patch 9.2.0147: blob: concatenation can be improved
Problem:  blob: concatenation can be improved
Solution: Use ga_grow() to allocate space once and mch_memmove() to copy
          the blob data as a single block and fall back to the previous
          byte by byte append (Yasuhiro Matsumoto).

closes: #19645

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-12 19:35:42 +00:00
Yasuhiro Matsumoto
97a75d835b patch 9.2.0146: dictionary lookups can be improved
Problem:  dictionary lookups can be improved
Solution: Replace the vim_strncpy() by mch_memmove() call.
          (Yasuhiro Matsumoto).

closes: #19646

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-12 19:26:01 +00:00
Yasuhiro Matsumoto
55464b5d18 patch 9.2.0145: UTF-8 decoding and length calculation can be improved
Problem:  Vim often calls utf_ptr2char() and utf_ptr2len() separately.
Solution: Refactor UTF-8 hot paths into utf_ptr2char_and_len() to
          decode the codepoint and byte length in a single pass.
          Fold combining character logic into the same optimized flow.
          Improves redraw performance by ~8-10% in UTF-8 heavy
          scenarios (Yasuhiro Matsumoto).

closes: #19649

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-12 19:15:28 +00:00
Hirohito Higashi
2d14d62c50 patch 9.2.0144: 'statuslineopt' is a global only option
Problem:  'statuslineopt' is a global only option and configuring the
          line height is limited.
Solution: Make 'statuslineopt' global-local to a window and allow to
          configure a fixed-height height statusline per window
          (Hirohito Higashi).

closes: #19622

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-12 18:49:38 +00:00
Yinzuo Jiang
5890ea5397 patch 9.2.0143: termdebug: no support for thread and condition in :Break
Problem:  termdebug :Break does not support `thread` and `if` arguments
Solution: extend :Break and :Tbreak to accept optional location, thread
          {nr}, and if {expr} arguments (Yinzuo Jiang).

closes: #19613

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-12 18:34:37 +00:00
Christian Brabandt
401f9aeddf patch 9.2.0142: Coverity: Dead code warning
Problem:  Coverity: Dead code warning for expressions in non-gui builds
          (after v9.2.0139)
Solution: add ifdef FEAT_GUI

CID: 1685426
closes: #19654

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-12 18:23:38 +00:00
Christian Brabandt
c5f283d641 patch 9.2.0141: :perl ex commands allowed in restricted mode
Problem:  :perl ex commands allowed in restricted mode (pyllyukko)
Solution: Add EX_RESTRICT flag to :perldo/:perl command definition.

closes: #19653

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-11 21:50:48 +00:00
Christian Brabandt
3c15945337 runtime(doc): update option type of 'termresize' option (after v9.2.0139)
as reported by: Antonio Giovanni Colombo <azc100@gmail.com>

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-11 21:46:27 +00:00
Yasuhiro Matsumoto
2ca96b09d7 patch 9.2.0140: file reading performance can be improved
Problem:  Reading large files is slow because UTF-8 validation and
          newline scanning are performed byte-by-byte. Initial file
          loading also triggers listener and channel processing.
Solution: Use memchr() for SIMD-optimized newline scanning, implement
          word-at-a-time ASCII skipping during UTF-8 validation using a
          bitmask, skip listener/netbeans/channel notifications
          when the ML_APPEND_NEW flag is set during readfile()
          (Yasuhiro Matsumoto).

closes: #19612

Co-authored-by: NRK <nrk@disroot.org>
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-11 20:18:26 +00:00
Foxe Chen
c970b470fb patch 9.2.0139: Cannot configure terminal resize event
Problem:  Cannot configure terminal resize event
Solution: Add the 'termresize' option and allow to use in-band window
          resize events (Foxe Chen).

closes: #19596

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-11 20:03:36 +00:00
Doug Kearns
2cf18fcc24 runtime(python): Update syntax, improve pythonNumber pattern performance
- Improve the performance of all pythonNumber patterns by unrolling
  digit/underscore sequence loops.
- Split the float literal pattern into two simpler patterns.

fixes:  #19625 (Reported by James McCoy)
closes: #19630

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-11 19:47:55 +00:00
Foxe Chen
49a5a80410 patch 9.2.0138: winhighlight option handling can be improved
Problem:  winhighlight option handling can be improved
          (after: v9.2.0093)
Solution: Check entire override stack in update_highlight_overrides();
          update w_hl of every window in highlight_changed() (Foxe Chen).

closes: #19633

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-11 19:42:46 +00:00
Eisuke Kawashima
8f2cd47404 runtime(sudoers): update filetype plugin and syntax script
- remove `set isk+=-` to highlight `-=` operator correctly
- implement highlighting of GID
- fix highlight of hostname and add special value ALL
- fix highlight of IP address
- update include and includedir patterns
- remove duplicate syntax rules
- add missing options
- fix highlight of parameter assignment (limit operators to list
  parameters)
- fix highlight of string and list parameters with trailing whitespaces
- implement highlight of permission (octal)
- implement highlight of floating point numbers
- implement highlight of timeout-specific options
- support highlight of negatable options (integer, mode, float, timeout,
  string)
- allow sudoersListParameter to be negated
- fix highlight of comma-separated parameter list used as boolean
- fix highlight of parameter negation (prevent highlighting ill-formed `! !`)
- fix highlight of Tag_Spec
- allow empty Runas spec: `()` and `(:)`
- fix highlight of comma-concatenated commands, hosts, and users
- check word boundaries for special value ALL
- implement highlight of Option_Spec
- fix highlight in User_Spec (specifically for Host position)
- fix highlight of `Default!` command
- support highlight of digests (sha224, etc.)
- add syntax test and update header

closes: #19634

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-11 19:33:36 +00:00
Eisuke Kawashima
1429277f0a gitattributes: mark dump files as linguist-generated
closes: #19635

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-11 19:23:41 +00:00
Christian Brabandt
36d6e87542 patch 9.2.0137: [security]: crash with composing char in collection range
Problem:  Using a composing character as the end of a range inside a
          collection may corrupt the NFA postfix stack
          (Nathan Mills, after v9.1.0011)
Solution: When a character is used as the endpoint of a range, do not emit
          its composing characters separately. Range handling only uses
          the base codepoint.

supported by AI

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-9phh-423r-778r

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-11 18:52:56 +00:00
Christian Brabandt
71fd19d7ac runtime(open): Use job_start() on Linux
Problem:  With zsh, executing :!nohup xdg-open url >/dev/null 2>&1 &
          does not launch the browser. This occurs presumably because
          gvim/zsh cleans up background processes in a non-interactive
          session too quickly.
Solution: Use job_start() with "stoponexit" set to an empty string.
          This bypasses the shell entirely (fixing the zsh issue)
          and ensures the browser process is not killed when Vim exits.
          On Linux, shellescape() is removed as job_start() in list
          mode handles special characters natively.

fixes: #19594

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-10 20:42:43 +00:00
Martin Tournoij
c6f6f1602d runtime(toml): update syntax script and fix highlight of dates and escapes
From upstream:
https://github.com/cespare/vim-toml/pull/69
https://github.com/cespare/vim-toml/pull/70

closes: #19591

Signed-off-by: Martin Tournoij <martin@arp242.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-10 20:02:05 +00:00
Huihui Huang
93a7855f01 patch 9.2.0136: memory leak in add_interface_from_super_class()
Problem:  memory leak in add_interface_from_super_class() in
          src/vim9class.c
Solution: Free variable intf_name in the error case, decrement the
          impl_gap grow array (Huihui Huang).

closes: #19629

Signed-off-by: Huihui Huang <625173@qq.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-10 19:56:08 +00:00
Huihui Huang
e945350f11 patch 9.2.0135: memory leak in eval_tuple()
Problem:  memory leak in eval_tuple() in src/tuple.c
Solution: Free variable tuple on early return (Huihui Huang).

closes: #19628

Signed-off-by: Huihui Huang <625173@qq.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-10 19:49:55 +00:00
Huihui Huang
ede5252d89 patch 9.2.0134: memory leak in socket_server_send_reply()
Problem:  memory leak in socket_server_send_reply() in src/os_unix.c
Solution: Free final in the error case when returning early
          (Huihui Huang).

closes: #19627

Signed-off-by: Huihui Huang <625173@qq.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-10 19:40:33 +00:00
Huihui Huang
248de84d86 patch 9.2.0133: memory leak in netbeans_file_activated()
Problem:  memory leak in netbeans_file_activated()
Solution: Free q on early return (Huihui Huang).

closes: #19626

Signed-off-by: Huihui Huang <625173@qq.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-10 19:33:22 +00:00
785 changed files with 29332 additions and 8888 deletions

1
.gitattributes vendored
View File

@@ -38,5 +38,6 @@ src/po/vim.pot diff=ignore_vim_pot
#
# https://docs.github.com/en/repositories/working-with-files/managing-files/customizing-how-changed-files-appear-on-github
src/po/vim.pot linguist-generated=true
*.dump linguist-generated=true
runtime/syntax/testdir/input/vim_ex_help.vim -text diff linguist-language=vim linguist-detectable=true

6
.github/MAINTAINERS vendored
View File

@@ -80,6 +80,7 @@ runtime/compiler/jjs.vim @dkearns
runtime/compiler/jq.vim @vito-c
runtime/compiler/jshint.vim @dkearns
runtime/compiler/jsonlint.vim @dkearns
runtime/compiler/just.vim @Alarcritty
runtime/compiler/make.vim @Konfekt
runtime/compiler/mypy.vim @Konfekt
runtime/compiler/pandoc.vim @Konfekt
@@ -132,6 +133,7 @@ runtime/doc/xxd-ru.1 @RestorerZ
runtime/doc/xxd-ru.UTF-8.1 @RestorerZ
runtime/ftplugin/abaqus.vim @costerwi
runtime/ftplugin/abnf.vim @A4-Tacks
runtime/ftplugin/algol68.vim @dkearns
runtime/ftplugin/antlr4.vim @jiangyinzuo
runtime/ftplugin/apache.vim @dubgeiser
runtime/ftplugin/arduino.vim @k-takata
@@ -349,6 +351,7 @@ runtime/ftplugin/vdf.vim @ObserverOfTime
runtime/ftplugin/vim.vim @dkearns
runtime/ftplugin/wget.vim @dkearns
runtime/ftplugin/wget2.vim @dkearns
runtime/ftplugin/wks.vim @anakin4747
runtime/ftplugin/xcompose.vim @ObserverOfTime
runtime/ftplugin/xml.vim @chrisbra
runtime/ftplugin/xs.vim @petdance
@@ -470,6 +473,8 @@ runtime/syntax/shared/hgcommitDiff.vim @vegerot
runtime/syntax/abaqus.vim @costerwi
runtime/syntax/abnf.vim @A4-Tacks
runtime/syntax/aidl.vim @dpelle
runtime/syntax/algol68.vim @dkearns
runtime/syntax/amiga.vim @sodero
runtime/syntax/ant.vim @dkearns
runtime/syntax/antlr4.vim @jiangyinzuo
runtime/syntax/arduino.vim @johshoff
@@ -709,6 +714,7 @@ runtime/syntax/vroom.vim @dbarnett
runtime/syntax/wdl.vim @zenmatic
runtime/syntax/wget.vim @dkearns
runtime/syntax/wget2.vim @dkearns
runtime/syntax/wks.vim @anakin4747
runtime/syntax/xbl.vim @dkearns
runtime/syntax/xcompose.vim @ObserverOfTime
runtime/syntax/xml.vim @chrisbra

View File

@@ -0,0 +1,324 @@
name: Build Vim on Linux
description: Build Vim on Linux
inputs:
features:
description: Vim features
required: true
compiler:
description: Compiler
required: true
architecture:
description: Architecture
required: false
extra:
description: Extra flags
required: true
shadow:
description: Shadow directory
required: false
interface:
description: Interface of language interpreter
required: false
lua_ver:
description: Lua version
required: false
python3:
description: Python3 ABI type
required: false
coverage:
description: Enable coverage
required: false
runs:
using: "composite"
steps:
- name: Check Filelist (for packaging)
shell: bash
run: |
echo '::group::Check Filelist (for packaging)'
# If any files in the repository are not listed in Filelist this will
# exit with an error code and list the missing entries.
make -f ci/unlisted.make
echo '::endgroup::'
- name: Check hlgroups (are any new hlgroups added, but not handled in highlight.c)
shell: bash
run: |
echo '::group::Check hlgroups (are any new hlgroups added, but not handled in highlight.c)'
# If any highlight groups have been documented, but not handled in
# highlight.c, nor listed as 'intentionally left out' in hlgroups.ignore,
# exit with an error code and list the missing entries.
make -C ci -f hlgroups.make
echo '::endgroup::'
- name: Report executable syntax tests
if: contains(fromJSON(inputs.extra), 'syn_test_execs')
shell: bash
run: |
echo '::group::Report executable syntax tests'
# Search and list all found executable syntax tests, and exit with
# an error code.
make -C runtime/syntax executables
echo '::endgroup::'
- name: Add i386 packages to dpkg
if: inputs.architecture == 'i386'
shell: bash
run: |
echo '::group::Add i386 packages to dpkg'
sudo dpkg --add-architecture i386
echo '::endgroup::'
- name: Uninstall snap
shell: bash
run: |
echo '::group::Uninstall snap'
sudo bash ci/remove_snap.sh
echo '::endgroup::'
- name: Enable debug packages
shell: bash
run: |
echo '::group::Enable debug packages'
# Some of the ASAN suppressions are in libraries linked with dlopen
# and symbolization of them requires these debug packages.
sudo apt install ubuntu-dbgsym-keyring
sudo cp ci/ddebs.list /etc/apt/sources.list.d/ddebs.list
sudo cp ci/pinned-pkgs /etc/apt/preferences.d/pinned-pkgs
echo '::endgroup::'
- name: Install packages
shell: bash
run: |
echo '::group::Install packages'
# This is added by default, and it is often broken, but we don't need anything from it
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
PKGS=( \
gettext \
x11-utils \
labwc \
wl-clipboard \
wayland-utils \
libgtk-3-dev:${{ inputs.architecture }} \
libgtk-3-bin:${{ inputs.architecture }} \
desktop-file-utils \
libc6-dbgsym:${{ inputs.architecture }} \
libtool-bin \
libncurses-dev:${{ inputs.architecture }} \
libxt-dev:${{ inputs.architecture }} \
libegl-mesa0:${{ inputs.architecture }} \
libegl1:${{ inputs.architecture }} \
libegl1-mesa-dev:${{ inputs.architecture }} \
libepoxy-dev:${{ inputs.architecture }} \
libwayland-egl1:${{ inputs.architecture }} \
libwayland-client0:${{ inputs.architecture }} \
libwayland-cursor0:${{ inputs.architecture }} \
locales-all \
software-properties-common \
)
if ${{ contains(fromJSON(inputs.extra), 'asan') }} && ${{ contains(inputs.architecture, 'native') }}; then
PKGS+=( \
libepoxy0-dbgsym:${{ inputs.architecture }} \
libxdamage1-dbgsym:${{ inputs.architecture }} \
libxcb1-dbgsym:${{ inputs.architecture }} \
libgtk-3-bin-dbgsym:${{ inputs.architecture }} \
libgtk-3-0t64-dbgsym:${{ inputs.architecture }} \
libglib2.0-0t64-dbgsym:${{ inputs.architecture }} \
libglib2.0-bin-dbgsym:${{ inputs.architecture }} \
libglib2.0-dev-bin-dbgsym:${{ inputs.architecture }} \
)
fi
if ${{ inputs.features == 'huge' }}; then
LUA_VER=${{ inputs.lua_ver || '5.4' }}
PKGS+=( \
autoconf \
gdb \
lcov \
libcanberra-dev \
libperl-dev \
python3-dev \
liblua${LUA_VER}-dev \
lua${LUA_VER} \
ruby-dev \
tcl-dev \
cscope \
libsodium-dev \
attr \
libattr1-dev
)
fi
if ${{ contains(fromJSON(inputs.extra), 'proto') }}; then
PKGS+=( python3-clang )
fi
sudo apt-get update && sudo apt-get upgrade -y --allow-downgrades && sudo apt-get install -y --allow-downgrades "${PKGS[@]}"
- name: Install gcc-${{ env.GCC_VER }}
if: inputs.compiler == 'gcc'
shell: bash
run: |
echo '::group::Install gcc-${{ env.GCC_VER }}'
# ubuntu-toolchain-r/test PPA for gcc-13 compiler
# disabled because the installation failed, causing test failures
# sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update -y
sudo apt-get install -y gcc-${{ env.GCC_VER }}:${{ inputs.architecture }}
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ env.GCC_VER }} 100
sudo update-alternatives --set gcc /usr/bin/gcc-${{ env.GCC_VER }}
echo '::endgroup::'
- name: Install clang-${{ env.CLANG_VER }}
if: inputs.compiler == 'clang'
shell: bash
run: |
echo '::group::Install clang-${{ env.CLANG_VER }}'
. /etc/lsb-release
curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor | sudo tee /usr/share/keyrings/llvm-archive-keyring.gpg > /dev/null
echo "Types: deb
URIs: https://apt.llvm.org/${DISTRIB_CODENAME}/
Suites: llvm-toolchain-${DISTRIB_CODENAME}-${{ env.CLANG_VER }}
Components: main
Signed-By: /usr/share/keyrings/llvm-archive-keyring.gpg" | sudo tee /etc/apt/sources.list.d/llvm-toolchain.sources > /dev/null
sudo apt-get update -y
sudo apt-get install -y clang-${{ env.CLANG_VER }} llvm-${{ env.CLANG_VER }}
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${{ env.CLANG_VER }} 100
sudo update-alternatives --set clang /usr/bin/clang-${{ env.CLANG_VER }}
sudo update-alternatives --install /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-${{ env.CLANG_VER }} 100
sudo update-alternatives --install /usr/bin/asan_symbolize asan_symbolize /usr/bin/asan_symbolize-${{ env.CLANG_VER }} 100
echo '::endgroup::'
- name: Set up environment
shell: bash
run: |
echo '::group::Set up environment'
mkdir -p "${LOG_DIR}"
mkdir -p "${HOME}/bin"
echo "${HOME}/bin" >> $GITHUB_PATH
(
echo "LINUX_VERSION=$(uname -r)"
echo "NPROC=$(getconf _NPROCESSORS_ONLN)"
echo "TMPDIR=$(mktemp -d -p /tmp)"
case "${{ inputs.features }}" in
tiny)
echo "TEST=testtiny"
if ${{ contains(fromJSON(inputs.extra), 'nogui') }}; then
CONFOPT="--disable-gui"
fi
;;
normal)
;;
huge)
echo "TEST=scripttests test_libvterm indenttest syntaxtest"
INTERFACE=${{ inputs.interface || 'yes' }}
if ${{ inputs.python3 == 'stable-abi' }}; then
PYTHON3_CONFOPT="--with-python3-stable-abi=3.8"
fi
# The ubuntu-24.04 CI runner does not provide a python2 package.
CONFOPT="--enable-perlinterp=${INTERFACE} --enable-pythoninterp=no --enable-python3interp=${INTERFACE} --enable-rubyinterp=${INTERFACE} --enable-luainterp=${INTERFACE} --enable-tclinterp=${INTERFACE} ${PYTHON3_CONFOPT}"
;;
esac
if ${{ contains(fromJSON(inputs.extra), 'no_x11_wl') }}; then
CONFOPT="${CONFOPT} --without-x --disable-gui --without-wayland --enable-socketserver"
fi
if ${{ inputs.coverage == true }}; then
CFLAGS="${CFLAGS} --coverage -DUSE_GCOV_FLUSH"
echo "LDFLAGS=--coverage"
fi
if ${{ contains(fromJSON(inputs.extra), 'uchar') }}; then
CFLAGS="${CFLAGS} -funsigned-char"
fi
if ${{ contains(fromJSON(inputs.extra), 'testgui') }}; then
echo "TEST=-C src testgui"
fi
if ${{ contains(fromJSON(inputs.extra), 'unittests') }}; then
echo "TEST=unittests"
fi
if ${{ contains(fromJSON(inputs.extra), 'asan') }}; then
echo "SANITIZER_CFLAGS=-g -O0 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize-recover=all -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer"
echo "ASAN_OPTIONS=print_stacktrace=1:log_path=${LOG_DIR}/asan"
echo "UBSAN_OPTIONS=print_stacktrace=1:log_path=${LOG_DIR}/ubsan"
echo "LSAN_OPTIONS=suppressions=${GITHUB_WORKSPACE}/src/testdir/lsan-suppress.txt"
fi
if ${{ contains(fromJSON(inputs.extra), 'vimtags') }}; then
echo "TEST=-C runtime/doc vimtags VIMEXE=../../${SRCDIR}/vim"
fi
if ${{ contains(fromJSON(inputs.extra), 'proto') }}; then
echo "TEST=-C src protoclean proto"
fi
echo "CFLAGS=${CFLAGS}"
echo "CONFOPT=${CONFOPT}"
# Disables GTK attempt to integrate with the accessibility service that does run in CI.
echo "NO_AT_BRIDGE=1"
) >> $GITHUB_ENV
echo '::endgroup::'
- name: Set up system
shell: bash
run: |
echo '::group::Set up system'
if [[ ${CC} = clang ]]; then
# Use llvm-cov instead of gcov when compiler is clang.
ln -fs /usr/bin/llvm-cov ${HOME}/bin/gcov
fi
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0
sudo usermod -a -G audio "${USER}"
sudo bash ci/setup-xvfb.sh
echo '::endgroup::'
- name: Check autoconf
if: contains(fromJSON(inputs.extra), 'unittests')
shell: bash
run: |
echo '::group::Check autoconf'
make -C src autoconf
echo '::endgroup::'
- name: Set up shadow dir
if: inputs.shadow
shell: bash
run: |
echo '::group::Set up shadow dir'
make -C src shadow
echo "SRCDIR=${{ inputs.shadow }}" >> $GITHUB_ENV
echo "SHADOWOPT=-C ${{ inputs.shadow }}" >> $GITHUB_ENV
echo '::endgroup::'
- name: Configure
shell: bash
run: |
echo '::group::Configure'
./configure --with-features=${{ inputs.features }} ${CONFOPT} --enable-fail-if-missing
# Append various warning flags to CFLAGS.
sed -i -f ci/config.mk.sed ${SRCDIR}/auto/config.mk
sed -i -f ci/config.mk.${CC}.sed ${SRCDIR}/auto/config.mk
if [[ ${CC} = clang ]]; then
# Suppress some warnings produced by clang 12 and later.
sed -i -f ci/config.mk.clang-12.sed ${SRCDIR}/auto/config.mk
fi
echo '::endgroup::'
- name: Build
if: (!contains(fromJSON(inputs.extra), 'unittests'))
shell: bash
run: |
echo '::group::Build'
make ${SHADOWOPT} -j${NPROC}
echo '::endgroup::'
- name: Check version
if: (!contains(fromJSON(inputs.extra), 'unittests'))
shell: bash
run: |
echo '::group::Check version'
"${SRCDIR}"/vim --version
"${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
"${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-2.vim -c quit
if ${{ inputs.features == 'huge' }}; then
# Also check that optional and dynamic features are configured and working
"${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 \
-c "let g:required=['gettext', 'sodium', 'sound', 'perl', 'python3', 'lua', 'ruby', 'tcl']" \
-S ci/if_feat_check.vim -c quit
fi
echo '::endgroup::'

View File

@@ -1,10 +1,10 @@
name: 'test_artifacts'
name: "test_artifacts"
description: "Upload failed test artifacts"
runs:
using: "composite"
steps:
- name: Collect matrix properties for naming
uses: actions/github-script@v8
uses: actions/github-script@v9
id: matrix-props
env:
MATRIX_PROPS: ${{ toJSON(matrix) }}
@@ -27,7 +27,7 @@ runs:
# set as the "result".
result-encoding: string
- name: Upload failed tests
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
# Name of the artifact to upload.
name: ${{ format('GH-{0}-{1}-{2}-{3}-{4}-failed-tests',
@@ -40,9 +40,10 @@ runs:
# A file, directory or wildcard pattern that describes what
# to upload.
path: |
${{ github.workspace }}/runtime/indent/testdir/*.fail
${{ github.workspace }}/runtime/syntax/testdir/failed/*
${{ github.workspace }}/src/testdir/failed/*
${{ github.workspace }}/logs/**/*.symbolized
${{ github.workspace }}/runtime/indent/testdir/*.fail
${{ github.workspace }}/runtime/syntax/testdir/failed/*
${{ github.workspace }}/src/testdir/failed/*
# The desired behavior if no files are found using the
# provided path.
if-no-files-found: ignore

View File

@@ -1,8 +1,16 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
directories:
- "/"
- "/.github/actions/**/*"
schedule:
interval: "weekly"
commit-message:
prefix: "CI"
cooldown:
default-days: 7
groups:
github-actions:
patterns:
- "*"

View File

@@ -2,7 +2,7 @@ name: GitHub CI
on:
push:
branches: ['**']
branches: ["**"]
pull_request:
# Cancels all previous workflow runs for pull requests that have not completed.
@@ -28,7 +28,7 @@ jobs:
LEAK_CFLAGS: -DEXITFREE
LOG_DIR: ${{ github.workspace }}/logs
TERM: xterm
DISPLAY: ':99'
DISPLAY: ":99"
DEBIAN_FRONTEND: noninteractive
strategy:
@@ -67,12 +67,6 @@ jobs:
coverage: true
interface: dynamic
extra: [uchar, testgui]
- features: huge
compiler: clang
# Lua5.1 is the most widely used version (since it's what LuaJIT is
# compatible with), so ensure it works
lua_ver: '5.1'
extra: [asan]
- features: huge
compiler: gcc
coverage: true
@@ -84,260 +78,32 @@ jobs:
architecture: arm64
- features: normal
compiler: gcc
extra: [vimtags, proto, preproc_indent, encoding]
extra: [vimtags, proto, preproc_indent, encoding, codestyle]
- features: huge
compiler: gcc
extra: [no_x11_wl]
steps:
- name: Checkout repository from github
- name: Checkout repository from GitHub
uses: actions/checkout@v6
- name: Check Filelist (for packaging)
run: |
# If any files in the repository are not listed in Filelist this will
# exit with an error code and list the missing entries.
make -f ci/unlisted.make
- name: Check hlgroups (are any new hlgroups added, but not handled in highlight.c)
run: |
# If any highlight groups have been documented, but not handled in
# highlight.c, nor listed as 'intentionally left out' in hlgroups.ignore,
# exit with an error code and list the missing entries.
make -C ci -f hlgroups.make
- name: Report executable syntax tests
if: contains(matrix.extra, 'syn_test_execs')
run: |
# Search and list all found executable syntax tests, and exit with
# an error code.
make -C runtime/syntax executables
- run: sudo dpkg --add-architecture i386
if: matrix.architecture == 'i386'
- name: Uninstall snap
run: |
sudo bash ci/remove_snap.sh
- name: Enable debug packages
run: |
# Some of the ASAN suppressions are in libraries linked with dlopen
# and symbolization of them requires these debug packages.
sudo apt install ubuntu-dbgsym-keyring
sudo cp ci/ddebs.list /etc/apt/sources.list.d/ddebs.list
sudo cp ci/pinned-pkgs /etc/apt/preferences.d/pinned-pkgs
- name: Install packages
run: |
# This is added by default, and it is often broken, but we don't need anything from it
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
PKGS=( \
gettext \
x11-utils \
labwc \
wl-clipboard \
wayland-utils \
libgtk-3-dev:${{ matrix.architecture }} \
libgtk-3-bin:${{ matrix.architecture }} \
desktop-file-utils \
libc6-dbgsym:${{ matrix.architecture }} \
libtool-bin \
libncurses-dev:${{ matrix.architecture }} \
libxt-dev:${{ matrix.architecture }} \
libegl-mesa0:${{ matrix.architecture }} \
libegl1:${{ matrix.architecture }} \
libegl1-mesa-dev:${{ matrix.architecture }} \
libepoxy-dev:${{ matrix.architecture }} \
libwayland-egl1:${{ matrix.architecture }} \
libwayland-client0:${{ matrix.architecture }} \
libwayland-cursor0:${{ matrix.architecture }} \
locales-all \
software-properties-common \
)
if ${{ contains(matrix.extra, 'asan') }} && ${{ contains(matrix.architecture, 'native') }}; then
PKGS+=( \
libepoxy0-dbgsym:${{ matrix.architecture }} \
libxdamage1-dbgsym:${{ matrix.architecture }} \
libxcb1-dbgsym:${{ matrix.architecture }} \
libgtk-3-bin-dbgsym:${{ matrix.architecture }} \
libgtk-3-0t64-dbgsym:${{ matrix.architecture }} \
libglib2.0-0t64-dbgsym:${{ matrix.architecture }} \
libglib2.0-bin-dbgsym:${{ matrix.architecture }} \
libglib2.0-dev-bin-dbgsym:${{ matrix.architecture }} \
)
fi
if ${{ matrix.features == 'huge' }}; then
LUA_VER=${{ matrix.lua_ver || '5.4' }}
PKGS+=( \
autoconf \
gdb \
lcov \
libcanberra-dev \
libperl-dev \
python3-dev \
liblua${LUA_VER}-dev \
lua${LUA_VER} \
ruby-dev \
tcl-dev \
cscope \
libsodium-dev \
attr \
libattr1-dev
)
fi
if ${{ contains(matrix.extra, 'proto') }}; then
PKGS+=( python3-clang )
fi
sudo apt-get update && sudo apt-get upgrade -y --allow-downgrades && sudo apt-get install -y --allow-downgrades "${PKGS[@]}"
- name: Install gcc-${{ env.GCC_VER }}
if: matrix.compiler == 'gcc'
run: |
# ubuntu-toolchain-r/test PPA for gcc-13 compiler
# disabled because the installation failed, causing test failures
# sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update -y
sudo apt-get install -y gcc-${{ env.GCC_VER }}:${{ matrix.architecture }}
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ env.GCC_VER }} 100
sudo update-alternatives --set gcc /usr/bin/gcc-${{ env.GCC_VER }}
- name: Install clang-${{ env.CLANG_VER }}
if: matrix.compiler == 'clang'
run: |
. /etc/lsb-release
curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor | sudo tee /usr/share/keyrings/llvm-archive-keyring.gpg > /dev/null
echo "Types: deb
URIs: https://apt.llvm.org/${DISTRIB_CODENAME}/
Suites: llvm-toolchain-${DISTRIB_CODENAME}-${{ env.CLANG_VER }}
Components: main
Signed-By: /usr/share/keyrings/llvm-archive-keyring.gpg" | sudo tee /etc/apt/sources.list.d/llvm-toolchain.sources > /dev/null
sudo apt-get update -y
sudo apt-get install -y clang-${{ env.CLANG_VER }} llvm-${{ env.CLANG_VER }}
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${{ env.CLANG_VER }} 100
sudo update-alternatives --set clang /usr/bin/clang-${{ env.CLANG_VER }}
sudo update-alternatives --install /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-${{ env.CLANG_VER }} 100
sudo update-alternatives --install /usr/bin/asan_symbolize asan_symbolize /usr/bin/asan_symbolize-${{ env.CLANG_VER }} 100
- name: Set up environment
run: |
mkdir -p "${LOG_DIR}"
mkdir -p "${HOME}/bin"
echo "${HOME}/bin" >> $GITHUB_PATH
(
echo "LINUX_VERSION=$(uname -r)"
echo "NPROC=$(getconf _NPROCESSORS_ONLN)"
echo "TMPDIR=$(mktemp -d -p /tmp)"
case "${{ matrix.features }}" in
tiny)
echo "TEST=testtiny"
if ${{ contains(matrix.extra, 'nogui') }}; then
CONFOPT="--disable-gui"
fi
;;
normal)
;;
huge)
echo "TEST=scripttests test_libvterm indenttest syntaxtest"
INTERFACE=${{ matrix.interface || 'yes' }}
if ${{ matrix.python3 == 'stable-abi' }}; then
PYTHON3_CONFOPT="--with-python3-stable-abi=3.8"
fi
# The ubuntu-24.04 CI runner does not provide a python2 package.
CONFOPT="--enable-perlinterp=${INTERFACE} --enable-pythoninterp=no --enable-python3interp=${INTERFACE} --enable-rubyinterp=${INTERFACE} --enable-luainterp=${INTERFACE} --enable-tclinterp=${INTERFACE} ${PYTHON3_CONFOPT}"
;;
esac
if ${{ contains(matrix.extra, 'no_x11_wl') }}; then
CONFOPT="${CONFOPT} --without-x --disable-gui --without-wayland --enable-socketserver"
fi
if ${{ matrix.coverage == true }}; then
CFLAGS="${CFLAGS} --coverage -DUSE_GCOV_FLUSH"
echo "LDFLAGS=--coverage"
fi
if ${{ contains(matrix.extra, 'uchar') }}; then
CFLAGS="${CFLAGS} -funsigned-char"
fi
if ${{ contains(matrix.extra, 'testgui') }}; then
echo "TEST=-C src testgui"
fi
if ${{ contains(matrix.extra, 'unittests') }}; then
echo "TEST=unittests"
fi
if ${{ contains(matrix.extra, 'asan') }}; then
echo "SANITIZER_CFLAGS=-g -O0 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize-recover=all -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer"
echo "ASAN_OPTIONS=print_stacktrace=1:log_path=${LOG_DIR}/asan"
echo "UBSAN_OPTIONS=print_stacktrace=1:log_path=${LOG_DIR}/ubsan"
echo "LSAN_OPTIONS=suppressions=${GITHUB_WORKSPACE}/src/testdir/lsan-suppress.txt"
fi
if ${{ contains(matrix.extra, 'vimtags') }}; then
echo "TEST=-C runtime/doc vimtags VIMEXE=../../${SRCDIR}/vim"
fi
if ${{ contains(matrix.extra, 'proto') }}; then
echo "TEST=-C src protoclean proto"
fi
echo "CFLAGS=${CFLAGS}"
echo "CONFOPT=${CONFOPT}"
# Disables GTK attempt to integrate with the accessibility service that does run in CI.
echo "NO_AT_BRIDGE=1"
) >> $GITHUB_ENV
- name: Set up system
run: |
if [[ ${CC} = clang ]]; then
# Use llvm-cov instead of gcov when compiler is clang.
ln -fs /usr/bin/llvm-cov ${HOME}/bin/gcov
fi
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0
sudo usermod -a -G audio "${USER}"
sudo bash ci/setup-xvfb.sh
- name: Check autoconf
if: contains(matrix.extra, 'unittests')
run: |
make -C src autoconf
- name: Set up shadow dir
if: matrix.shadow
run: |
make -C src shadow
echo "SRCDIR=${{ matrix.shadow }}" >> $GITHUB_ENV
echo "SHADOWOPT=-C ${{ matrix.shadow }}" >> $GITHUB_ENV
- name: Configure
run: |
./configure --with-features=${{ matrix.features }} ${CONFOPT} --enable-fail-if-missing
# Append various warning flags to CFLAGS.
sed -i -f ci/config.mk.sed ${SRCDIR}/auto/config.mk
sed -i -f ci/config.mk.${CC}.sed ${SRCDIR}/auto/config.mk
if [[ ${CC} = clang ]]; then
# Suppress some warnings produced by clang 12 and later.
sed -i -f ci/config.mk.clang-12.sed ${SRCDIR}/auto/config.mk
fi
- name: Build
if: (!contains(matrix.extra, 'unittests'))
run: |
make ${SHADOWOPT} -j${NPROC}
- name: Check version
if: (!contains(matrix.extra, 'unittests'))
run: |
"${SRCDIR}"/vim --version
"${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
"${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-2.vim -c quit
if ${{ matrix.features == 'huge' }}; then
# Also check that optional and dynamic features are configured and working
"${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 \
-c "let g:required=['gettext', 'sodium', 'sound', 'perl', 'python3', 'lua', 'ruby', 'tcl']" \
-S ci/if_feat_check.vim -c quit
fi
timeout-minutes: 15
uses: ./.github/actions/build_vim_on_linux
with:
features: ${{ matrix.features }}
compiler: ${{ matrix.compiler }}
architecture: ${{ matrix.architecture }}
extra: ${{ toJSON(matrix.extra) }}
shadow: ${{ matrix.shadow }}
interface: ${{ matrix.interface }}
lua_ver: ${{ matrix.lua_ver }}
python3: ${{ matrix.python3 }}
coverage: ${{ matrix.coverage }}
- name: Test
timeout-minutes: 30
run: |
make ${SHADOWOPT} ${TEST}
timeout-minutes: 20
run: make ${SHADOWOPT} ${TEST}
# Enable to debug failing tests live and ssh into the CI runners
# - name: Setup tmate session
@@ -346,7 +112,8 @@ jobs:
# with:
# limit-access-to-actor: true
- if: ${{ !cancelled() }}
- name: Upload failed test artifacts
if: ${{ !cancelled() }}
uses: ./.github/actions/test_artifacts
- name: Vim tags
@@ -370,6 +137,11 @@ jobs:
true
)
- name: Check Source Code style
if: contains(matrix.extra, 'codestyle')
run: |
make -C src/testdir codestyle
- name: Check preprocessor indent
if: contains(matrix.extra, 'preproc_indent')
run: |
@@ -400,20 +172,78 @@ jobs:
- name: Codecov
timeout-minutes: 20
if: matrix.coverage
uses: codecov/codecov-action@v5
uses: codecov/codecov-action@v6
with:
flags: linux,${{ matrix.features }}-${{ matrix.compiler }}-${{ join(matrix.extra, '-') }}
token: ${{ secrets.CODECOV_TOKEN }}
linux-asan:
runs-on: ubuntu-24.04
env:
CC: clang
CLANG_VER: 21
SRCDIR: ./src
LEAK_CFLAGS: -DEXITFREE
LOG_DIR: ${{ github.workspace }}/logs
TERM: xterm
DISPLAY: ":99"
DEBIAN_FRONTEND: noninteractive
strategy:
fail-fast: false
matrix:
testset:
- tinytests
- newtests.1
- newtests.2
steps:
- name: Checkout repository from GitHub
uses: actions/checkout@v6
- name: Build
timeout-minutes: 15
uses: ./.github/actions/build_vim_on_linux
with:
features: huge
compiler: clang
extra: '["asan"]'
# Lua5.1 is the most widely used version (since it's what LuaJIT is
# compatible with), so ensure it works
lua_ver: "5.1"
- name: Test (tinytests)
if: matrix.testset == 'tinytests'
timeout-minutes: 20
run: make ${TEST} NEW_TESTS_RES=
- name: Test (newtests)
if: startsWith(matrix.testset, 'newtests')
timeout-minutes: 20
env:
JOB_INDEX: ${{ strategy.job-index }}
JOB_TOTAL: ${{ strategy.job-total }}
run: |
set -x
make -C src/testdir SCRIPTS_TINY_OUT= \
NEW_TESTS_RES="$(python3 ci/gen_testset.py $((JOB_TOTAL-1)) | jq -r --argjson i $((JOB_INDEX-1)) '.[$i]|join(" ")')"
- name: ASan logs
if: contains(matrix.extra, 'asan') && !cancelled()
if: ${{ !cancelled() }}
run: |
for f in $(grep -lR '#[[:digit:]]* *0x[[:xdigit:]]*' "${LOG_DIR}"); do
echo "$f"
asan_symbolize -l "$f"
(
echo "$f"
asan_symbolize -l "$f"
) | tee "$f".symbolized
false # in order to fail a job
done
- name: Upload failed test artifacts
if: ${{ !cancelled() }}
uses: ./.github/actions/test_artifacts
macos:
runs-on: ${{ matrix.runner }}
@@ -431,7 +261,7 @@ jobs:
runner: [macos-15-intel, macos-26]
steps:
- name: Checkout repository from github
- name: Checkout repository from GitHub
uses: actions/checkout@v6
- name: Install packages
@@ -498,7 +328,8 @@ jobs:
run: |
make ${TEST}
- if: ${{ !cancelled() }}
- name: Upload failed test artifacts
if: ${{ !cancelled() }}
uses: ./.github/actions/test_artifacts
windows:
@@ -508,7 +339,7 @@ jobs:
# Interfaces
# Lua
LUA_VER: 54
LUA_VER_DOT: '5.4'
LUA_VER_DOT: "5.4"
LUA_RELEASE: 5.4.2
LUA32_URL: https://downloads.sourceforge.net/luabinaries/lua-%LUA_RELEASE%_Win32_dllw6_lib.zip
LUA64_URL: https://downloads.sourceforge.net/luabinaries/lua-%LUA_RELEASE%_Win64_dllw6_lib.zip
@@ -517,16 +348,16 @@ jobs:
LUA_DIR_SLASH: D:/Lua
# Python 2
PYTHON_VER: 27
PYTHON_VER_DOT: '2.7'
PYTHON_VER_DOT: "2.7"
PYTHON_DIR: 'C:\Python27'
# Python 3
PYTHON3_VER: 313
PYTHON3_VER_DOT: '3.13'
PYTHON3_VER_DOT: "3.13"
# Other dependencies
# winpty
WINPTY_URL: https://github.com/rprichard/winpty/releases/download/0.4.3/winpty-0.4.3-msvc2015.zip
# libsodium
SODIUM_VER: '1.0.20'
SODIUM_VER: "1.0.20"
# SODIUM_MSVC_URL: https://download.libsodium.org/libsodium/releases/libsodium-%SODIUM_VER%-stable-msvc.zip
SODIUM_MSVC_URL: https://github.com/jedisct1/libsodium/releases/download/%SODIUM_VER%-RELEASE/libsodium-%SODIUM_VER%-msvc.zip
SODIUM_MSVC_VER: v143
@@ -604,7 +435,7 @@ jobs:
echo "SODIUM_DIR=${SODIUM_DIR}" >> $GITHUB_ENV
echo "GETTEXT_PATH=D:\gettext${{ matrix.arch == 'x64' && '64' || '32' }}" >> $GITHUB_ENV
- uses: msys2/setup-msys2@v2
- uses: msys2/setup-msys2@v2.31.1
if: matrix.toolchain == 'mingw'
with:
update: true
@@ -614,7 +445,7 @@ jobs:
msystem: ${{ env.MSYSTEM }}
release: false
- name: Checkout repository from github
- name: Checkout repository from GitHub
uses: actions/checkout@v6
- name: Create a list of download URLs
@@ -628,7 +459,7 @@ jobs:
echo %GETTEXT64_URL%>> urls.txt
- name: Cache downloaded files
uses: actions/cache@v5
uses: actions/cache@v5.0.5
with:
path: downloads
key: ${{ runner.os }}-${{ matrix.arch }}-${{ hashFiles('urls.txt') }}
@@ -776,7 +607,7 @@ jobs:
# copy src\vim*.dll artifacts
#
#- name: Upload Artifact
# uses: actions/upload-artifact@v1
# uses: actions/upload-artifact@v7
# with:
# name: vim${{ matrix.bits }}-${{ matrix.toolchain }}
# path: ./artifacts
@@ -828,7 +659,8 @@ jobs:
nmake -nologo -f Make_mvc.mak tiny VIMPROG=..\vim || exit 1
)
- if: ${{ !cancelled() }}
- name: Upload failed test artifacts
if: ${{ !cancelled() }}
uses: ./.github/actions/test_artifacts
- name: Generate gcov files
@@ -841,7 +673,7 @@ jobs:
- name: Codecov
timeout-minutes: 20
if: matrix.coverage
uses: codecov/codecov-action@v5
uses: codecov/codecov-action@v6
with:
directory: src
flags: windows,${{ matrix.toolchain }}-${{ matrix.arch }}-${{ matrix.features }}

View File

@@ -48,7 +48,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
uses: github/codeql-action/init@v4.35.2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -59,7 +59,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v4
uses: github/codeql-action/autobuild@v4.35.2
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@@ -73,4 +73,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
uses: github/codeql-action/analyze@v4.35.2

325
AGENTS.md Normal file
View File

@@ -0,0 +1,325 @@
# AGENTS.md
Guidance for AI coding agents working in the Vim repository.
## Project
Vim is a text editor written in C. The canonical repository is
https://github.com/vim/vim. The code is old and has grown organically over
the past 30+ years. Some files are vendored from upstream projects
(`src/xdiff`, `src/libvterm`); parts of the runtime are occasionally shared
with forks like Neovim.
Vim strives to be portable across several different operating systems and
aims to be a stable, robust editor gradually developing new features while
remaining backwards compatible as much as possible.
At the same time, Vim can be compiled with different feature sets, from the
POSIX compatible minimal vi to a full-fledged GUI editor which includes
additional scripting interfaces.
See `runtime/doc/develop.txt` for the high level design goals.
## Build and test
# Full build on Unix/Linux (from src/):
make
# Run the full test suite:
make test
# Generate proto files
make proto
# Run a single test file:
cd src/testdir && make test_name.res
Output is in testdir/messages and testdir/test.log
Builds on Windows depend on the Environment, see `src/INSTALLpc.txt`
for Cygwin/MSYS and MSVC ways to build Vim
Before submitting any patch, at minimum:
1. The build succeeds without new warnings.
2. Relevant tests pass.
3. The code matches the style of the file being edited.
## Layout
- `src/` - the C source. Subsystem names are usually obvious from filenames
(`buffer.c`, `window.c`, `search.c`, `vim9compile.c`, etc.).
- `src/proto/` - function prototypes, one `.pro` file per source file.
Regenerated; do not hand-edit unless you know what you're doing.
- `src/po` - Translations
- `src/xxd` - for the xxd subproject
- `src/xdiff` - for the xdiff library (imported from git)
- `src/libvterm` - for the libvterm library
- `src/testdir/` - tests. Vim-script files named `test_*.vim`.
Screendump expected output lives in `src/testdir/dumps/`.
- `runtime/doc/` - user-facing documentation in Vim help format, when updating,
also update the Last Change header
- `runtime/syntax/generator` - Syntax script for Vim Script, automatically generated
from Vims source
- `runtime/` - runtime files shipped with Vim, when updating, also update the
Last Change header and a short description if this file has no maintainer
If the file has a maintainer, changes should go via them (so make a merge
request against the upstream repo instead)
- `src/version.c` - contains the `included_patches[]` list. Every
patch touching anything below `src/` (with the exception of `src/po`) needs a
new entry at the top, will be updated only when merging into
the master tree.
## Commit format
Vim uses a strict commit message format. The subject line is a
one-sentence **problem statement**, not a description of the fix:
patch 9.2.NNNN: short description of the problem
Problem: Restatement of the problem as a full sentence, possibly
with a reporter attribution in parentheses.
Solution: Short description of the fix, ending with the author's
name in parentheses.
optional longer description of the problem and solution goes here in prose.
Do not use bullet points.
fixes: #NNNN
related: #NNNN
closes: #NNNN
Co-authored-by: Name
Signed-off-by: Author Name <email>
Rules:
- **Subject line states the problem**, not the solution. "fix typo" is
wrong; "typo in foo() causes OOB read" is right.
- **Problem line is a full sentence with a trailing period.** It mirrors
the subject.
- **Solution line ends with `(Author Name)`** — parentheses, period
after them.
- **Longer prose**, if any, goes after the Problem/Solution header
- **`fixes:` references the issue** the patch fixes.
**`closes:` references the PR** that introduces the fix.
**`related:` references related issues**, including issues that caused this
one.
All can appear. Colon, aligned, no trailing period.
- **`Signed-off-by:` is required** — DCO.
- **`Co-Authored-By:` is allowed** and is the accepted way to
acknowledge AI assistance transparently. Human
coauthors should usually also have their own Signed-off-by.
## C code conventions
- **Indentation is 4 spaces per level.** Existing files use tabs with
`ts=8 sts=4 sw=4 noet` (set by the modeline in the file),
so tabs of width 8 appear where two levels of indent collapse. `sign.c`,
`sound.c`, and any new file must use spaces only and follow the style from
the .editorconfig file.
- **Opening braces go on their own line (Allman style)** — for function
definitions and for control-flow constructs (`if`/`else`/`for`/`while`/
`do`) alike.
- **Function definitions**: return type on its own indented line, with
the function name beginning on the next line.
- Initialize locals where a reader cannot trivially see the first
assignment (common for pointers and return-value accumulators).
Don't add `= 0` initializers for values that are always assigned
before use — they can hide real uninitialized-read bugs from
the compiler.
- `for (int i = 0; ...)` loop declarations are fine in files that
use them; older files may declare the counter at the top of the
block.
- **Function-scope declarations at the top of a block** is the historical
style, but mid-block declarations are acceptable in files that have
adopted them. Match the surrounding code.
- **Custom types end in `_T`** (e.g., `buf_T`, `linenr_T`, `pos_T`).
Never use `_t` — it collides with POSIX typedefs.
- **C language is C95 plus specific C99 features**: `//` comments,
mixed declarations and statements, `__func__`, `bool`/`_Bool`,
variadic macros, compound literals, `static inline`, trailing enum
commas. Do not reach for later C standards — Vim still must build
with Compaq C on OpenVMS. See `*assumptions-C-compiler*` in
`develop.txt` for the full list.
- **`bool` / `true` / `false` are acceptable.** Vim is transitioning
from `int` with `TRUE`/`FALSE` to C99 `bool`. Do not "fix" `bool`
back to `int`. Within a single patch, be consistent — don't mix
`true` and `TRUE` in new code.
- **Do not mass-convert** `TRUE`/`FALSE` to `true`/`false` across files
unless that is the patch's explicit purpose. Opportunistic
conversions create noise in diffs.
- **`STRLEN_LITERAL("...")`** should be used when the length of a
string literal is needed. Avoid `STRLEN()` on literals.
- **`vim_snprintf_safelen()`** returns the written length; prefer it
over `vim_snprintf()` when the length is then needed.
- **Prefer `dict_add_string_len()`** when the string length is already
known, over `dict_add_string()` which calls `STRLEN()`.
- **String/buffer parameters go `(char_u *buf, size_t buflen)`** —
length alongside pointer, in bytes. Use `size_t` for byte counts,
`int` only where required by legacy APIs.
- **Guards before divisions.** Check for divisor zero explicitly, even
when a composite earlier guard would prevent it. Relying on
transitive guards is fragile.
- When introducing new allocations, verify the cleanup paths handle all exit
conditions (early return, error branches, etc).
**Use Vim wrappers instead of libc where one exists:**
| libc | Vim | Why |
|---------------|------------------------|-----------------------------|
| `free()` | `vim_free()` | Tolerates NULL |
| `malloc()` | `alloc()` / `lalloc()` | Checks for OOM |
| `strcpy()` | `STRCPY()` | Cast for `char_u *` |
| `strchr()` | `vim_strchr()` | Handles special characters |
| `strrchr()` | `vim_strrchr()` | Handles special characters |
| `memcpy()` | `mch_memmove()` | Handles overlapping copies |
| `bcopy()` | `mch_memmove()` | Handles overlapping copies |
| `memset()` | `vim_memset()` | Uniform across systems |
| `isspace()` | `vim_isspace()` | Handles bytes > 127 |
| `iswhite()` | `vim_iswhite()` | TRUE only for tab and space |
Further rules, not spelled out here, live in `runtime/doc/develop.txt`:
- `*style-names*` — reserved name patterns (`is*`, `to*`, `str*`, `mem*`,
`wcs*`, `.*_t`, `__.*`), forbidden identifiers (`delete`, `this`, `new`,
`time`, `index`), and the 31-character function-name limit.
- `*style-spaces*`, `*style-examples*` — spacing and one-statement-per-line.
- `*style-various*``FEAT_` feature prefix, uppercase `#define`,
`#ifdef HAVE_X` rather than `#if HAVE_X`, no `'\"'`.
- `*assumptions-makefiles*` — POSIX.1-2001 `make` only in the main
Makefiles (no `%` rules, `:=`, `.ONESHELL`, GNU conditionals).
- Vim uses `char_u` instead of `char` type
- Vim uses the macros `STRLEN`, `STRCPY`, `STRCMP`, `STRCAT` that work
with the `char_u` type.
- `*style-clang-format*``sign.c` and `sound.c` are formatted with
`clang-format`; re-run it after editing those files.
## Vim9 script conventions (in tests and runtime files)
- Write modern Vim style (new files can use Vim9 script, but compatibility
with Neovim and other forks is a concern, so in doubt please ask!)
- **Drop `l:` prefix from local variables** in Vim-script tests.
- **Don't add `CheckFeature` inside individual tests** if it's already
at the top of the file.
- If a test file doesn't gate features at the top, add CheckFeature to
individual tests that depend on specific build features.
## Test conventions
- Tests are in `src/testdir/test_*.vim`.
- Reproducible tests beat "it doesn't crash" tests. If a patch fixes
a rendering bug, add a screendump test. If it fixes incorrect output,
assert the output.
- Add comprehensive tests for newly added features and include them
in existing tests if possible
- **Screendump tests** use `CheckScreendump`, `RunVimInTerminal`,
`VerifyScreenDump`, and live dumps in `src/testdir/dumps/`.
- `v9.CheckScriptSuccess(lines)` / `v9.CheckScriptFailure(lines, error, lnum)`
are the standard way to test Vim9 script behavior at script-load time.
- When fixing a bug reported as an issue, include a test that
reproduces the original report, not just a minimal synthetic case.
- Tests for Syntax runtime are in `runtime/syntax/testdir`
- Tests for Indent runtime are in `runtime/indent/testdir`
## Common gotchas
- **Distinguish what code enforces from what docs claim.** If a patch
changes documented behavior, say so in the Problem/Solution.
- **Generated files** (`src/auto/configure`, generated Wayland protocol
C, etc.) should only be regenerated when their source changes.
Mixing unrelated regeneration into a functional patch creates noise.
## Documentation
- User-facing option or feature changes require a `runtime/doc/*.txt`
update in the same patch.
- When editing an existing help file, bump the `Last change:` header
at the top.
### Help file style
See `runtime/doc/helphelp.txt` (`*help-writing*`) for the authoritative
reference. Key conventions:
- **File header**: first line is `*filename.txt*` then a tab then a
short description. That description appears under `LOCAL ADDITIONS`
in `help.txt`. The version and `Last change:` date go on the second
line, right aligned.
- **Modeline**: every help file ends with a Vim modeline — typically
`vim:tw=78:ts=8:noet:ft=help:norl:`.
- **Layout**: `'textwidth'` 78, `'tabstop'` 8, indent and align with
tab characters. Two spaces between sentences. Run `:retab`
(not `:retab!`, and review the diff) after editing.
- **Tags** are defined as `*tag-name*`, usually right-aligned on the
line where the thing they name is introduced. Tag names must be
unique across all of `runtime/doc/`; for plugin help, prefix with
the plugin name.
- **Cross-references inside help text**:
- `|tag-name|` — hot-link to an existing tag.
- `` `:cmd` `` — Ex command, highlighted as a code block.
- `'option'` — option name, in single quotes.
- `<Key>` or `CTRL-X` — special keys.
- `{placeholder}` — user-supplied argument.
- **Sections** are separated by a line of `=` starting in column 1.
Column or subsection headings end with `~` to trigger heading
highlighting.
- **Code blocks** start with `>` at the end of the introducing line
and end with `<` as the first non-blank on a later line (any line
starting in column 1 also implicitly closes the block). Use `>vim`
(or another language name) to request syntax highlighting inside
the block.
- **Notation** — `Note`, `Todo`, `Error` and a few similar words are
auto-highlighted; do not try to fake the highlighting by other means.
- **Language**: gender-neutral language is preferred for new or updated
text; existing wording does not need to be rewritten for this alone.
## Release policy
Vim alternates between development cycles and stability periods — see
`runtime/doc/develop.txt` `*design-policy*`.
- **During a stability period** only clear bug fixes, security fixes,
documentation updates, translations, and runtime file updates are
accepted. No new features, no backwards-incompatible changes.
- **Once released in a minor version**, C-core features must stay
backwards-compatible. Runtime files have a bit more flexibility so
their maintainers can correct old behavior.
- **Deprecated features** stay reachable via config (do not hard-error),
are documented as deprecated, can be disabled at compile time, and
may be removed in a later cycle.
## Security
Before reporting a suspected security issue or submitting a patch
that touches security-sensitive code, read `SECURITY.md`. Follow
the disclosure process described there.
## Before submitting
1. Commit message follows the format above.
2. All modified code compiles without new warnings.
3. Tests pass, and new functionality has regression tests.
4. Documentation is updated for user-visible changes.
5. Signed-off-by is present.
6. Diff contains only changes relevant to the stated problem —
no stray whitespace fixes, no unrelated refactors, no unrelated
regeneration of `auto/configure`.
7. For multi-patch series: each commit compiles and passes its own
tests. A known-broken intermediate state that a later patch fixes
is not acceptable — squash instead.
## When in doubt
- Make the smallest possible change to achieve the goal. Do not rewrite
entire files or functions when a targeted edit suffices.
- Read surrounding code and match its style rather than imposing an
"improvement."
- Err toward smaller, more focused patches. A patch that does three
things is three patches.
- If a patch fixes a symptom of a deeper bug, say so in the Problem
and acknowledge the scope limitation in the Solution.
- Before claiming a bug exists, reproduce it. Before claiming code does X, read
the code. Do not rely on training-data memory of file contents.
- Before running shell commands that modify files outside the working tree,
install packages, push branches, or invoke network operations, confirm with
the user.

View File

@@ -13,6 +13,7 @@ SRC_ALL = \
.github/workflows/codeql-analysis.yml \
.github/workflows/coverity.yml \
.github/workflows/link-check.yml \
.github/actions/build_vim_on_linux/action.yml \
.github/actions/test_artifacts/action.yml \
.github/dependabot.yml \
.gitignore \
@@ -23,6 +24,7 @@ SRC_ALL = \
.editorconfig \
ci/appveyor.bat \
ci/config.mk*.sed \
ci/gen_testset.py \
ci/if_ver*.vim \
ci/if_feat_check.vim \
ci/lychee.toml \
@@ -151,6 +153,7 @@ SRC_ALL = \
src/spellfile.c \
src/spellsuggest.c \
src/strings.c \
src/strptime.c \
src/structs.h \
src/syntax.c \
src/tabpanel.c \
@@ -440,6 +443,7 @@ SRC_ALL = \
src/libvterm/t/66screen_extent.test \
src/libvterm/t/67screen_dbl_wh.test \
src/libvterm/t/68screen_termprops.test \
src/libvterm/t/69screen_pushline.test \
src/libvterm/t/69screen_reflow.test \
src/libvterm/t/90vttest_01-movement-1.test \
src/libvterm/t/90vttest_01-movement-2.test \
@@ -678,6 +682,7 @@ SRC_AMI = \
src/Make_ami.mak \
src/os_amiga.c \
src/os_amiga.h \
src/os_amiga_stubs.c \
src/proto/os_amiga.pro \
src/testdir/Make_amiga.mak \
src/testdir/util/amiga.vim \
@@ -1194,6 +1199,7 @@ IGNORE = \
.github/FUNDING.yml \
.github/labeler.yml \
.github/workflows/label.yml \
AGENTS.md \
SECURITY.md \
ci/unlisted.make \
ci/hlgroups.make \

View File

@@ -2,9 +2,16 @@
## Reporting a vulnerability
If you want to report a security issue, please privately disclose the issue to the vim-security mailing list
vim-security@googlegroups.com
This is a private list, read only by the maintainers, but anybody can post, after moderation.
If you want to report a security issue, please privately disclose the issue either via:
- The vim-security mailing list: vim-security@googlegroups.com
This is a private list, read only by the maintainers, but anybody can post.
- [GitHub Security Advisories](https://github.com/vim/vim/security/advisories/new)
**Please don't publicly disclose the issue until it has been addressed by us.**
## Guidelines for reporting
- Clearly explain **why** the behaviour is a security issue, not just that a bug exists.
- Keep reports concise and focused.
- Do not flood us with a list of issues. Report them one by one to ensure to not overwhelm us with the work load.
- Do **not** submit AI-generated reports without carefully reviewing them first. Low-quality or
speculative reports waste maintainer time and will be closed without action, and repeat offenders **will be banned**.

43
ci/gen_testset.py Normal file
View File

@@ -0,0 +1,43 @@
#!/usr/bin/env python3
import argparse
import itertools
import json
import re
import subprocess
def generate_testset(n):
cp = subprocess.run(["make", "-C", "src/testdir", "-npq"], capture_output=True)
tests = set()
for line in cp.stdout.decode().split("\n"):
if re.match(r"^(NEW_TESTS_RES|TEST_VIM9_RES) = ", line):
tests.update(re.findall(r"\btest\w+\.res\b", line))
tests = sorted(list(tests))
# move test_alot*.res to the end
tests = (
[t for t in tests if not t.startswith("test_alot")]
+ [t for t in tests if t.startswith("test_alot_")]
+ ["test_alot.res"]
)
targets = tests
if n > 1:
targets = [ts for ts in itertools.batched(tests, n)]
targets = [[t for t in ts if t] for ts in itertools.zip_longest(*targets)]
return targets
def main():
parser = argparse.ArgumentParser()
parser.add_argument("n", type=int, nargs="?", default=1)
args = parser.parse_args()
print(json.dumps(generate_testset(args.n)))
if __name__ == "__main__":
main()

View File

@@ -13,7 +13,7 @@ extensions = ["c", "h", "md", "html", "txt"]
accept = ["100..=103", "200..=299", "429"]
# Retry each request a few times on transient network errors
retries = 2
max_retries = 2
retry_wait_time = 2
# Timeout per request in seconds

View File

@@ -1,4 +1,4 @@
README.ru.txt для версии 9.1 программы Vim — Vi IMproved.
Краткое описание для версии 9.2 программы Vim — Vi IMproved.
ЧТО ТАКОЕ РЕДАКТОР VIM?
@@ -10,8 +10,8 @@ README.ru.txt для версии 9.1 программы Vim — Vi IMproved.
наименований файлов и команд, операции с произвольными блоками текста,
встроенный язык программирования и т. д. Также доступен графический интерфейс
пользователя (GUI). И при этом сохраняется совместимость с редактором Vi,
и те, у кого Vi «в крови», будут чувствовать себя как дома. Подробности о
различиях с редактором Vi см. в файле "runtime/doc/vi_diff.txt".
и те, у кого Vi «в крови», будут чувствовать себя как дома. Подробности
о различиях с редактором Vi см. в файле "runtime/doc/vi_diff.txt".
Этот редактор очень удобен для работы с исходным кодом программ, а также
разного рода других текстовых файлов. Все команды вводятся набором обычных
@@ -25,9 +25,9 @@ README.ru.txt для версии 9.1 программы Vim — Vi IMproved.
функционала (обычно называемый vim.tiny). Данная сборка чаще всего используется
во многих дистрибутивах Linux в качестве предустановленного редактора vi.
Редактор Vim работает в ОС MS Windows (7, 8, 10, 11), macOS, Haiku, VMS и
практически во всех UNIX-подобных системах. А перенос на другие платформы не
должен представлять особой сложности.
Редактор Vim работает в ОС MS Windows (7, 8, 10, 11), macOS, Haiku, VMS
и практически во всех UNIX-подобных системах. А перенос на другие платформы
не должен представлять особой сложности.
Предыдущие версии редактора Vim работают в операционных системах OS/2, MS-DOS,
MS Windows 95/98/Me/NT/2000/XP/Vista, AmigaDOS, Atari MiNT, BeOS и RISC OS.
Но поддержка этих версий больше не осуществляется.
@@ -45,11 +45,11 @@ MS Windows 95/98/Me/NT/2000/XP/Vista, AmigaDOS, Atari MiNT, BeOS и RISC OS.
программы. Этот архив включает в себя документацию, файлы подсветки синтаксиса
и другие файлы, которые используются редактором во время работы. Чтобы
запустить программу Vim, вы должны получить либо архив с исполняемыми файлами,
либо архив с исходным кодом. Какой из них вам нужен, зависит от того, на какой
системе вы хотите запустить редактор Vim, и есть ли для этой системы
либо архив с исходным кодом. Какой из них вам нужен, зависит от того,
на какой системе вы хотите запустить редактор Vim, и есть ли для этой системы
исполняемые файлы или вы должны компилировать программу самостоятельно.
Чтобы узнать о доступных в настоящее время пакетах программы, посмотрите на
веб‐странице https://www.vim.org/download.php.
Чтобы узнать о доступных в настоящее время пакетах программы, посмотрите
на веб‐странице https://www.vim.org/download.php.
Несколько полезных мест, где можно получить последнюю версию редактора Vim:
* Посмотрите в git-хранилище на GitHub: https://github.com/vim/vim.
@@ -61,8 +61,8 @@ https://github.com/vim/vim-win32-installer/releases.
КОМПИЛЯЦИЯ РЕДАКТОРА Vim
Если для вашей системы уже есть готовые исполняемые файлы, вам не нужно самому
компилировать редактор Vim. Если вы скачали архив с исходным кодом, то всё
необходимое для компиляции программы Vim находится в каталоге "src".
компилировать редактор Vim. Если вы скачали архив с исходным кодом,
то всё необходимое для компиляции программы Vim находится в каталоге "src".
Инструкции смотрите в файле src/INSTALL.
@@ -85,12 +85,12 @@ README_vms.txt VMS
ДОКУМЕНТАЦИЯ ПО РЕДАКТОРУ Vim
Учебник Vim — это часовой практический курс для начинающих. Как правило, для
работы с ним нужно набрать команду "vimtutor". Чтобы получить дополнительную
информацию, смотрите раздел документации ":help tutor".
Учебник Vim — это часовой практический курс для начинающих. Как правило,
для работы с ним нужно набрать команду "vimtutor". Чтобы получить
дополнительную информацию, смотрите раздел документации ":help tutor".
Лучше всего воспользоваться командой ":help" в редакторе Vim. Если у вас ещё
нет исполняемого файла программы, прочитайте файл "runtime/doc/help.txt".
Лучше всего воспользоваться командой ":help" в редакторе Vim. Если у вас
ещё нет исполняемого файла программы, прочитайте файл "runtime/doc/help.txt".
В нём содержатся отсылки на другие полезные файлы документации. Руководство
пользователя можно читать как книгу, и оно рекомендуется для обучения работе
с редактором Vim. Смотрите ":help user-manual".
@@ -100,7 +100,7 @@ README_vms.txt VMS
Редактор Vim является благотворительным программным обеспечением.
Использование и копирование программы Vim не ограничено, однако рекомендуется
сделать добровольное пожертвование для нуждающихся детей в Уганде. Чтобы узнать
сделать добровольное пожертвование для нуждающихся детей в Уганде. Чтобы узнать
подробности, прочитайте, пожалуйста, файл "runtime/doc/uganda.txt" (введите
команду ":help uganda" в редакторе Vim).
@@ -125,8 +125,8 @@ README_vms.txt VMS
будет способствовать повышению заинтересованности команды разработчиков
в продолжении работы над редактором Vim!
Самая свежая информация об оказании финансовой поддержки публикуется на
веб-сайте программы Vim:
Самая свежая информация об оказании финансовой поддержки публикуется
на веб-сайте программы Vim:
https://www.vim.org/sponsor/
@@ -137,13 +137,13 @@ README_vms.txt VMS
ДОПОЛНИТЕЛЬНАЯ ИНФОРМАЦИЯ
Для системе macOS вы може использовать MacVim: https://macvim.org
Для системе macOS вы можете использовать MacVim: https://macvim.org
Последние новости о редакторе Vim можно найти на его домашней странице:
https://www.vim.org/
Если у вас возникли вопросы, посмотрите полезные советы или документацию по
редактору Vim:
Если у вас возникли вопросы, посмотрите полезные советы или документацию
по редактору Vim:
https://www.vim.org/docs.php
https://vim.fandom.com/wiki/Vim_Tips_Wiki

View File

@@ -4,6 +4,8 @@ vim9script
# Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
# Former Maintainers: Nikolai Weibull <now@bitwi.se>
# Latest Revision: 2026 Feb 03
# Last Change:
# 2026 Mar 30 by Vim project: Use fnameescape for the Log command
# Typesetting {{{
import autoload './typeset.vim'
@@ -33,7 +35,7 @@ export def Log(bufname: string)
var logpath = typeset.LogPath(bufname)
if filereadable(logpath)
execute 'edit' typeset.LogPath(bufname)
execute 'edit' .. fnameescape(typeset.LogPath(bufname))
return
endif

View File

@@ -3,7 +3,7 @@ vim9script
# Vim functions for file type detection
#
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2026 Feb 24
# Last Change: 2026 Apr 23
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
# These functions are moved here from runtime/filetype.vim to make startup
@@ -11,6 +11,18 @@ vim9script
var prolog_pattern = '^\s*\(:-\|%\+\(\s\|$\)\|\/\*\)\|\.\s*$'
def IsObjectScriptRoutine(): bool
var line1 = getline(1)
line1 = substitute(line1, '^\ufeff', '', '')
if line1 =~? '^\s*routine\>'
return true
endif
if line1 =~? '\<iris\>'
return true
endif
return join(getline(1, 3), '') =~# '%RO'
enddef
export def Check_inp()
if getline(1) =~ '%%'
setf tex
@@ -75,6 +87,18 @@ export def FTasm()
exe "setf " .. fnameescape(b:asmsyntax)
enddef
export def FTmac()
if exists("g:filetype_mac")
exe "setf " .. g:filetype_mac
else
if IsObjectScriptRoutine()
setf objectscript_routine
else
FTasm()
endif
endif
enddef
export def FTasmsyntax()
# see if the file contains any asmsyntax=foo overrides. If so, change
# b:asmsyntax appropriately
@@ -195,6 +219,7 @@ export def FTcl()
endif
enddef
# Determines whether a *.cls file is ObjectScript, TeX, Rexx, Visual Basic, or Smalltalk.
export def FTcls()
if exists("g:filetype_cls")
exe "setf " .. g:filetype_cls
@@ -211,7 +236,20 @@ export def FTcls()
endif
var nonblank1 = getline(nextnonblank(1))
if nonblank1 =~ '^\v%(\%|\\)'
var lnum = nextnonblank(1)
while lnum > 0 && lnum <= line("$")
var line = getline(lnum)
if line =~? '^\s*\%(import\|include\|includegenerator\)\>'
lnum = nextnonblank(lnum + 1)
else
nonblank1 = line
break
endif
endwhile
if nonblank1 =~? '^\s*class\>\s\+[%A-Za-z][%A-Za-z0-9_.]*\%(\s\+extends\>\|\s*\[\|\s*{\|$\)'
setf objectscript
elseif nonblank1 =~ '^\v%(\%|\\)'
setf tex
elseif nonblank1 =~ '^\s*\%(/\*\|::\w\)'
setf rexx
@@ -857,6 +895,10 @@ export def FTinc()
if exists("g:filetype_inc")
exe "setf " .. g:filetype_inc
else
if IsObjectScriptRoutine()
setf objectscript_routine
return
endif
for lnum in range(1, min([line("$"), 20]))
var line = getline(lnum)
if line =~? "perlscript"
@@ -873,7 +915,7 @@ export def FTinc()
elseif line =~ '^\s*\%({\|(\*\)' || line =~? ft_pascal_keywords
setf pascal
return
elseif line =~# '\<\%(require\|inherit\)\>' || line =~# '[A-Z][A-Za-z0-9_:${}/]*\s\+\%(??\|[?:+.]\)\?=.\? '
elseif line =~# '\<\%(require\|inherit\)\>' || line =~# '[A-Z][A-Za-z0-9_:${}/]*\(\[[A-Za-z0-9_:/]\+\]\)*\s\+\%(??\|[?:+.]\)\?=.\? '
setf bitbake
return
endif
@@ -926,6 +968,16 @@ export def FTi()
setf progress
enddef
export def FTint()
if exists("g:filetype_int")
exe "setf " .. g:filetype_int
elseif IsObjectScriptRoutine()
setf objectscript_routine
else
setf hex
endif
enddef
var ft_pascal_comments = '^\s*\%({\|(\*\|//\)'
var ft_pascal_keywords = '^\s*\%(program\|unit\|library\|uses\|begin\|procedure\|function\|const\|type\|var\)\>'
@@ -1674,6 +1726,8 @@ const ft_from_ext = {
"tdf": "ahdl",
# AIDL
"aidl": "aidl",
# Algol 68
"a68": "algol68",
# AMPL
"run": "ampl",
# ANTLR / PCCTS
@@ -1746,6 +1800,7 @@ const ft_from_ext = {
# BDF font
"bdf": "bdf",
# Beancount
"bean": "beancount",
"beancount": "beancount",
# BibTeX bibliography database file
"bib": "bib",
@@ -1775,6 +1830,8 @@ const ft_from_ext = {
"cairo": "cairo",
# Cap'n Proto
"capnp": "capnp",
# Common Package Specification
"cps": "json",
# C#
"cs": "cs",
"csx": "cs",
@@ -1872,6 +1929,8 @@ const ft_from_ext = {
"cr": "crystal",
# CSV Files
"csv": "csv",
# Concertor
"cto": "concerto",
# CUDA Compute Unified Device Architecture
"cu": "cuda",
"cuh": "cuda",
@@ -2619,6 +2678,8 @@ const ft_from_ext = {
"rst": "rst",
# RTF
"rtf": "rtf",
# ObjectScript Routine
"rtn": "objectscript_routine",
# Ruby
"rb": "ruby",
"rbw": "ruby",
@@ -3055,7 +3116,9 @@ const ft_from_ext = {
"bp": "bp",
# Tiltfile
"Tiltfile": "tiltfile",
"tiltfile": "tiltfile"
"tiltfile": "tiltfile",
# Ghostty
"ghostty": "ghostty",
}
# Key: file name (the final path component, excluding the drive and root)
# Value: filetype

View File

@@ -4,7 +4,7 @@ vim9script
# Invoked from "scripts.vim" in 'runtimepath'
#
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2025 Dec 22
# Last Change: 2026 Apr 09
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
export def DetectFiletype()
@@ -115,7 +115,7 @@ export def Exe2filetype(name: string, line1: string): string
return 'php'
# Python
elseif name =~ 'python'
elseif name =~ 'python' || (name == 'uv' && line1 =~ '\<uv run\>')
return 'python'
# Groovy

View File

@@ -3,7 +3,7 @@ vim9script
# Vim runtime support library
#
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2026 Jan 31
# Last Change: 2026 Apr 17
export def IsSafeExecutable(filetype: string, executable: string): bool
if empty(exepath(executable))
@@ -60,7 +60,9 @@ if has('unix')
enddef
else
export def Launch(args: string)
execute $':silent ! nohup {args} {Redir()} &' | redraw!
# Use job_start, because using !xdg-open is known not to work with zsh
# ignore signals on exit
job_start(['sh', '-c', args], {'stoponexit': '', 'in_io': 'null', 'out_io': 'null', 'err_io': 'null'})
enddef
endif
elseif has('win32')
@@ -137,7 +139,11 @@ export def Open(file: string)
setlocal shell&
defer setbufvar('%', '&shell', shell)
endif
Launch($"{Viewer()} {shellescape(file, 1)}")
if has('unix') && !has('win32unix') && !exists('$WSL_DISTRO_NAME')
Launch($"{Viewer()} {shellescape(file)}")
else
Launch($"{Viewer()} {shellescape(file, 1)}")
endif
enddef
# Uncomment this line to check for compilation errors early

View File

@@ -1,6 +1,6 @@
" Vim autoload file for editing compressed files.
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2024 Nov 25
" Last Change: 2026 Apr 26
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" These functions are used by the gzip plugin.
@@ -82,13 +82,8 @@ fun gzip#read(cmd)
let empty = line("'[") == 1 && line("']") == line("$")
let tmp = tempname()
let tmpe = tmp . "." . expand("<afile>:e")
if exists('*fnameescape')
let tmp_esc = fnameescape(tmp)
let tmpe_esc = fnameescape(tmpe)
else
let tmp_esc = escape(tmp, ' ')
let tmpe_esc = escape(tmpe, ' ')
endif
let tmp_esc = fnameescape(tmp)
let tmpe_esc = fnameescape(tmpe)
" write the just read lines to a temp file "'[,']w tmp.gz"
execute "silent '[,']w " . tmpe_esc
" uncompress the temp file: call system("gzip -dn tmp.gz")
@@ -101,22 +96,14 @@ fun gzip#read(cmd)
let ok = 1
" delete the compressed lines; remember the line number
let l = line("'[") - 1
if exists(":lockmarks")
lockmarks '[,']d _
else
'[,']d _
endif
lockmarks '[,']d _
" read in the uncompressed lines "'[-1r tmp"
" Use ++edit if the buffer was empty, keep the 'ff' and 'fenc' options.
setlocal nobin
if exists(":lockmarks")
if empty
execute "silent lockmarks " . l . "r ++edit " . tmp_esc
else
execute "silent lockmarks " . l . "r " . tmp_esc
endif
if empty
execute "silent lockmarks " . l . "r ++edit " . tmp_esc
else
execute "silent " . l . "r " . tmp_esc
execute "silent lockmarks " . l . "r " . tmp_esc
endif
" if buffer became empty, delete trailing blank line
@@ -143,11 +130,7 @@ fun gzip#read(cmd)
" When uncompressed the whole buffer, do autocommands
if ok && empty
if exists('*fnameescape')
let fname = fnameescape(expand("%:r"))
else
let fname = escape(expand("%:r"), " \t\n*?[{`$\\%#'\"|!<")
endif
let fname = fnameescape(expand("%:r"))
if filereadable(undofile(expand("%")))
exe "sil rundo " . fnameescape(undofile(expand("%")))
endif
@@ -191,8 +174,9 @@ fun gzip#appre(cmd)
call s:set_compression(readfile(nm, "b", 1)[0])
endif
" Rename to a weird name to avoid the risk of overwriting another file
let nmt = expand("<afile>:p:h") . "/X~=@l9q5"
" Rename to a unique name to avoid the risk of overwriting another file
" or being targeted by a symlink in a shared directory.
let nmt = s:samedir_tempname(nm)
let nmte = nmt . "." . expand("<afile>:e")
if rename(nm, nmte) == 0
if &patchmode != "" && getfsize(nm . &patchmode) == -1
@@ -208,22 +192,27 @@ fun gzip#appre(cmd)
endfun
" find a file name for the file to be compressed. Use "name" without an
" extension if possible. Otherwise use a weird name to avoid overwriting an
" existing file.
" extension if possible. Otherwise use a unique name to avoid overwriting an
" existing file or following a symlink set up by another user.
fun s:tempname(name)
let fn = fnamemodify(a:name, ":r")
if !filereadable(fn) && !isdirectory(fn)
return fn
endif
return fnamemodify(a:name, ":p:h") . "/X~=@l9q5"
return s:samedir_tempname(a:name)
endfun
" Generate an unpredictable file name in the same directory as "name", using
" the random component of tempname() to avoid symlink attacks in shared
" directories (e.g. /tmp).
fun s:samedir_tempname(name)
let tmp = tempname()
return fnamemodify(a:name, ":p:h") . "/" . fnamemodify(tmp, ":h:t") . fnamemodify(tmp, ":t")
endfun
fun s:escape(name)
" shellescape() was added by patch 7.0.111
if exists("*shellescape")
return shellescape(a:name)
endif
return "'" . a:name . "'"
return shellescape(a:name)
endfun
" vim: set sw=2 :

View File

@@ -3,7 +3,7 @@
" Last Change:
" 2025 Oct 27 by Vim project: don't use rustfmt as 'formatprg' by default
" 2026 Jan 25 by Vim project: don't hide rustfmt errors, restore default var
"
" 2026 Mar 30 by Vim project: use fnameescape for :chdir commands
"
" Adapted from https://github.com/fatih/vim-go
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
@@ -135,7 +135,7 @@ function! s:RunRustfmt(command, tmpname, from_writepre)
" chdir to the directory of the file
let l:has_lcd = haslocaldir()
let l:prev_cd = getcwd()
execute 'lchdir! '.expand('%:h')
execute 'lchdir! ' . fnameescape(expand('%:h'))
let l:buffer = getline(1, '$')
if exists("*systemlist")
@@ -215,6 +215,7 @@ function! s:RunRustfmt(command, tmpname, from_writepre)
endif
" Restore the current directory if needed
let l:prev_cd = fnameescape(l:prev_cd)
if a:tmpname ==# ''
if l:has_lcd
execute 'lchdir! '.l:prev_cd

View File

@@ -20,6 +20,11 @@
" 2025 Jul 16 by Vim Project: update minimum vim version
" 2026 Feb 06 by Vim Project: consider 'nowrapscan' (#19333)
" 2026 Feb 07 by Vim Project: make the path traversal detection more robust (#19341)
" 2026 Apr 06 by Vim Project: fix bugs with lz4 support (#19925)
" 2026 Apr 09 by Vim Project: fix bugs with zstd support (#19930)
" 2026 Apr 09 by Vim Project: fix bug with dotted filename (#19930)
" 2026 Apr 15 by Vim Project: fix more path traversal issues (#19981)
" 2026 Apr 16 by Vim Project: use g:tar_secure in tar#Extract()
"
" Contains many ideas from Michael Toren's <tar.vim>
"
@@ -609,114 +614,139 @@ fun! tar#Extract()
let &report= repkeep
return
endif
let tarball = expand("%")
let tarbase = substitute(tarball,'\..*$','','')
if fname =~ '^[.]\?[.]/' || simplify(fname) =~ '\.\.[/\\]'
call s:Msg('tar#Extract', 'error', "Path Traversal Attack detected, not extracting!")
let &report= repkeep
return
endif
if has("unix")
if fname =~ '^/'
call s:Msg('tar#Extract', 'error', "Path Traversal Attack detected, not extracting!")
let &report= repkeep
return
endif
else
if fname =~ '^\%(\a:[\\/]\|[\\/]\)'
call s:Msg('tar#Extract', 'error', "Path Traversal Attack detected, not extracting!")
let &report= repkeep
return
endif
endif
let extractcmd= s:WinPath(g:tar_extractcmd)
if filereadable(tarbase.".tar")
call system(extractcmd." ".shellescape(tarbase).".tar ".shellescape(fname))
let tarball = expand("%")
if !filereadable(tarball)
let &report= repkeep
return
endif
if tarball =~# "\.tar$"
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
if v:shell_error != 0
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar {fname}: failed!")
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
else
echo "***note*** successfully extracted ". fname
endif
elseif filereadable(tarbase.".tgz")
elseif tarball =~# "\.tgz$"
let extractcmd= substitute(extractcmd,"-","-z","")
call system(extractcmd." ".shellescape(tarbase).".tgz ".shellescape(fname))
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
if v:shell_error != 0
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tgz {fname}: failed!")
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
elseif filereadable(tarbase.".tar.gz")
elseif tarball =~# "\.tar\.gz$"
let extractcmd= substitute(extractcmd,"-","-z","")
call system(extractcmd." ".shellescape(tarbase).".tar.gz ".shellescape(fname))
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
if v:shell_error != 0
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar.gz {fname}: failed!")
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
elseif filereadable(tarbase.".tbz")
elseif tarball =~# "\.tbz$"
let extractcmd= substitute(extractcmd,"-","-j","")
call system(extractcmd." ".shellescape(tarbase).".tbz ".shellescape(fname))
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
if v:shell_error != 0
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tbz {fname}: failed!")
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
elseif filereadable(tarbase.".tar.bz2")
elseif tarball =~# "\.tar\.bz2$"
let extractcmd= substitute(extractcmd,"-","-j","")
call system(extractcmd." ".shellescape(tarbase).".tar.bz2 ".shellescape(fname))
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
if v:shell_error != 0
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar.bz2 {fname}: failed!")
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
elseif filereadable(tarbase.".tar.bz3")
elseif tarball =~# "\.tar\.bz3$"
let extractcmd= substitute(extractcmd,"-","-j","")
call system(extractcmd." ".shellescape(tarbase).".tar.bz3 ".shellescape(fname))
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
if v:shell_error != 0
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar.bz3 {fname}: failed!")
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
elseif filereadable(tarbase.".txz")
elseif tarball =~# "\.txz$"
let extractcmd= substitute(extractcmd,"-","-J","")
call system(extractcmd." ".shellescape(tarbase).".txz ".shellescape(fname))
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
if v:shell_error != 0
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.txz {fname}: failed!")
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
elseif filereadable(tarbase.".tar.xz")
elseif tarball =~# "\.tar\.xz$"
let extractcmd= substitute(extractcmd,"-","-J","")
call system(extractcmd." ".shellescape(tarbase).".tar.xz ".shellescape(fname))
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
if v:shell_error != 0
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar.xz {fname}: failed!")
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
elseif filereadable(tarbase.".tzst")
let extractcmd= substitute(extractcmd,"-","--zstd","")
call system(extractcmd." ".shellescape(tarbase).".tzst ".shellescape(fname))
elseif tarball =~# "\.tzst$"
let extractcmd= substitute(extractcmd,"-","--zstd -","")
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
if v:shell_error != 0
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tzst {fname}: failed!")
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
elseif filereadable(tarbase.".tar.zst")
let extractcmd= substitute(extractcmd,"-","--zstd","")
call system(extractcmd." ".shellescape(tarbase).".tar.zst ".shellescape(fname))
elseif tarball =~# "\.tar\.zst$"
let extractcmd= substitute(extractcmd,"-","--zstd -","")
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
if v:shell_error != 0
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar.zst {fname}: failed!")
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
elseif filereadable(tarbase.".tlz4")
let extractcmd= substitute(extractcmd,"-","-I lz4","")
call system(extractcmd." ".shellescape(tarbase).".tlz4 ".shellescape(fname))
elseif tarball =~# "\.tlz4$"
if has("linux")
let extractcmd= substitute(extractcmd,"-","-I lz4 -","")
endif
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
if v:shell_error != 0
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tlz4 {fname}: failed!")
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
elseif filereadable(tarbase.".tar.lz4")
let extractcmd= substitute(extractcmd,"-","-I lz4","")
call system(extractcmd." ".shellescape(tarbase).".tar.lz4".shellescape(fname))
elseif tarball =~# "\.tar\.lz4$"
if has("linux")
let extractcmd= substitute(extractcmd,"-","-I lz4 -","")
endif
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
if v:shell_error != 0
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar.lz4 {fname}: failed!")
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif

View File

@@ -3,6 +3,8 @@ vim9script
# Language: Generic TeX typesetting engine
# Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
# Latest Revision: 2026 Feb 19
# Last Change:
# 2026 Mar 30 by Vim project: Use fnameescape for the ProcessOutput command
# Constants and helpers {{{
const SLASH = !exists("+shellslash") || &shellslash ? '/' : '\'
@@ -60,7 +62,7 @@ def ProcessOutput(qfid: number, wd: string, efm: string, ch: channel, msg: strin
endif
# Make sure the working directory is correct
silent execute "lcd" wd
silent execute "lcd" .. fnameescape(wd)
setqflist([], 'a', {'id': qfid, 'lines': [msg], 'efm': efm})
silent lcd -
enddef

View File

@@ -1,11 +1,10 @@
" vimball.vim : construct a file containing both paths and files
" Maintainer: This runtime file is looking for a new maintainer.
" Original Author: Charles E. Campbell
" Date: Apr 11, 2016
" Date: Apr 16, 2026
" Version: 37 (with modifications from the Vim Project)
" GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim
" Last Change:
" 2025 Feb 28 by Vim Project: add support for bzip3 (#16755)
" Copyright: (c) 2004-2011 by Charles E. Campbell
" The VIM LICENSE applies to Vimball.vim, and Vimball.txt
" (see |copyright|) except use "Vimball" instead of "Vim".
@@ -18,15 +17,14 @@ if &cp || exists("g:loaded_vimball")
finish
endif
let g:loaded_vimball = "v37"
if v:version < 702
if v:version < 704
echohl WarningMsg
echo "***warning*** this version of vimball needs vim 7.2"
echo "***warning*** this version of vimball needs vim 7.4"
echohl Normal
finish
endif
let s:keepcpo= &cpo
set cpo&vim
"DechoTabOn
" =====================================================================
" Constants: {{{1
@@ -47,20 +45,6 @@ if !exists("s:USAGE")
let g:netrw_cygwin= 0
endif
endif
" set up g:vimball_mkdir if the mkdir() call isn't defined
if !exists("*mkdir")
if exists("g:netrw_local_mkdir")
let g:vimball_mkdir= g:netrw_local_mkdir
elseif executable("mkdir")
let g:vimball_mkdir= "mkdir"
elseif executable("makedir")
let g:vimball_mkdir= "makedir"
endif
if !exists(g:vimball_mkdir)
call vimball#ShowMesg(s:WARNING,"(vimball) g:vimball_mkdir undefined")
endif
endif
endif
" =====================================================================
@@ -81,7 +65,6 @@ endif
" filesize
" [file]
fun! vimball#MkVimball(line1,line2,writelevel,...) range
" call Dfunc("MkVimball(line1=".a:line1." line2=".a:line2." writelevel=".a:writelevel." vimballname<".a:1.">) a:0=".a:0)
if a:1 =~ '\.vim$' || a:1 =~ '\.txt$'
let vbname= substitute(a:1,'\.\a\{3}$','.vmb','')
else
@@ -90,15 +73,12 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
if vbname !~ '\.vmb$'
let vbname= vbname.'.vmb'
endif
" call Decho("vbname<".vbname.">")
if !a:writelevel && a:1 =~ '[\/]'
call vimball#ShowMesg(s:ERROR,"(MkVimball) vimball name<".a:1."> should not include slashes; use ! to insist")
" call Dret("MkVimball : vimball name<".a:1."> should not include slashes")
return
endif
if !a:writelevel && filereadable(vbname)
call vimball#ShowMesg(s:ERROR,"(MkVimball) file<".vbname."> exists; use ! to insist")
" call Dret("MkVimball : file<".vbname."> already exists; use ! to insist")
return
endif
@@ -120,17 +100,14 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
" record current tab, initialize while loop index
let curtabnr = tabpagenr()
let linenr = a:line1
" call Decho("curtabnr=".curtabnr)
while linenr <= a:line2
let svfile = getline(linenr)
" call Decho("svfile<".svfile.">")
if !filereadable(svfile)
call vimball#ShowMesg(s:ERROR,"unable to read file<".svfile.">")
call s:ChgDir(curdir)
call vimball#RestoreSettings()
" call Dret("MkVimball")
call s:ChgDir(curdir)
call vimball#RestoreSettings()
return
endif
@@ -145,20 +122,18 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
let lastline= line("$") + 1
if lastline == 2 && getline("$") == ""
call setline(1,'" Vimball Archiver by Charles E. Campbell')
call setline(2,'UseVimball')
call setline(3,'finish')
let lastline= line("$") + 1
call setline(1,'" Vimball Archiver by Charles E. Campbell')
call setline(2,'UseVimball')
call setline(3,'finish')
let lastline= line("$") + 1
endif
call setline(lastline ,substitute(svfile,'$',' [[[1',''))
call setline(lastline+1,0)
" write the file from the tab
" call Decho("exe $r ".fnameescape(svfile))
exe "$r ".fnameescape(svfile)
call setline(lastline+1,line("$") - lastline - 1)
" call Decho("lastline=".lastline." line$=".line("$"))
" restore to normal tab
exe "tabn ".curtabnr
@@ -170,13 +145,10 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
call s:ChgDir(curdir)
setlocal ff=unix
if a:writelevel
" call Decho("exe w! ".fnameescape(vbname))
exe "w! ".fnameescape(vbname)
else
" call Decho("exe w ".fnameescape(vbname))
exe "w ".fnameescape(vbname)
endif
" call Decho("Vimball<".vbname."> created")
echo "Vimball<".vbname."> created"
" remove the evidence
@@ -187,7 +159,6 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
" restore options
call vimball#RestoreSettings()
" call Dret("MkVimball")
endfun
" ---------------------------------------------------------------------
@@ -195,17 +166,9 @@ endfun
" (invoked the the UseVimball command embedded in
" vimballs' prologue)
fun! vimball#Vimball(really,...)
" call Dfunc("vimball#Vimball(really=".a:really.") a:0=".a:0)
if v:version < 701 || (v:version == 701 && !exists('*fnameescape'))
echoerr "your vim is missing the fnameescape() function (pls upgrade to vim 7.2 or later)"
" call Dret("vimball#Vimball : needs 7.1 with patch 299 or later")
return
endif
if getline(1) !~ '^" Vimball Archiver'
echoerr "(Vimball) The current file does not appear to be a Vimball!"
" call Dret("vimball#Vimball")
return
endif
@@ -215,7 +178,6 @@ fun! vimball#Vimball(really,...)
let vimballfile = expand("%:tr")
" set up vimball tab
" call Decho("setting up vimball tab")
tabnew
sil! file Vimball
let vbtabnr= tabpagenr()
@@ -227,21 +189,18 @@ fun! vimball#Vimball(really,...)
" If, however, the user did not specify a full path, set the home to be below the current directory
let home= expand(a:1)
if has("win32") || has("win95") || has("win64") || has("win16")
if home !~ '^\a:[/\\]'
let home= getcwd().'/'.a:1
endif
if home !~ '^\a:[/\\]'
let home= getcwd().'/'.a:1
endif
elseif home !~ '^/'
let home= getcwd().'/'.a:1
let home= getcwd().'/'.a:1
endif
else
let home= vimball#VimballHome()
endif
" call Decho("home<".home.">")
" save current directory and remove older same-named vimball, if any
let curdir = getcwd()
" call Decho("home<".home.">")
" call Decho("curdir<".curdir.">")
call s:ChgDir(home)
let s:ok_unablefind= 1
@@ -260,56 +219,52 @@ fun! vimball#Vimball(really,...)
endif
" apportion vimball contents to various files
" call Decho("exe tabn ".curtabnr)
exe "tabn ".curtabnr
" call Decho("linenr=".linenr." line$=".line("$"))
while 1 < linenr && linenr < line("$")
let fname = substitute(getline(linenr),'\t\[\[\[1$','','')
let fname = substitute(fname,'\\','/','g')
let fname = resolve(simplify(fname))
let fsize = substitute(getline(linenr+1),'^\(\d\+\).\{-}$','\1','')+0
let fenc = substitute(getline(linenr+1),'^\d\+\s*\(\S\{-}\)$','\1','')
let filecnt = filecnt + 1
" call Decho("fname<".fname."> fsize=".fsize." filecnt=".filecnt. " fenc=".fenc)
" Do not allow a leading /, .. anywhere, or a Windows drive letter
" (e.g. C:/foo) in the file name. Backslashes were already converted
" to forward slashes above, so this also catches \\server\share UNC
" paths via the leading-slash check.
if fname =~ '\.\.' || fname =~ '^/' || fname =~ '^\a:'
echomsg "(Vimball) Path Traversal Attack detected, aborting..."
exe "tabn ".curtabnr
bw! Vimball
call s:ChgDir(curdir)
return
endif
if a:really
echomsg "extracted <".fname.">: ".fsize." lines"
else
echomsg "would extract <".fname.">: ".fsize." lines"
endif
" call Decho("using L#".linenr.": will extract file<".fname.">")
" call Decho("using L#".(linenr+1).": fsize=".fsize)
" Allow AsNeeded/ directory to take place of plugin/ directory
" when AsNeeded/filename is filereadable or was present in VimballRecord
if fname =~ '\<plugin/'
let anfname= substitute(fname,'\<plugin/','AsNeeded/','')
if filereadable(anfname) || (exists("s:VBRstring") && s:VBRstring =~# anfname)
" call Decho("using anfname<".anfname."> instead of <".fname.">")
let fname= anfname
endif
let anfname= substitute(fname,'\<plugin/','AsNeeded/','')
if filereadable(anfname) || (exists("s:VBRstring") && s:VBRstring =~# anfname)
let fname= anfname
endif
endif
" make directories if they don't exist yet
if a:really
" call Decho("making directories if they don't exist yet (fname<".fname.">)")
let fnamebuf= substitute(fname,'\\','/','g')
let dirpath = substitute(home,'\\','/','g')
" call Decho("init: fnamebuf<".fnamebuf.">")
" call Decho("init: dirpath <".dirpath.">")
let dirpath = substitute(home,'\\','/','g')
while fnamebuf =~ '/'
let dirname = dirpath."/".substitute(fnamebuf,'/.*$','','')
let dirpath = dirname
let dirpath = dirname
let fnamebuf = substitute(fnamebuf,'^.\{-}/\(.*\)$','\1','')
" call Decho("dirname<".dirname.">")
" call Decho("dirpath<".dirpath.">")
if !isdirectory(dirname)
" call Decho("making <".dirname.">")
if exists("g:vimball_mkdir")
call system(g:vimball_mkdir." ".shellescape(dirname))
else
call mkdir(dirname)
endif
call s:RecordInVar(home,"rmdir('".dirname."')")
call mkdir(dirname)
call s:RecordInVar(home,"rmdir('".dirname."')")
endif
endwhile
endif
@@ -319,13 +274,11 @@ fun! vimball#Vimball(really,...)
" (skip over path/filename and qty-lines)
let linenr = linenr + 2
let lastline = linenr + fsize - 1
" call Decho("exe ".linenr.",".lastline."yank a")
" no point in handling a zero-length file
if lastline >= linenr
exe "silent ".linenr.",".lastline."yank a"
" copy "a" buffer into tab
" call Decho('copy "a buffer into tab#'.vbtabnr)
exe "tabn ".vbtabnr
setlocal ma
sil! %d
@@ -336,38 +289,31 @@ fun! vimball#Vimball(really,...)
" write tab to file
if a:really
let fnamepath= home."/".fname
" call Decho("exe w! ".fnameescape(fnamepath))
if fenc != ""
exe "silent w! ++enc=".fnameescape(fenc)." ".fnameescape(fnamepath)
else
exe "silent w! ".fnameescape(fnamepath)
endif
echo "wrote ".fnameescape(fnamepath)
call s:RecordInVar(home,"call delete('".fnamepath."')")
if fenc != ""
exe "silent w! ++enc=".fnameescape(fenc)." ".fnameescape(fnamepath)
else
exe "silent w! ".fnameescape(fnamepath)
endif
echo "wrote ".fnameescape(fnamepath)
call s:RecordInVar(home,"call delete('".fnamepath."')")
endif
" return to tab with vimball
" call Decho("exe tabn ".curtabnr)
exe "tabn ".curtabnr
" set up help if it's a doc/*.txt file
" call Decho("didhelp<".didhelp."> fname<".fname.">")
if a:really && didhelp == "" && fname =~ 'doc/[^/]\+\.\(txt\|..x\)$'
let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.\(txt\|..x\)$','\1','')
" call Decho("didhelp<".didhelp.">")
let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.\(txt\|..x\)$','\1','')
endif
endif
" update for next file
" call Decho("update linenr= [linenr=".linenr."] + [fsize=".fsize."] = ".(linenr+fsize))
let linenr= linenr + fsize
endwhile
" set up help
" call Decho("about to set up help: didhelp<".didhelp.">")
if didhelp != ""
let htpath= home."/".didhelp
" call Decho("exe helptags ".htpath)
exe "helptags ".fnameescape(htpath)
echo "did helptags"
endif
@@ -388,8 +334,6 @@ fun! vimball#Vimball(really,...)
exe "sil! tabc! ".vbtabnr
call vimball#RestoreSettings()
call s:ChgDir(curdir)
" call Dret("vimball#Vimball")
endfun
" ---------------------------------------------------------------------
@@ -399,23 +343,18 @@ endfun
" Usage: RmVimball (assume current file is a vimball; remove)
" RmVimball vimballname
fun! vimball#RmVimball(...)
" call Dfunc("vimball#RmVimball() a:0=".a:0)
if exists("g:vimball_norecord")
" call Dret("vimball#RmVimball : (g:vimball_norecord)")
return
endif
if a:0 == 0
let curfile= expand("%:tr")
" call Decho("case a:0=0: curfile<".curfile."> (used expand(%:tr))")
else
if a:1 =~ '[\/]'
call vimball#ShowMesg(s:USAGE,"RmVimball vimballname [path]")
" call Dret("vimball#RmVimball : suspect a:1<".a:1.">")
return
endif
let curfile= a:1
" call Decho("case a:0=".a:0.": curfile<".curfile.">")
endif
if curfile =~ '\.vmb$'
let curfile= substitute(curfile,'\.vmb','','')
@@ -428,75 +367,60 @@ fun! vimball#RmVimball(...)
let home= vimball#VimballHome()
endif
let curdir = getcwd()
" call Decho("home <".home.">")
" call Decho("curfile<".curfile.">")
" call Decho("curdir <".curdir.">")
call s:ChgDir(home)
if filereadable(".VimballRecord")
" call Decho(".VimballRecord is readable")
" call Decho("curfile<".curfile.">")
keepalt keepjumps 1split
sil! keepalt keepjumps e .VimballRecord
let keepsrch= @/
" call Decho('search for ^\M'.curfile.'.\m: ')
" call Decho('search for ^\M'.curfile.'.\m{vba|vmb}: ')
" call Decho('search for ^\M'.curfile.'\m[-0-9.]*\.{vba|vmb}: ')
if search('^\M'.curfile."\m: ".'cw')
let foundit= 1
let foundit= 1
elseif search('^\M'.curfile.".\mvmb: ",'cw')
let foundit= 2
let foundit= 2
elseif search('^\M'.curfile.'\m[-0-9.]*\.vmb: ','cw')
let foundit= 2
let foundit= 2
elseif search('^\M'.curfile.".\mvba: ",'cw')
let foundit= 1
let foundit= 1
elseif search('^\M'.curfile.'\m[-0-9.]*\.vba: ','cw')
let foundit= 1
let foundit= 1
else
let foundit = 0
endif
if foundit
if foundit == 1
let exestring = substitute(getline("."),'^\M'.curfile.'\m\S\{-}\.vba: ','','')
else
let exestring = substitute(getline("."),'^\M'.curfile.'\m\S\{-}\.vmb: ','','')
endif
if foundit == 1
let exestring = substitute(getline("."),'^\M'.curfile.'\m\S\{-}\.vba: ','','')
else
let exestring = substitute(getline("."),'^\M'.curfile.'\m\S\{-}\.vmb: ','','')
endif
let s:VBRstring= substitute(exestring,'call delete(','','g')
let s:VBRstring= substitute(s:VBRstring,"[')]",'','g')
" call Decho("exe ".exestring)
sil! keepalt keepjumps exe exestring
sil! keepalt keepjumps d
let exestring= strlen(substitute(exestring,'call delete(.\{-})|\=',"D","g"))
" call Decho("exestring<".exestring.">")
echomsg "removed ".exestring." files"
sil! keepalt keepjumps exe exestring
sil! keepalt keepjumps d
let exestring= strlen(substitute(exestring,'call delete(.\{-})|\=',"D","g"))
echomsg "removed ".exestring." files"
else
let s:VBRstring= ''
let curfile = substitute(curfile,'\.vmb','','')
" call Decho("unable to find <".curfile."> in .VimballRecord")
if !exists("s:ok_unablefind")
let curfile = substitute(curfile,'\.vmb','','')
if !exists("s:ok_unablefind")
call vimball#ShowMesg(s:WARNING,"(RmVimball) unable to find <".curfile."> in .VimballRecord")
endif
endif
endif
sil! keepalt keepjumps g/^\s*$/d
sil! keepalt keepjumps wq!
let @/= keepsrch
endif
call s:ChgDir(curdir)
" call Dret("vimball#RmVimball")
endfun
" ---------------------------------------------------------------------
" vimball#Decompress: attempts to automatically decompress vimballs {{{2
fun! vimball#Decompress(fname,...)
" call Dfunc("Decompress(fname<".a:fname.">) a:0=".a:0)
" decompression:
if expand("%") =~ '.*\.gz' && executable("gunzip")
" handle *.gz with gunzip
silent exe "!gunzip ".shellescape(a:fname)
if v:shell_error != 0
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) gunzip may have failed with <".a:fname.">")
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) gunzip may have failed with <".a:fname.">")
endif
let fname= substitute(a:fname,'\.gz$','','')
exe "e ".escape(fname,' \')
@@ -506,7 +430,7 @@ fun! vimball#Decompress(fname,...)
" handle *.gz with gzip -d
silent exe "!gzip -d ".shellescape(a:fname)
if v:shell_error != 0
call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "gzip -d" may have failed with <'.a:fname.">")
call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "gzip -d" may have failed with <'.a:fname.">")
endif
let fname= substitute(a:fname,'\.gz$','','')
exe "e ".escape(fname,' \')
@@ -516,7 +440,7 @@ fun! vimball#Decompress(fname,...)
" handle *.bz2 with bunzip2
silent exe "!bunzip2 ".shellescape(a:fname)
if v:shell_error != 0
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) bunzip2 may have failed with <".a:fname.">")
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) bunzip2 may have failed with <".a:fname.">")
endif
let fname= substitute(a:fname,'\.bz2$','','')
exe "e ".escape(fname,' \')
@@ -526,7 +450,7 @@ fun! vimball#Decompress(fname,...)
" handle *.bz2 with bzip2 -d
silent exe "!bzip2 -d ".shellescape(a:fname)
if v:shell_error != 0
call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "bzip2 -d" may have failed with <'.a:fname.">")
call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "bzip2 -d" may have failed with <'.a:fname.">")
endif
let fname= substitute(a:fname,'\.bz2$','','')
exe "e ".escape(fname,' \')
@@ -536,7 +460,7 @@ fun! vimball#Decompress(fname,...)
" handle *.bz3 with bunzip3
silent exe "!bunzip3 ".shellescape(a:fname)
if v:shell_error != 0
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) bunzip3 may have failed with <".a:fname.">")
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) bunzip3 may have failed with <".a:fname.">")
endif
let fname= substitute(a:fname,'\.bz3$','','')
exe "e ".escape(fname,' \')
@@ -546,7 +470,7 @@ fun! vimball#Decompress(fname,...)
" handle *.bz3 with bzip3 -d
silent exe "!bzip3 -d ".shellescape(a:fname)
if v:shell_error != 0
call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "bzip3 -d" may have failed with <'.a:fname.">")
call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "bzip3 -d" may have failed with <'.a:fname.">")
endif
let fname= substitute(a:fname,'\.bz3$','','')
exe "e ".escape(fname,' \')
@@ -556,7 +480,7 @@ fun! vimball#Decompress(fname,...)
" handle *.zip with unzip
silent exe "!unzip ".shellescape(a:fname)
if v:shell_error != 0
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) unzip may have failed with <".a:fname.">")
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) unzip may have failed with <".a:fname.">")
endif
let fname= substitute(a:fname,'\.zip$','','')
exe "e ".escape(fname,' \')
@@ -564,14 +488,11 @@ fun! vimball#Decompress(fname,...)
endif
if a:0 == 0| setlocal noma bt=nofile fmr=[[[,]]] fdm=marker | endif
" call Dret("Decompress")
endfun
" ---------------------------------------------------------------------
" vimball#ShowMesg: {{{2
fun! vimball#ShowMesg(level,msg)
" call Dfunc("vimball#ShowMesg(level=".a:level." msg<".a:msg.">)")
let rulerkeep = &ruler
let showcmdkeep = &showcmd
@@ -596,13 +517,10 @@ fun! vimball#ShowMesg(level,msg)
let &ruler = rulerkeep
let &showcmd = showcmdkeep
" call Dret("vimball#ShowMesg")
endfun
" =====================================================================
" s:ChgDir: change directory (in spite of Windoze) {{{2
fun! s:ChgDir(newdir)
" call Dfunc("ChgDir(newdir<".a:newdir.">)")
if (has("win32") || has("win95") || has("win64") || has("win16"))
try
exe 'silent cd '.fnameescape(substitute(a:newdir,'/','\\','g'))
@@ -618,33 +536,22 @@ fun! s:ChgDir(newdir)
exe 'silent cd '.fnameescape(a:newdir)
endtry
endif
" call Dret("ChgDir : curdir<".getcwd().">")
endfun
" ---------------------------------------------------------------------
" s:RecordInVar: record a un-vimball command in the .VimballRecord file {{{2
fun! s:RecordInVar(home,cmd)
" call Dfunc("RecordInVar(home<".a:home."> cmd<".a:cmd.">)")
if a:cmd =~ '^rmdir'
" if !exists("s:recorddir")
" let s:recorddir= substitute(a:cmd,'^rmdir',"call s:Rmdir",'')
" else
" let s:recorddir= s:recorddir."|".substitute(a:cmd,'^rmdir',"call s:Rmdir",'')
" endif
elseif !exists("s:recordfile")
if !exists("s:recordfile")
let s:recordfile= a:cmd
else
let s:recordfile= s:recordfile."|".a:cmd
endif
" call Dret("RecordInVar : s:recordfile<".(exists("s:recordfile")? s:recordfile : "")."> s:recorddir<".(exists("s:recorddir")? s:recorddir : "").">")
endfun
" ---------------------------------------------------------------------
" s:RecordInFile: {{{2
fun! s:RecordInFile(home)
" call Dfunc("s:RecordInFile()")
if exists("g:vimball_norecord")
" call Dret("s:RecordInFile : g:vimball_norecord")
return
endif
@@ -654,22 +561,19 @@ fun! s:RecordInFile(home)
keepalt keepjumps 1split
let cmd= expand("%:tr").": "
" call Decho("cmd<".cmd.">")
sil! keepalt keepjumps e .VimballRecord
setlocal ma
$
if exists("s:recordfile") && exists("s:recorddir")
let cmd= cmd.s:recordfile."|".s:recorddir
let cmd= cmd.s:recordfile."|".s:recorddir
elseif exists("s:recorddir")
let cmd= cmd.s:recorddir
let cmd= cmd.s:recorddir
elseif exists("s:recordfile")
let cmd= cmd.s:recordfile
let cmd= cmd.s:recordfile
else
" call Dret("s:RecordInFile : neither recordfile nor recorddir exist")
return
return
endif
" call Decho("cmd<".cmd.">")
" put command into buffer, write .VimballRecord `file
keepalt keepjumps put=cmd
@@ -678,35 +582,28 @@ fun! s:RecordInFile(home)
call s:ChgDir(curdir)
if exists("s:recorddir")
" call Decho("unlet s:recorddir<".s:recorddir.">")
unlet s:recorddir
unlet s:recorddir
endif
if exists("s:recordfile")
" call Decho("unlet s:recordfile<".s:recordfile.">")
unlet s:recordfile
unlet s:recordfile
endif
else
" call Decho("s:record[file|dir] doesn't exist")
endif
" call Dret("s:RecordInFile")
endfun
" ---------------------------------------------------------------------
" vimball#VimballHome: determine/get home directory path (usually from rtp) {{{2
fun! vimball#VimballHome()
" call Dfunc("vimball#VimballHome()")
if exists("g:vimball_home")
let home= g:vimball_home
else
" go to vim plugin home
for home in split(&rtp,',') + ['']
if isdirectory(home) && filewritable(home) | break | endif
let basehome= substitute(home,'[/\\]\.vim$','','')
let basehome= substitute(home,'[/\\]\.vim$','','')
if isdirectory(basehome) && filewritable(basehome)
let home= basehome."/.vim"
break
endif
let home= basehome."/.vim"
break
endif
endfor
if home == ""
" just pick the first directory
@@ -717,18 +614,9 @@ fun! vimball#VimballHome()
endif
endif
" insure that the home directory exists
" call Decho("picked home<".home.">")
if !isdirectory(home)
if exists("g:vimball_mkdir")
" call Decho("home<".home."> isn't a directory -- making it now with g:vimball_mkdir<".g:vimball_mkdir.">")
" call Decho("system(".g:vimball_mkdir." ".shellescape(home).")")
call system(g:vimball_mkdir." ".shellescape(home))
else
" call Decho("home<".home."> isn't a directory -- making it now with mkdir()")
call mkdir(home)
endif
call mkdir(home)
endif
" call Dret("vimball#VimballHome <".home.">")
return home
endfun
@@ -758,13 +646,11 @@ fun! vimball#SaveSettings()
endif
" vimballs should be in unix format
setlocal ff=unix
" call Dret("SaveSettings")
endfun
" ---------------------------------------------------------------------
" vimball#RestoreSettings: {{{2
fun! vimball#RestoreSettings()
" call Dfunc("RestoreSettings()")
let @a = s:regakeep
if exists("+acd")
let &acd = s:acdkeep
@@ -780,14 +666,12 @@ fun! vimball#RestoreSettings()
let &l:ff = s:ffkeep
if s:makeep[0] != 0
" restore mark a
" call Decho("restore mark-a: makeep=".string(makeep))
call setpos("'a",s:makeep)
endif
if exists("+acd")
unlet s:acdkeep
endif
unlet s:regakeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep s:lzkeep s:pmkeep s:ffkeep
" call Dret("RestoreSettings")
endfun
let &cpo = s:keepcpo
@@ -795,4 +679,4 @@ unlet s:keepcpo
" ---------------------------------------------------------------------
" Modelines: {{{1
" vim: fdm=marker
" vim: fdm=marker et

View File

@@ -5,7 +5,7 @@ vim9script
# Shane-XB-Qian
# Andrew Radev
# thinca
# Last Change: 2026 Feb 10
# Last Change: 2026 Mar 30
#
# Vim script to handle jumping to the targets of several types of Vim commands
# (:import, :packadd, :runtime, :colorscheme), and to autoloaded functions of
@@ -168,7 +168,7 @@ def HandleImportLine(editcmd: string, curline: string) #{{{2
"\<C-W>F": 'split',
"\<C-W>gF": 'tab split',
}[editcmd]
execute how_to_split .. ' ' .. filepath
execute how_to_split .. ' ' .. fnameescape(filepath)
enddef
def Open(target: any, editcmd: string, search_pattern: string = '') #{{{2
@@ -193,7 +193,7 @@ def Open(target: any, editcmd: string, search_pattern: string = '') #{{{2
cmd = $'+silent\ call\ search(''{escaped_pattern}'')'
endif
execute $'{split} {cmd} {fname}'
execute $'{split} {cmd} {fnameescape(fname)}'
# If there are several files to open, put them into an arglist.
if target->typename() == 'list<string>'

View File

@@ -20,6 +20,10 @@
" 2025 Dec 20 by Vim Project: use :lcd instead of :cd
" 2026 Feb 08 by Vim Project: use system() instead of :!
" 2026 Mar 08 by Vim Project: Make ZipUpdatePS() check for powershell
" 2026 Apr 01 by Vim Project: Detect more path traversal attacks
" 2026 Apr 05 by Vim Project: Detect more path traversal attacks
" 2026 Apr 14 by Vim Project: Detect more path traversal attacks on Windows
" 2026 Apr 15 by Vim Project: Detect more path traversal attacks on Windows
" License: Vim License (see vim's :help license)
" Copyright: Copyright (C) 2005-2019 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
@@ -367,6 +371,11 @@ fun! zip#Write(fname)
return
endif
if simplify(a:fname) =~ '\.\.[/\\]'
call s:Mess('Error', "***error*** (zip#Write) Path Traversal Attack detected, not writing!")
return
endif
let curdir= getcwd()
let tmpdir= tempname()
if tmpdir =~ '\.'
@@ -389,9 +398,21 @@ fun! zip#Write(fname)
if has("unix")
let zipfile = substitute(a:fname,'zipfile://\(.\{-}\)::[^\\].*$','\1','')
let fname = substitute(a:fname,'zipfile://.\{-}::\([^\\].*\)$','\1','')
" fname should not start with a leading slash to avoid writing anywhere into the system
if fname =~ '^/'
call s:Mess('Error', "***error*** (zip#Write) Path Traversal Attack detected, not writing!")
call s:ChgDir(curdir,s:WARNING,"(zip#Write) unable to return to ".curdir."!")
return
endif
else
let zipfile = substitute(a:fname,'^.\{-}zipfile://\(.\{-}\)::[^\\].*$','\1','')
let fname = substitute(a:fname,'^.\{-}zipfile://.\{-}::\([^\\].*\)$','\1','')
" fname should not start with drive letter, UNC path, or leading slash
if fname =~ '^\%(\a:[\\/]\|[\\/]\)'
call s:Mess('Error', "***error*** (zip#Write) Path Traversal Attack detected, not writing!")
call s:ChgDir(curdir,s:WARNING,"(zip#Write) unable to return to ".curdir."!")
return
endif
endif
if fname =~ '^[.]\{1,2}/'
let gnu_cmd = g:zip_zipcmd . ' -d ' . s:Escape(fnamemodify(zipfile,":p"),0) . ' ' . s:Escape(fname,0)
@@ -481,10 +502,22 @@ fun! zip#Extract()
if fname =~ '/$'
call s:Mess('Error', "***error*** (zip#Extract) Please specify a file, not a directory")
return
elseif fname =~ '^[.]\?[.]/'
elseif fname =~ '^[.]\?[.]/' || simplify(fname) =~ '\.\.[/\\]'
call s:Mess('Error', "***error*** (zip#Browse) Path Traversal Attack detected, not extracting!")
return
endif
" block absolute paths
if has("unix")
if fname =~ '^/'
call s:Mess('Error', "***error*** (zip#Extract) Path Traversal Attack detected, not extracting!")
return
endif
else
if fname =~ '^\%(\a:[\\/]\|[\\/]\)'
call s:Mess('Error', "***error*** (zip#Extract) Path Traversal Attack detected, not extracting!")
return
endif
endif
if filereadable(fname)
call s:Mess('Error', "***error*** (zip#Extract) <" .. fname .."> already exists in directory, not overwriting!")
return

23
runtime/compiler/just.vim Normal file
View File

@@ -0,0 +1,23 @@
" Vim compiler file
" Compiler: Just
" Maintainer: Alarcritty
" Last Change: 2026 Mar 20
if exists("current_compiler")
finish
endif
let current_compiler = "just"
let s:cpo_save = &cpo
set cpo-=C
CompilerSet makeprg=just
CompilerSet errorformat=
\%Eerror:\ %m,
\%C%\\s%#——▶\ %f:%l:%c,
\%-C%.%#,
\%-G%.%#
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@@ -35,19 +35,19 @@ doctags: doctags.c
$(CC) doctags.c -o doctags
vim.man: vim.1
nroff -man $? | sed -e s/.//g > $@
nroff -c -man $? | sed -e s/.//g > $@
evim.man: evim.1
nroff -man $? | sed -e s/.//g > $@
nroff -c -man $? | sed -e s/.//g > $@
vimdiff.man: vimdiff.1
nroff -man $? | sed -e s/.//g > $@
nroff -c -man $? | sed -e s/.//g > $@
vimtutor.man: vimtutor.1
nroff -man $? | sed -e s/.//g > $@
nroff -c -man $? | sed -e s/.//g > $@
xxd.man: xxd.1
nroff -man $? | sed -e s/.//g > $@
nroff -c -man $? | sed -e s/.//g > $@
# Awk version of .txt to .html conversion.
html: noerrors tags $(HTMLS)

View File

@@ -1,4 +1,4 @@
*builtin.txt* For Vim version 9.2. Last change: 2026 Feb 14
*builtin.txt* For Vim version 9.2. Last change: 2026 Apr 26
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -82,7 +82,7 @@ browsedir({title}, {initdir}) String put up a directory requester
bufadd({name}) Number add a buffer to the buffer list
bufexists({buf}) Number |TRUE| if buffer {buf} exists
buflisted({buf}) Number |TRUE| if buffer {buf} is listed
bufload({buf}) Number load buffer {buf} if not loaded yet
bufload({buf}) none load buffer {buf} if not loaded yet
bufloaded({buf}) Number |TRUE| if buffer {buf} is loaded
bufname([{buf}]) String name of the buffer {buf}
bufnr([{buf} [, {create}]]) Number number of the buffer {buf}
@@ -105,7 +105,10 @@ ch_evalraw({handle}, {string} [, {options}])
any evaluate {string} on raw {handle}
ch_getbufnr({handle}, {what}) Number get buffer number for {handle}/{what}
ch_getjob({channel}) Job get the Job of {channel}
ch_info({handle}) String info about channel {handle}
ch_info({handle}) Dict info about channel {handle}
ch_listen({address} [, {options}])
Channel listen on {address} - port on loopback
or UNIX domain socket
ch_log({msg} [, {handle}]) none write {msg} in the channel log file
ch_logfile({fname} [, {mode}]) none start logging channel activity
ch_open({address} [, {options}])
@@ -118,7 +121,7 @@ ch_readraw({handle} [, {options}])
ch_sendexpr({handle}, {expr} [, {options}])
any send {expr} over JSON {handle}
ch_sendraw({handle}, {expr} [, {options}])
any send {expr} over raw {handle}
none send {expr} over raw {handle}
ch_setoptions({handle}, {options})
none set options for {handle}
ch_status({handle} [, {options}])
@@ -190,7 +193,7 @@ extendnew({expr1}, {expr2} [, {expr3}])
List/Dict
like |extend()| but creates a new List
or Dictionary
feedkeys({string} [, {mode}]) Number add key sequence to typeahead buffer
feedkeys({string} [, {mode}]) none add key sequence to typeahead buffer
filecopy({from}, {to}) Number |TRUE| if copying file {from} to {to}
worked
filereadable({file}) Number |TRUE| if {file} is a readable file
@@ -217,7 +220,7 @@ foldtext() String line displayed for closed fold
foldtextresult({lnum}) String text for closed fold at {lnum}
foreach({expr1}, {expr2}) List/Tuple/Dict/Blob/String
for each item in {expr1} call {expr2}
foreground() Number bring the Vim window to the foreground
foreground() none bring the Vim window to the foreground
fullcommand({name} [, {vim9}]) String get full command from {name}
funcref({name} [, {arglist}] [, {dict}])
Funcref reference to function {name}
@@ -349,7 +352,7 @@ inputsecret({prompt} [, {text}])
insert({object}, {item} [, {idx}])
List insert {item} in {object}
[before {idx}]
instanceof({object}, {class}) Number |TRUE| if {object} is an instance of
instanceof({object}, {class}) Bool |TRUE| if {object} is an instance of
{class}
interrupt() none interrupt script execution
invert({expr}) Number bitwise invert
@@ -389,7 +392,7 @@ list2tuple({list}) Tuple turn {list} of items into a tuple
listener_add({callback} [, {buf} [, {unbuffered}]])
Number add a callback to listen to changes
listener_flush([{buf}]) none invoke listener callbacks
listener_remove({id}) none remove a listener callback
listener_remove({id}) Number remove a listener callback
localtime() Number current time
log({expr}) Float natural logarithm (base e) of {expr}
log10({expr}) Float logarithm of Float {expr} to base 10
@@ -453,8 +456,8 @@ popup_clear() none close all popup windows
popup_close({id} [, {result}]) none close popup window {id}
popup_create({what}, {options}) Number create a popup window
popup_dialog({what}, {options}) Number create a popup window used as a dialog
popup_filter_menu({id}, {key}) Number filter for a menu popup window
popup_filter_yesno({id}, {key}) Number filter for a dialog popup window
popup_filter_menu({id}, {key}) Bool filter for a menu popup window
popup_filter_yesno({id}, {key}) Bool filter for a dialog popup window
popup_findecho() Number get window ID of popup for `:echowin`
popup_findinfo() Number get window ID of info popup window
popup_findpreview() Number get window ID of preview popup window
@@ -484,7 +487,7 @@ prompt_setinterrupt({buf}, {text})
none set prompt interrupt function
prompt_setprompt({buf}, {text}) none set prompt text
prop_add({lnum}, {col}, {props})
none add one text property
Number add one text property
prop_add_list({props}, [[{lnum}, {col}, {end-lnum}, {end-col}], ...])
none add multiple text properties
prop_clear({lnum} [, {lnum-end} [, {props}]])
@@ -529,7 +532,7 @@ reltimefloat({time}) Float turn the time value into a Float
reltimestr({time}) String turn time value into a String
remote_expr({server}, {string} [, {idvar} [, {timeout}]])
String send expression
remote_foreground({server}) Number bring Vim server to the foreground
remote_foreground({server}) none bring Vim server to the foreground
remote_peek({serverid} [, {retvar}])
Number check for reply string
remote_read({serverid} [, {timeout}])
@@ -579,7 +582,7 @@ setbufvar({buf}, {varname}, {val})
none set {varname} in buffer {buf} to {val}
setcellwidths({list}) none set character cell width overrides
setcharpos({expr}, {list}) Number set the {expr} position to {list}
setcharsearch({dict}) Dict set character search from {dict}
setcharsearch({dict}) none set character search from {dict}
setcmdline({str} [, {pos}]) Number set command-line
setcmdpos({pos}) Number set cursor position in command-line
setcursorcharpos({list}) Number move cursor to position in {list}
@@ -640,7 +643,7 @@ sound_playfile({path} [, {callback}])
Number play sound file {path}
sound_stop({id}) none stop playing sound {id}
soundfold({word}) String sound-fold {word}
spellbadword() String badly spelled word at cursor
spellbadword() List badly spelled word at cursor
spellsuggest({word} [, {max} [, {capital}]])
List spelling suggestions
split({expr} [, {pat} [, {keepempty}]])
@@ -736,7 +739,7 @@ term_setrestore({buf}, {command})
term_setsize({buf}, {rows}, {cols})
none set the size of a terminal
term_start({cmd} [, {options}]) Number open a terminal window and run a job
term_wait({buf} [, {time}]) Number wait for screen to be updated
term_wait({buf} [, {time}]) none wait for screen to be updated
terminalprops() Dict properties of the terminal
test_alloc_fail({id}, {countdown}, {repeat})
none make memory allocation fail
@@ -744,11 +747,11 @@ test_autochdir() none enable 'autochdir' during startup
test_feedinput({string}) none add key sequence to input buffer
test_garbagecollect_now() none free memory right now for testing
test_garbagecollect_soon() none free memory soon for testing
test_getvalue({string}) any get value of an internal variable
test_getvalue({string}) Number get value of an internal variable
test_gui_event({event}, {args}) bool generate a GUI event for testing
test_ignore_error({expr}) none ignore a specific error
test_mswin_event({event}, {args})
bool generate MS-Windows event for testing
Bool generate MS-Windows event for testing
test_null_blob() Blob null value for testing
test_null_channel() Channel null value for testing
test_null_dict() Dict null value for testing
@@ -765,7 +768,7 @@ test_setmouse({row}, {col}) none set the mouse position for testing
test_settime({expr}) none set current time for testing
test_srand_seed([{seed}]) none set seed for testing srand()
test_unknown() any unknown value for testing
test_void() any void value for testing
test_void() none void value for testing
timer_info([{id}]) List information about timers
timer_pause({id}, {pause}) none pause or unpause a timer
timer_start({time}, {callback} [, {options}])
@@ -785,7 +788,7 @@ tuple2list({tuple}) List turn {tuple} of items into a list
type({expr}) Number type of value {expr}
typename({expr}) String representation of the type of {expr}
undofile({name}) String undo file name for {name}
undotree([{buf}]) List undo file tree for buffer {buf}
undotree([{buf}]) Dict undo file tree for buffer {buf}
uniq({list} [, {func} [, {dict}]])
List remove adjacent duplicates from a list
uri_decode({string}) String URI-decode a string
@@ -800,7 +803,7 @@ virtcol2col({winid}, {lnum}, {col})
Number byte index of a character on screen
visualmode([{expr}]) String last visual mode used
wildmenumode() Number whether 'wildmenu' mode is active
wildtrigger() Number start wildcard expansion
wildtrigger() none start wildcard expansion
win_execute({id}, {command} [, {silent}])
String execute {command} in window {id}
win_findbuf({bufnr}) List find windows containing {bufnr}
@@ -1270,7 +1273,7 @@ balloon_show({expr}) *balloon_show()*
{only available when compiled with the |+balloon_eval| or
|+balloon_eval_term| feature}
Return type: |Number|
Return type: void
balloon_split({msg}) *balloon_split()*
@@ -1497,7 +1500,7 @@ bufload({buf}) *bufload()*
Can also be used as a |method|: >
eval 'somename'->bufload()
<
Return type: |Number|
Return type: void
bufloaded({buf}) *bufloaded()*
@@ -1892,7 +1895,7 @@ clearmatches([{win}]) *clearmatches()*
Can also be used as a |method|: >
GetWin()->clearmatches()
<
Return type: |Number|
Return type: void
cmdcomplete_info() *cmdcomplete_info()*
@@ -2012,7 +2015,7 @@ complete({startcol}, {matches}) *complete()* *E785*
second argument: >
GetMatches()->complete(col('.'))
<
Return type: |Number|
Return type: void
complete_add({expr}) *complete_add()*
@@ -2656,7 +2659,7 @@ echoraw({string}) *echoraw()*
call echoraw(&t_TI)
< Use with care, you can mess up the terminal this way.
Return type: |Number|
Return type: void
empty({expr}) *empty()*
@@ -2699,7 +2702,7 @@ err_teapot([{expr}]) *err_teapot()*
indicating that coffee is temporarily not available.
If {expr} is present it must be a String.
Return type: |Number|
Return type: void
escape({string}, {chars}) *escape()*
@@ -3216,7 +3219,7 @@ feedkeys({string} [, {mode}]) *feedkeys()*
Can also be used as a |method|: >
GetInput()->feedkeys()
<
Return type: |Number|
Return type: void
filecopy({from}, {to}) *filecopy()*
@@ -3653,7 +3656,7 @@ foreground() *foreground()*
allow a window to bring itself to the foreground. Use
|remote_foreground()| instead.
Return type: |Number|
Return type: void
{only in the Win32, Motif and GTK GUI versions and the
Win32 console version}
@@ -3805,7 +3808,7 @@ garbagecollect([{atexit}]) *garbagecollect()*
type a character. To force garbage collection immediately use
|test_garbagecollect_now()|.
Return type: |String|
Return type: void
get({list}, {idx} [, {default}]) *get()* *get()-list*
@@ -6266,7 +6269,7 @@ instanceof({object}, {class}) *instanceof()* *E614* *E616* *E693*
< Can also be used as a |method|: >
myobj->instanceof(mytype)
<
Return type: |Number|
Return type: |vim9-boolean|
interrupt() *interrupt()*
@@ -6430,6 +6433,8 @@ js_decode({string}) *js_decode()*
- Strings can be in single quotes.
- Empty items in an array (between two commas) are allowed and
result in v:none items.
- Capitalization is ignored in keywords: true, false, null,
NaN, Infinity and -Infinity.
Can also be used as a |method|: >
ReadObject()->js_decode()
@@ -6468,12 +6473,9 @@ json_decode({string}) *json_decode()* *E491*
same as {"1":2}.
- More floating point numbers are recognized, e.g. "1." for
"1.0", or "001.2" for "1.2". Special floating point values
"Infinity", "-Infinity" and "NaN" (capitalization ignored)
are accepted.
"Infinity", "-Infinity" and "NaN" are accepted.
- Leading zeroes in integer numbers are ignored, e.g. "012"
for "12" or "-012" for "-12".
- Capitalization is ignored in literal names null, true or
false, e.g. "NULL" for "null", "True" for "true".
- Control characters U+0000 through U+001F which are not
escaped in strings are accepted, e.g. " " (tab
character in string) for "\t".
@@ -6481,10 +6483,10 @@ json_decode({string}) *json_decode()* *E491*
and results in v:none.
- Backslash in an invalid 2-character sequence escape is
ignored, e.g. "\a" is decoded as "a".
- A correct surrogate pair in JSON strings should normally be
a 12 character sequence such as "\uD834\uDD1E", but
json_decode() silently accepts truncated surrogate pairs
such as "\uD834" or "\uD834\u"
- A surrogate pair in JSON strings is a 12 character sequence
such as "\uD834\uDD1E". A lone surrogate or an invalid
surrogate pair (e.g. "\uD800" or "\uD800\uD800") results
in an error.
*E938*
A duplicate key in an object, valid in rfc7159, is not
accepted by json_decode() as the result must be a valid Vim
@@ -6875,7 +6877,7 @@ listener_flush([{buf}]) *listener_flush()*
Can also be used as a |method|: >
GetBuffer()->listener_flush()
<
Return type: |Number|
Return type: void
listener_remove({id}) *listener_remove()*
@@ -7219,7 +7221,7 @@ mapset({dict})
mapset(d)
endfor
<
Return type: |Number|
Return type: void
match({expr}, {pat} [, {start} [, {count}]]) *match()*
@@ -8482,8 +8484,10 @@ prompt_setcallback({buf}, {expr}) *prompt_setcallback()*
< Can also be used as a |method|: >
GetBuffer()->prompt_setcallback(callback)
<
Return type: void
< {only available when compiled with the |+channel| feature}
{only available when compiled with the |+channel| feature}
prompt_setinterrupt({buf}, {expr}) *prompt_setinterrupt()*
Set a callback for buffer {buf} to {expr}. When {expr} is an
@@ -8497,7 +8501,7 @@ prompt_setinterrupt({buf}, {expr}) *prompt_setinterrupt()*
Can also be used as a |method|: >
GetBuffer()->prompt_setinterrupt(callback)
<
Return type: |Number|
Return type: void
{only available when compiled with the |+channel| feature}
@@ -8511,7 +8515,7 @@ prompt_setprompt({buf}, {text}) *prompt_setprompt()*
Can also be used as a |method|: >
GetBuffer()->prompt_setprompt('command: ')
<
Return type: |Number|
Return type: void
{only available when compiled with the |+channel| feature}
@@ -8874,7 +8878,7 @@ redraw_listener_remove({id}) *redraw_listener_remove()*
Can also be used as a |method|: >
GetRedrawListenerId()->redraw_listener_remove()
<
Return type: |Number|
Return type: void
reduce({object}, {func} [, {initial}]) *reduce()* *E998*
@@ -9046,7 +9050,7 @@ remote_foreground({server}) *remote_foreground()*
Can also be used as a |method|: >
ServerName()->remote_foreground()
<
Return type: |Number|
Return type: void
{only in the Win32, Motif and GTK GUI versions and the
Win32 console version}
@@ -9130,7 +9134,7 @@ remote_startserver({name}) *remote_startserver()* *E941* *E942*
Can also be used as a |method|: >
ServerName()->remote_startserver()
<
Return type: |Number|
Return type: void
{only available when compiled with the |+clientserver| feature}
@@ -9878,7 +9882,7 @@ setbufvar({buf}, {varname}, {val}) *setbufvar()*
third argument: >
GetValue()->setbufvar(buf, varname)
<
Return type: |Number|
Return type: void
setcellwidths({list}) *setcellwidths()*
@@ -9915,7 +9919,7 @@ setcellwidths({list}) *setcellwidths()*
match with what Vim knows about each emoji. If it doesn't
look right you need to adjust the {list} argument.
Return type: |Number|
Return type: void
setcharpos({expr}, {list}) *setcharpos()*
@@ -9958,7 +9962,7 @@ setcharsearch({dict}) *setcharsearch()*
Can also be used as a |method|: >
SavedSearch()->setcharsearch()
<
Return type: dict<any>
Return type: void
setcmdline({str} [, {pos}]) *setcmdline()*
@@ -10025,7 +10029,7 @@ setenv({name}, {val}) *setenv()*
second argument: >
GetPath()->setenv('PATH')
<
Return type: |Number|
Return type: void
setfperm({fname}, {mode}) *setfperm()* *chmod*
@@ -10384,7 +10388,7 @@ settabvar({tabnr}, {varname}, {val}) *settabvar()*
third argument: >
GetValue()->settabvar(tab, name)
<
Return type: |Number|
Return type: void
settabwinvar({tabnr}, {winnr}, {varname}, {val}) *settabwinvar()*
@@ -10409,7 +10413,7 @@ settabwinvar({tabnr}, {winnr}, {varname}, {val}) *settabwinvar()*
fourth argument: >
GetValue()->settabwinvar(tab, winnr, name)
<
Return type: |Number|
Return type: void
settagstack({nr}, {dict} [, {action}]) *settagstack()*
@@ -10462,7 +10466,7 @@ setwinvar({winnr}, {varname}, {val}) *setwinvar()*
third argument: >
GetValue()->setwinvar(winnr, name)
<
Return type: |Number|
Return type: void
sha256({expr}) *sha256()*
@@ -10702,7 +10706,7 @@ sound_clear() *sound_clear()*
On some Linux systems you may need the libcanberra-pulse
package, otherwise sound may not stop.
Return type: |Number|
Return type: void
{only available when compiled with the |+sound| feature}
@@ -10772,7 +10776,7 @@ sound_stop({id}) *sound_stop()*
Can also be used as a |method|: >
soundid->sound_stop()
<
Return type: |Number|
Return type: void
{only available when compiled with the |+sound| feature}
@@ -11313,7 +11317,12 @@ strptime({format}, {timestring}) *strptime()*
can try different {format} values until you get a non-zero
result.
Note: On MS-Windows, where the C runtime does not provide
strptime(), Vim uses a built-in fallback that always uses
English locale names regardless of the active locale.
See also |strftime()|.
Examples: >
:echo strptime("%Y %b %d %X", "1997 Apr 27 11:49:23")
< 862156163 >
@@ -11693,6 +11702,30 @@ system({expr} [, {input}]) *system()* *E677*
Get the output of the shell command {expr} as a |String|. See
|systemlist()| to get the output as a |List|.
{expr} can be a |String| or a |List|.
When {expr} is a |String|, the command is executed through the
shell (see below for how the command is constructed).
*E1575*
When {expr} is a |List|, the first item is the executable and
the remaining items are passed as arguments directly. The
command is executed without using a shell, similar to
|job_start()|. Since no shell is involved, shell features
such as redirection, piping, globbing, environment variable
expansion and backtick expansion will not work. Characters
like ">" are passed as literal arguments to the command, not
interpreted as redirection. Use this form when arguments may
contain special characters that should not be interpreted by
the shell. Example: >
:let out = system(['grep', '-r', 'pattern', '.'])
< With the String form ">" would be shell redirection, but
with a List it is passed as a literal argument: >
:let out = system(['echo', 'hello', '>', 'world'])
< This outputs "hello > world", not redirect to a file.
To use the shell explicitly with a List: >
:let out = system(['/bin/sh', '-c', 'echo $HOME'])
<
When {input} is given and is a |String| this string is written
to a file and passed as stdin to the command. The string is
written as-is, you need to take care of using the correct line
@@ -11711,14 +11744,18 @@ system({expr} [, {input}]) *system()* *E677*
When prepended by |:silent| the terminal will not be set to
cooked mode. This is meant to be used for commands that do
not need the user to type. It avoids stray characters showing
up on the screen which require |CTRL-L| to remove. >
up on the screen which require |CTRL-L| to remove.
When calling system() from a 'statusline' expression, an
|autocommand| or a |timer| callback, you should use |:silent|
to avoid terminal responses (e.g. from cursor style queries)
being echoed on the screen. >
:silent let f = system('ls *.vim')
<
Note: Use |shellescape()| or |::S| with |expand()| or
|fnamemodify()| to escape special characters in a command
argument. Newlines in {expr} may cause the command to fail.
The characters in 'shellquote' and 'shellxquote' may also
cause trouble.
Note: When {expr} is a String, use |shellescape()| or |::S|
with |expand()| or |fnamemodify()| to escape special
characters in a command argument. Newlines in {expr} may
cause the command to fail. The characters in 'shellquote'
and 'shellxquote' may also cause trouble.
This is not to be used for interactive commands.
The result is a String. Example: >
@@ -11731,7 +11768,8 @@ system({expr} [, {input}]) *system()* *E677*
To avoid the string being truncated at a NUL, all NUL
characters are replaced with SOH (0x01).
The command executed is constructed using several options:
When {expr} is a String, the command executed is constructed
using several options:
'shell' 'shellcmdflag' 'shellxquote' {expr} 'shellredir' {tmp} 'shellxquote'
({tmp} is an automatically generated file name).
For Unix, braces are put around {expr} to allow for
@@ -11758,6 +11796,9 @@ system({expr} [, {input}]) *system()* *E677*
systemlist({expr} [, {input}]) *systemlist()*
Same as |system()|, but returns a |List| with lines (parts of
output separated by NL) with NULs transformed into NLs.
Like |system()|, {expr} can be a |String| (executed through
the shell) or a |List| (executed directly without a shell).
See |system()| for details.
Output is the same as |readfile()| will output with {binary}
argument set to "b", except that there is no extra empty item
when the result ends in a NL.
@@ -11769,6 +11810,11 @@ systemlist({expr} [, {input}]) *systemlist()*
<
Returns an empty string on error.
Like |system()|, prepend |:silent| when the command does not
need user interaction and is called from a 'statusline'
expression, an |autocommand| or a |timer| callback. See
|system()| for details.
Can also be used as a |method|: >
:echo GetCmd()->systemlist()
<
@@ -11949,6 +11995,7 @@ terminalprops() *terminalprops()*
underline_rgb whether |t_8u| works **
mouse mouse type supported
kitty whether Kitty terminal was detected
decrqm whether sending DECRQM sequences work
** value 'u' for unknown, 'y' for yes, 'n' for no
@@ -11968,6 +12015,9 @@ terminalprops() *terminalprops()*
For "mouse" the value 'u' is unknown
If "decrqm" is 'y', then Vim will query support for the
'termsync' and 'termresize' ("inband") options.
Also see:
- 'ambiwidth' - detected by using |t_u7|.
- |v:termstyleresp| and |v:termblinkresp| for the response to
@@ -12020,7 +12070,7 @@ timer_pause({timer}, {paused}) *timer_pause()*
Can also be used as a |method|: >
GetTimer()->timer_pause(1)
<
Return type: |Number|
Return type: void
{only available when compiled with the |+timers| feature}
@@ -12080,7 +12130,7 @@ timer_stop({timer}) *timer_stop()*
Can also be used as a |method|: >
GetTimer()->timer_stop()
<
Return type: |Number|
Return type: void
{only available when compiled with the |+timers| feature}
@@ -12090,7 +12140,7 @@ timer_stopall() *timer_stopall()*
invoked. Useful if a timer is misbehaving. If there are no
timers there is no error.
Return type: |Number|
Return type: void
{only available when compiled with the |+timers| feature}
@@ -12580,7 +12630,7 @@ wildtrigger() *wildtrigger()*
Return value is always 0.
Return type: |Number|
Return type: void
win_execute({id}, {command} [, {silent}]) *win_execute()*
@@ -12932,7 +12982,7 @@ winrestview({dict}) *winrestview()*
Can also be used as a |method|: >
GetView()->winrestview()
<
Return type: |Number|
Return type: void
winsaveview() *winsaveview()*
@@ -13104,6 +13154,7 @@ acl Compiled with |ACL| support.
all_builtin_terms Compiled with all builtin terminals enabled. (always
true)
amiga Amiga version of Vim.
android Android version of Vim. *android*
arabic Compiled with Arabic support |Arabic|.
arp Compiled with ARP support (Amiga).
autocmd Compiled with autocommand support. (always true)
@@ -13259,6 +13310,7 @@ spell Compiled with spell checking support |spell|.
startuptime Compiled with |--startuptime| support.
statusline Compiled with support for 'statusline', 'rulerformat'
and special formats of 'titlestring' and 'iconstring'.
statusline_click Click handlers in 'statusline' |stl-%[FuncName]|
sun SunOS version of Vim.
sun_workshop Support for Sun |workshop| has been removed.
syntax Compiled with syntax highlighting support |syntax|.
@@ -13274,6 +13326,7 @@ termguicolors Compiled with true color in terminal support.
terminal Compiled with |terminal| support.
terminfo Compiled with terminfo instead of termcap.
termresponse Compiled with support for |t_RV| and |v:termresponse|.
termux Termux version of Vim. *termux*
textobjects Compiled with support for |text-objects|.
textprop Compiled with support for |text-properties|.
tgetent Compiled with tgetent support, able to use a termcap
@@ -13310,8 +13363,6 @@ vtp Compiled for vcon support |+vtp| (check vcon to find
out if it works in the current console).
wayland Compiled with Wayland protocol support.
wayland_clipboard Compiled with support for Wayland clipboard.
wayland_focus_steal Compiled with support for Wayland clipboard focus
stealing.
wildignore Compiled with 'wildignore' option.
wildmenu Compiled with 'wildmenu' option.
win16 old version for MS-Windows 3.1 (always false)

View File

@@ -1,4 +1,4 @@
*change.txt* For Vim version 9.2. Last change: 2026 Feb 14
*change.txt* For Vim version 9.2. Last change: 2026 Mar 31
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1157,9 +1157,9 @@ inside of strings can change! Also see 'softtabstop' option. >
current line).
*:ip* *:iput*
:[line]ip[ut] [x] like |:put|, but adjust indent to the current line
:[line]ip[ut] [x] Like |:put|, but adjust indent to the current line.
:[line]ip[ut]! [x] like |:put|!, but adjust indent to the current line
:[line]ip[ut]! [x] Like |:put|!, but adjust indent to the current line.
["x]]p or *]p* *]<MiddleMouse>*
["x]]<MiddleMouse> Like "p", but adjust the indent to the current line.

View File

@@ -1,4 +1,4 @@
*channel.txt* For Vim version 9.2. Last change: 2026 Feb 25
*channel.txt* For Vim version 9.2. Last change: 2026 Apr 15
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -114,6 +114,32 @@ Vim to write lines in log file: >
call ch_logfile('channellog', 'w')
See |ch_logfile()|.
You can also make Vim act as a server using |ch_listen()|. This does not
require an external server program.
*channel-listen-demo*
Start Vim and create a listening channel: >
func OnAccept(channel, clientaddr)
" Log the connection
echomsg "Accepted connection from " .. a:clientaddr
" Get current time and send it to the client
let current_time = strftime("%Y-%m-%d %H:%M:%S")
call ch_sendraw(a:channel, "Vim Server Time: " .. current_time .. "\n")
" Optional: close immediately if you only want to provide the time
call ch_close(a:channel)
endfunc
" Start listening on port 8765
let server = ch_listen('8765', {"callback": "OnAccept"})
From another Vim instance (or any program) you can connect to it: >
let channel = ch_open('localhost:8765')
When done, close the server channel: >
call ch_close(server)
==============================================================================
3. Opening a channel *channel-open*
@@ -523,7 +549,7 @@ ch_close({handle}) *ch_close()*
Can also be used as a |method|: >
GetChannel()->ch_close()
<
Return type: |Number|
Return type: void
ch_close_in({handle}) *ch_close_in()*
Close the "in" part of {handle}. See |channel-close-in|.
@@ -533,7 +559,7 @@ ch_close_in({handle}) *ch_close_in()*
Can also be used as a |method|: >
GetChannel()->ch_close_in()
<
Return type: |Number|
Return type: void
ch_evalexpr({handle}, {expr} [, {options}]) *ch_evalexpr()*
@@ -611,8 +637,7 @@ ch_info({handle}) *ch_info()*
"status" "open", "buffered" or "closed", like
ch_status()
When opened with ch_open():
"hostname" the hostname of the address
"port" the port of the address
"port" the port on loopback
"path" the path of the Unix-domain socket
"sock_status" "open" or "closed"
"sock_mode" "NL", "RAW", "JSON" or "JS"
@@ -641,6 +666,36 @@ ch_info({handle}) *ch_info()*
<
Return type: dict<any>
ch_listen({address} [, {options}]) *E1573* *E1574* *ch_listen()*
Listen on {address} - port on loopback or UNIX domain socket
for incoming channel connections. This creates a server-side
channel, unlike |ch_open()| which connects to an existing
server.
Returns a Channel. Use |ch_status()| to check for failure.
{address} is a String, see |channel-address| for the possible
accepted forms, however in case of TCP sockets it allows to
set only a port and binds to loopback address for security
reasons.
Note: IPv6 is not yet supported.
If {options} is given it must be a |Dictionary|.
See |channel-open-options|.
The "callback" in {options} is invoked when a new connection
is accepted. It receives two arguments: the new Channel and
the client address as a String (e.g. "127.0.0.1:12345").
Use |ch_open()| to connect to an existing server instead.
See |channel-listen-demo| for an example.
Can also be used as a |method|: >
GetAddress()->ch_listen()
<
{only available when compiled with the |+channel| feature}
Return type: channel
ch_log({msg} [, {handle}]) *ch_log()*
Write String {msg} in the channel log file, if it was opened
with |ch_logfile()|.
@@ -655,7 +710,7 @@ ch_log({msg} [, {handle}]) *ch_log()*
Can also be used as a |method|: >
'did something'->ch_log()
<
Return type: dict<any>
Return type: void
ch_logfile({fname} [, {mode}]) *ch_logfile()*
Start logging channel activity to {fname}.
@@ -683,7 +738,7 @@ ch_logfile({fname} [, {mode}]) *ch_logfile()*
Can also be used as a |method|: >
'logfile'->ch_logfile('w')
<
Return type: |Number|
Return type: void
ch_open({address} [, {options}]) *ch_open()*
Open a channel to {address}. See |channel|.
@@ -695,6 +750,9 @@ ch_open({address} [, {options}]) *ch_open()*
If {options} is given it must be a |Dictionary|.
See |channel-open-options|.
Use |ch_listen()| to listen for incoming connections
instead.
Can also be used as a |method|: >
GetAddress()->ch_open()
<
@@ -769,7 +827,7 @@ ch_sendraw({handle}, {expr} [, {options}]) *ch_sendraw()*
Can also be used as a |method|: >
GetChannel()->ch_sendraw(rawexpr)
<
Return type: dict<any> or |String|
Return type: void
ch_setoptions({handle}, {options}) *ch_setoptions()*
Set options on {handle}:
@@ -788,7 +846,7 @@ ch_setoptions({handle}, {options}) *ch_setoptions()*
Can also be used as a |method|: >
GetChannel()->ch_setoptions(options)
<
Return type: |Number|
Return type: void
ch_status({handle} [, {options}]) *ch_status()*
Return the status of {handle}:
@@ -982,7 +1040,7 @@ job_setoptions({job}, {options}) *job_setoptions()*
Can also be used as a |method|: >
GetJob()->job_setoptions(options)
<
Return type: |Number|
Return type: void
job_start({command} [, {options}]) *job_start()*

View File

@@ -1,4 +1,4 @@
*cmdline.txt* For Vim version 9.2. Last change: 2026 Feb 14
*cmdline.txt* For Vim version 9.2. Last change: 2026 Apr 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -466,14 +466,15 @@ CTRL-L A match is done on the pattern in front of the cursor. If
*c_CTRL-G* */_CTRL-G*
CTRL-G When 'incsearch' is set, entering a search pattern for "/" or
"?" and the current match is displayed then CTRL-G will move
to the next match (does not take |search-offset| into account)
to the next match. The |search-offset| is applied when <CR>
is pressed, but does not affect the match highlighting.
Use CTRL-T to move to the previous match. Hint: on a regular
keyboard G is below T.
*c_CTRL-T* */_CTRL-T*
CTRL-T When 'incsearch' is set, entering a search pattern for "/" or
"?" and the current match is displayed then CTRL-T will move
to the previous match (does not take |search-offset| into
account).
to the previous match. The |search-offset| is applied when
<CR> is pressed, but does not affect the match highlighting.
Use CTRL-G to move to the next match. Hint: on a regular
keyboard T is above G.
@@ -1101,7 +1102,7 @@ Note: these are typed literally, they are not special keys!
It differs from <slnum> in that <sflnum> is replaced with
the script line number in any situation. *E961*
*:<client>* *<client>*
<client> is replaced with the {clinetid} of the last received
<client> is replaced with the {clientid} of the last received
message in |server2client()|
*filename-modifiers*

View File

@@ -1,4 +1,4 @@
*filetype.txt* For Vim version 9.2. Last change: 2026 Feb 14
*filetype.txt* For Vim version 9.2. Last change: 2026 Apr 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -161,8 +161,10 @@ variables can be used to overrule the filetype used for certain extensions:
|ft-cpp-syntax|
*.i g:filetype_i |ft-progress-syntax|
*.inc g:filetype_inc
*.int g:filetype_int
*.lsl g:filetype_lsl
*.m g:filetype_m |ft-mathematica-syntax|
*.mac g:filetype_mac
*[mM]makefile,*.mk,*.mak,[mM]akefile*
g:make_flavor |ft-make-syntax|
*.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,*.md
@@ -650,6 +652,12 @@ One command, :DiffGitCached, is provided to show a diff of the current commit
in the preview window. It is equivalent to calling "git diff --cached" plus
any arguments given to the command.
The length of the first line of the commit message used for
syntax highlighting can be configured via `g:gitcommit_summary_length`.
The default is 50. Example: >
let g:gitcommit_summary_length = 70
GIT REBASE *ft-gitrebase-plugin*
The gitrebase filetype defines the following buffer-local commands, to help

View File

@@ -1,399 +1,373 @@
*ft_rust.txt* Filetype plugin for Rust
*ft_rust.txt* Filetype plugin for Rust
==============================================================================
CONTENTS *rust*
CONTENTS *rust*
1. Introduction |rust-intro|
2. Settings |rust-settings|
3. Commands |rust-commands|
4. Mappings |rust-mappings|
1. Introduction |rust-intro|
2. Settings |rust-settings|
3. Commands |rust-commands|
4. Mappings |rust-mappings|
==============================================================================
INTRODUCTION *rust-intro*
INTRODUCTION *rust-intro*
This plugin provides syntax and supporting functionality for the Rust
filetype. It requires Vim 8 or higher for full functionality. Some commands
will not work on earlier versions.
filetype.
==============================================================================
SETTINGS *rust-settings*
SETTINGS *rust-settings*
This plugin has a few variables you can define in your vimrc that change the
behavior of the plugin.
Some variables can be set buffer local (`:b` prefix), and the buffer local
Some variables can be set buffer local (`b:` prefix), and the buffer local
will take precedence over the global `g:` counterpart.
*g:rustc_path*
*g:rustc_path*
g:rustc_path~
Set this option to the path to rustc for use in the |:RustRun| and
|:RustExpand| commands. If unset, "rustc" will be located in $PATH: >
let g:rustc_path = $HOME."/bin/rustc"
|:RustExpand| commands. If unset, "rustc" will be located in $PATH: >
let g:rustc_path = $HOME."/bin/rustc"
<
*g:rustc_makeprg_no_percent*
*g:rustc_makeprg_no_percent*
g:rustc_makeprg_no_percent~
Set this option to 1 to have 'makeprg' default to "rustc" instead of
"rustc %": >
let g:rustc_makeprg_no_percent = 1
let g:rustc_makeprg_no_percent = 1
<
*g:rust_conceal*
*g:rust_conceal*
g:rust_conceal~
Set this option to turn on the basic |conceal| support: >
let g:rust_conceal = 1
let g:rust_conceal = 1
<
*g:rust_conceal_mod_path*
*g:rust_conceal_mod_path*
g:rust_conceal_mod_path~
Set this option to turn on |conceal| for the path connecting token
"::": >
let g:rust_conceal_mod_path = 1
Set this option to turn on |conceal| for the path connecting token "::": >
let g:rust_conceal_mod_path = 1
<
*g:rust_conceal_pub*
*g:rust_conceal_pub*
g:rust_conceal_pub~
Set this option to turn on |conceal| for the "pub" token: >
let g:rust_conceal_pub = 1
let g:rust_conceal_pub = 1
<
*g:rust_recommended_style*
*g:rust_recommended_style*
g:rust_recommended_style~
Set this option to enable vim indentation and textwidth settings to
conform to style conventions of the Rust style guide (i.e. use 4
spaces for indents and set 'textwidth' to 100). This option is enabled
by default. To disable it: >
let g:rust_recommended_style = 0
Set this option to enable vim indentation and textwidth settings to
conform to style conventions of the Rust style guide (i.e. use 4
spaces for indents and set 'textwidth' to 100). This option is
enabled by default. To disable it: >
let g:rust_recommended_style = 0
<
*g:rust_fold*
*g:rust_fold*
g:rust_fold~
Set this option to turn on |folding|: >
let g:rust_fold = 1
let g:rust_fold = 1
<
Value Effect ~
0 No folding
1 Braced blocks are folded. All folds are open by
default.
2 Braced blocks are folded. 'foldlevel' is left at the
global value (all folds are closed by default).
Value Effect ~
0 No folding
1 Braced blocks are folded. All folds are open by default.
2 Braced blocks are folded. 'foldlevel' is left at the global
value (all folds are closed by default).
*g:rust_bang_comment_leader*
*g:rust_bang_comment_leader*
g:rust_bang_comment_leader~
Set this option to 1 to preserve the leader on multi-line doc comments
using the /*! syntax: >
let g:rust_bang_comment_leader = 1
let g:rust_bang_comment_leader = 1
<
*g:rust_use_custom_ctags_defs*
*g:rust_use_custom_ctags_defs*
g:rust_use_custom_ctags_defs~
Set this option to 1 if you have customized ctags definitions for Rust
and do not wish for those included with rust.vim to be used: >
let g:rust_use_custom_ctags_defs = 1
let g:rust_use_custom_ctags_defs = 1
<
NOTE: rust.vim's built-in definitions are only used for the Tagbar Vim
plugin, if you have it installed, AND if Universal Ctags is not
detected. This is because Universal Ctags already has built-in
detected. This is because Universal Ctags already has built-in
support for Rust when used with Tagbar.
Also, note that when using ctags other than Universal Ctags, it is not
automatically used when generating |tags| files that Vim can use to
navigate to definitions across different source files. Feel free to
navigate to definitions across different source files. Feel free to
copy `rust.vim/ctags/rust.ctags` into your own `~/.ctags` if you wish
to generate |tags| files.
*g:ftplugin_rust_source_path*
*g:ftplugin_rust_source_path*
g:ftplugin_rust_source_path~
Set this option to a path that should be prepended to 'path' for Rust
source files: >
let g:ftplugin_rust_source_path = $HOME.'/dev/rust'
let g:ftplugin_rust_source_path = $HOME.'/dev/rust'
<
*g:rustfmt_command*
*g:rustfmt_command*
g:rustfmt_command~
Set this option to the name of the 'rustfmt' executable in your $PATH. If
not specified it defaults to 'rustfmt' : >
let g:rustfmt_command = 'rustfmt'
Set this option to the name of the "rustfmt" executable in your $PATH.
If not specified it defaults to "rustfmt": >
let g:rustfmt_command = 'rustfmt'
<
*g:rustfmt_autosave*
*g:rustfmt_autosave*
*b:rustfmt_autosave*
g:rustfmt_autosave~
Set this option to 1 to run |:RustFmt| automatically when saving a
buffer. If not specified it defaults to 0 : >
let g:rustfmt_autosave = 0
buffer. If not specified it defaults to 0: >
let g:rustfmt_autosave = 0
<
There is also a buffer-local b:rustfmt_autosave that can be set for
the same purpose, and can override the global setting.
*g:rustfmt_autosave_if_config_present*
*g:rustfmt_autosave_if_config_present*
*b:rustfmt_autosave_if_config_present*
g:rustfmt_autosave_if_config_present~
Set this option to 1 to have *b:rustfmt_autosave* be set automatically
if a `rustfmt.toml` file is present in any parent directly leading to
the file being edited. If not set, default to 0: >
let g:rustfmt_autosave_if_config_present = 0
Set this option to 1 to have |b:rustfmt_autosave| be set automatically
if a `rustfmt.toml` file is present in any parent directory leading to
the file being edited. If not set, default to 0: >
let g:rustfmt_autosave_if_config_present = 0
<
This is useful to have `rustfmt` only execute on save, on projects
that have `rustfmt.toml` configuration.
There is also a buffer-local b:rustfmt_autosave_if_config_present
that can be set for the same purpose, which can overrides the global
that can be set for the same purpose, which can override the global
setting.
*g:rustfmt_fail_silently*
*g:rustfmt_fail_silently*
g:rustfmt_fail_silently~
Set this option to 1 to prevent 'rustfmt' from populating the
|location-list| with errors. If not specified it defaults to 0: >
let g:rustfmt_fail_silently = 0
Set this option to 1 to prevent "rustfmt" from populating the
|location-list| with errors. If not specified it defaults to 0: >
let g:rustfmt_fail_silently = 0
<
*g:rustfmt_options*
*g:rustfmt_options*
g:rustfmt_options~
Set this option to a string of options to pass to 'rustfmt'. The
write-mode is already set to 'overwrite'. If not specified it
defaults to '' : >
let g:rustfmt_options = ''
Set this option to a string of options to pass to "rustfmt".
The write-mode is already set to "overwrite". If not specified it
defaults to '': >
let g:rustfmt_options = ''
<
*g:rustfmt_emit_files*
*g:rustfmt_emit_files*
g:rustfmt_emit_files~
If not specified rust.vim tries to detect the right parameter to
pass to rustfmt based on its reported version. Otherwise, it
determines whether to run rustfmt with '--emit=files' (when 1 is
provided) instead of '--write-mode=overwrite'. >
let g:rustfmt_emit_files = 0
pass to rustfmt based on its reported version. Otherwise, it
determines whether to run rustfmt with "--emit=files" (when 1 is
provided) instead of "--write-mode=overwrite". >
let g:rustfmt_emit_files = 0
<
*g:rustfmt_detect_version*
*g:rustfmt_detect_version*
g:rustfmt_detect_version~
When set to 1, will try to parse the version output from "rustfmt".
Disabled by default for performance reasons
>
let g:rustfmt_detect_version = 1
Disabled by default for performance reasons. >
let g:rustfmt_detect_version = 1
<
*g:rustfmt_find_toml*
*g:rustfmt_find_toml*
g:rustfmt_find_toml~
When set to 1, will try to find `rustfmt.toml` file by searching from
current path upwards. Disabled by default for performance reasons
>
let g:rustfmt_find_toml = 1
current path upwards. Disabled by default for performance reasons. >
let g:rustfmt_find_toml = 1
<
*g:rust_playpen_url*
*g:rust_playpen_url*
g:rust_playpen_url~
Set this option to override the url for the playpen to use: >
let g:rust_playpen_url = 'https://play.rust-lang.org/'
let g:rust_playpen_url = 'https://play.rust-lang.org/'
<
*g:rust_shortener_url*
*g:rust_shortener_url*
g:rust_shortener_url~
Set this option to override the url for the url shortener: >
let g:rust_shortener_url = 'https://is.gd/'
let g:rust_shortener_url = 'https://is.gd/'
<
*g:rust_clip_command*
*g:rust_clip_command*
g:rust_clip_command~
Set this option to the command used in your OS to copy the Rust Play
url to the clipboard: >
let g:rust_clip_command = 'xclip -selection clipboard'
let g:rust_clip_command = 'xclip -selection clipboard'
<
*g:cargo_makeprg_params*
*g:cargo_makeprg_params*
g:cargo_makeprg_params~
Set this option to the string of parameters to pass to cargo. If not
specified it defaults to '$*' : >
let g:cargo_makeprg_params = 'build'
Set this option to the string of parameters to pass to cargo. If not
specified it defaults to "$*": >
let g:cargo_makeprg_params = 'build'
<
*g:cargo_shell_command_runner*
*g:cargo_shell_command_runner*
g:cargo_shell_command_runner~
Set this option to change how to run shell commands for cargo commands
|:Cargo|, |:Cbuild|, |:Crun|, ...
By default, |:terminal| is used to run shell command in terminal window
asynchronously. But if you prefer |:!| for running the commands, it can
be specified: >
let g:cargo_shell_command_runner = '!'
|:Cargo|, |:Cbuild|, |:Crun|, etc. - see |rust-commands|.
By default, |:terminal| is used to run a shell command in a terminal
window asynchronously. But if you prefer |:!| for running the
commands, it can be specified: >
let g:cargo_shell_command_runner = '!'
<
Integration with Syntastic *rust-syntastic*
Integration with Syntastic *rust-syntastic*
--------------------------
This plugin automatically integrates with the Syntastic checker. There are two
checkers provided: 'rustc', and 'cargo'. The latter invokes 'Cargo' in order to
build code, and the former delivers a single edited '.rs' file as a compilation
target directly to the Rust compiler, `rustc`.
This plugin automatically integrates with the Syntastic checker. There are
two checkers provided: "rustc", and "cargo". The latter invokes "cargo" to
build code, and the former delivers a single edited ".rs" file as a
compilation target directly to the Rust compiler, `rustc`.
Because Cargo is almost exclusively being used for building Rust code these
days, 'cargo' is the default checker. >
let g:syntastic_rust_checkers = ['cargo']
days, "cargo" is the default checker.
>
let g:syntastic_rust_checkers = ['cargo']
<
If you would like to change it, you can set `g:syntastic_rust_checkers` to a
different value.
*g:rust_cargo_avoid_whole_workspace*
*b:rust_cargo_avoid_whole_workspace*
*g:rust_cargo_avoid_whole_workspace*
*b:rust_cargo_avoid_whole_workspace*
g:rust_cargo_avoid_whole_workspace~
When editing a crate that is part of a Cargo workspace, and this
option is set to 1 (the default), then 'cargo' will be executed
option is set to 1 (the default), then "cargo" will be executed
directly in that crate directory instead of in the workspace
directory. Setting 0 prevents this behavior - however be aware that if
you are working in large workspace, Cargo commands may take more time,
plus the Syntastic error list may include all the crates in the
directory. Setting 0 prevents this behavior - however be aware that
if you are working in a large workspace, Cargo commands may take more
time, plus the Syntastic error list may include all the crates in the
workspace. >
let g:rust_cargo_avoid_whole_workspace = 0
let g:rust_cargo_avoid_whole_workspace = 0
<
*g:rust_cargo_check_all_targets*
*b:rust_cargo_check_all_targets*
*g:rust_cargo_check_all_targets*
*b:rust_cargo_check_all_targets*
g:rust_cargo_check_all_targets~
When set to 1, the `--all-targets` option will be passed to cargo when
Syntastic executes it, allowing the linting of all targets under the
package.
The default is 0.
*g:rust_cargo_check_all_features*
*b:rust_cargo_check_all_features*
*g:rust_cargo_check_all_features*
*b:rust_cargo_check_all_features*
g:rust_cargo_check_all_features~
When set to 1, the `--all-features` option will be passed to cargo when
Syntastic executes it, allowing the linting of all features of the
package.
The default is 0.
*g:rust_cargo_check_examples*
*b:rust_cargo_check_examples*
*g:rust_cargo_check_examples*
*b:rust_cargo_check_examples*
g:rust_cargo_check_examples~
When set to 1, the `--examples` option will be passed to cargo when
Syntastic executes it, to prevent the exclusion of examples from
linting. The examples are normally under the `examples/` directory of
linting. The examples are normally under the `examples/` directory of
the crate.
The default is 0.
*g:rust_cargo_check_tests*
*b:rust_cargo_check_tests*
*g:rust_cargo_check_tests*
*b:rust_cargo_check_tests*
g:rust_cargo_check_tests~
When set to 1, the `--tests` option will be passed to cargo when
Syntastic executes it, to prevent the exclusion of tests from linting.
The tests are normally under the `tests/` directory of the crate.
The default is 0.
*g:rust_cargo_check_benches*
*b:rust_cargo_check_benches*
*g:rust_cargo_check_benches*
*b:rust_cargo_check_benches*
g:rust_cargo_check_benches~
When set to 1, the `--benches` option will be passed to cargo when
Syntastic executes it. The benches are normally under the `benches/`
directory of the crate.
The default is 0.
Integration with auto-pairs *rust-auto-pairs*
Integration with auto-pairs *rust-auto-pairs*
---------------------------
This plugin automatically configures the auto-pairs plugin not to duplicate
single quotes, which are used more often for lifetime annotations than for
single character literals.
*g:rust_keep_autopairs_default*
*g:rust_keep_autopairs_default*
g:rust_keep_autopairs_default~
Don't override auto-pairs default for the Rust filetype. The default
Don't override auto-pairs default for the Rust filetype. The default
is 0.
==============================================================================
COMMANDS *rust-commands*
COMMANDS *rust-commands*
Invoking Cargo
--------------
This plug defines very simple shortcuts for invoking Cargo from with Vim.
This plugin defines very simple shortcuts for invoking Cargo from within Vim.
:Cargo <args> *:Cargo*
Runs 'cargo' with the provided arguments.
:Cargo <args> *:Cargo*
Runs "cargo" with the provided arguments.
:Cbuild <args> *:Cbuild*
Shortcut for 'cargo build`.
:Cbuild <args> *:Cbuild*
Shortcut for "cargo build".
:Cclean <args> *:Cclean*
Shortcut for 'cargo clean`.
:Cclean <args> *:Cclean*
Shortcut for "cargo clean".
:Cdoc <args> *:Cdoc*
Shortcut for 'cargo doc`.
:Cdoc <args> *:Cdoc*
Shortcut for "cargo doc".
:Cinit <args> *:Cinit*
Shortcut for 'cargo init`.
:Cinit <args> *:Cinit*
Shortcut for "cargo init".
:Crun <args> *:Crun*
Shortcut for 'cargo run`.
:Crun <args> *:Crun*
Shortcut for "cargo run".
:Ctest <args> *:Ctest*
Shortcut for 'cargo test`.
:Ctest <args> *:Ctest*
Shortcut for "cargo test".
:Cupdate <args> *:Cupdate*
Shortcut for 'cargo update`.
:Cupdate <args> *:Cupdate*
Shortcut for "cargo update".
:Cbench <args> *:Cbench*
Shortcut for 'cargo bench`.
:Cbench <args> *:Cbench*
Shortcut for "cargo bench".
:Csearch <args> *:Csearch*
Shortcut for 'cargo search`.
:Csearch <args> *:Csearch*
Shortcut for "cargo search".
:Cpublish <args> *:Cpublish*
Shortcut for 'cargo publish`.
:Cpublish <args> *:Cpublish*
Shortcut for "cargo publish".
:Cinstall <args> *:Cinstall*
Shortcut for 'cargo install`.
:Cinstall <args> *:Cinstall*
Shortcut for "cargo install".
:Cruntarget <args> *:Cruntarget*
Shortcut for 'cargo run --bin' or 'cargo run --example',
depending on the currently open buffer.
:Cruntarget <args> *:Cruntarget*
Shortcut for "cargo run --bin" or "cargo run --example",
depending on the currently open buffer.
Formatting
----------
:RustFmt *:RustFmt*
Runs |g:rustfmt_command| on the current buffer. If
:RustFmt *:RustFmt*
Runs |g:rustfmt_command| on the current buffer. If
|g:rustfmt_options| is set then those will be passed to the
executable.
If |g:rustfmt_fail_silently| is 0 (the default) then it
will populate the |location-list| with the errors from
|g:rustfmt_command|. If |g:rustfmt_fail_silently| is set to 1
|g:rustfmt_command|. If |g:rustfmt_fail_silently| is set to 1
then it will not populate the |location-list|.
:RustFmtRange *:RustFmtRange*
Runs |g:rustfmt_command| with selected range. See
|:RustFmt| for any other information.
:RustFmtRange *:RustFmtRange*
Runs |g:rustfmt_command| with selected range. See |:RustFmt|
for any other information.
Playpen integration
-------------------
:RustPlay *:RustPlay*
:RustPlay *:RustPlay*
This command will only work if you have web-api.vim installed
(available at https://github.com/mattn/webapi-vim). It sends the
current selection, or if nothing is selected, the entirety of the
current buffer to the Rust playpen, and emits a message with the
shortened URL to the playpen.
(available at https://github.com/mattn/webapi-vim). It sends
the current selection, or if nothing is selected, the entirety
of the current buffer to the Rust playpen, and emits a message
with the shortened URL to the playpen.
|g:rust_playpen_url| is the base URL to the playpen, by default
"https://play.rust-lang.org/".
|g:rust_shortener_url| is the base url for the shorterner, by
|g:rust_shortener_url| is the base url for the shortener, by
default "https://is.gd/"
|g:rust_clip_command| is the command to run to copy the
playpen url to the clipboard of your system.
Evaluation of a single Rust file
--------------------------------
NOTE: These commands are useful only when working with standalone Rust files,
which is usually not the case for common Rust development. If you wish to
building Rust crates from with Vim can should use Vim's make, Syntastic, or
functionality from other plugins.
which is usually not the case for common Rust development. If you wish to
build Rust crates from within Vim, use Vim's make, Syntastic, or functionality
from other plugins.
:RustRun [args] *:RustRun*
:RustRun [args] *:RustRun*
:RustRun! [rustc-args] [--] [args]
Compiles and runs the current file. If it has unsaved changes,
it will be saved first using |:update|. If the current file is
an unnamed buffer, it will be written to a temporary file
first. The compiled binary is always placed in a temporary
directory, but is run from the current directory.
Compiles and runs the current file. If it has unsaved
changes, it will be saved first using |:update|. If the
current file is an unnamed buffer, it will be written to a
temporary file first. The compiled binary is always placed in
a temporary directory, but is run from the current directory.
The arguments given to |:RustRun| will be passed to the
compiled binary.
@@ -405,11 +379,11 @@ functionality from other plugins.
If |g:rustc_path| is defined, it is used as the path to rustc.
Otherwise it is assumed rustc can be found in $PATH.
:RustExpand [args] *:RustExpand*
:RustExpand [args] *:RustExpand*
:RustExpand! [TYPE] [args]
Expands the current file using --pretty and displays the
results in a new split. If the current file has unsaved
changes, it will be saved first using |:update|. If the
results in a new split. If the current file has unsaved
changes, it will be saved first using |:update|. If the
current file is an unnamed buffer, it will be written to a
temporary file first.
@@ -418,16 +392,16 @@ functionality from other plugins.
configurations.
If ! is specified, the first argument is the expansion type to
pass to rustc --pretty. Otherwise it will default to
pass to rustc --pretty. Otherwise it will default to
"expanded".
If |g:rustc_path| is defined, it is used as the path to rustc.
Otherwise it is assumed rustc can be found in $PATH.
:RustEmitIr [args] *:RustEmitIr*
:RustEmitIr [args] *:RustEmitIr*
Compiles the current file to LLVM IR and displays the results
in a new split. If the current file has unsaved changes, it
will be saved first using |:update|. If the current file is an
in a new split. If the current file has unsaved changes, it
will be saved first using |:update|. If the current file is an
unnamed buffer, it will be written to a temporary file first.
The arguments given to |:RustEmitIr| will be passed to rustc.
@@ -435,10 +409,10 @@ functionality from other plugins.
If |g:rustc_path| is defined, it is used as the path to rustc.
Otherwise it is assumed rustc can be found in $PATH.
:RustEmitAsm [args] *:RustEmitAsm*
:RustEmitAsm [args] *:RustEmitAsm*
Compiles the current file to assembly and displays the results
in a new split. If the current file has unsaved changes, it
will be saved first using |:update|. If the current file is an
in a new split. If the current file has unsaved changes, it
will be saved first using |:update|. If the current file is an
unnamed buffer, it will be written to a temporary file first.
The arguments given to |:RustEmitAsm| will be passed to rustc.
@@ -446,13 +420,12 @@ functionality from other plugins.
If |g:rustc_path| is defined, it is used as the path to rustc.
Otherwise it is assumed rustc can be found in $PATH.
Running test(s)
---------------
:[N]RustTest[!] [options] *:RustTest*
:[N]RustTest[!] [options] *:RustTest*
Runs a test under the cursor when the current buffer is in a
cargo project with "cargo test" command. If the command did
cargo project with "cargo test" command. If the command did
not find any test function under the cursor, it stops with an
error message.
@@ -465,35 +438,36 @@ Running test(s)
When [options] is given, it is passed to "cargo" command
arguments.
When the current buffer is outside cargo project, the command
runs "rustc --test" command instead of "cargo test" as
fallback. All tests are run regardless of adding ! since there
is no way to run specific test function with rustc. [options]
is passed to "rustc" command arguments in the case.
When the current buffer is outside a cargo project, the
command runs "rustc --test" command instead of "cargo test" as
fallback. All tests are run regardless of adding ! since
there is no way to run specific test function with rustc.
[options] is passed to "rustc" command arguments in that case.
Takes optional modifiers (see |<mods>|): >
:tab RustTest
:belowright 16RustTest
:leftabove vert 80RustTest
Takes optional modifiers (see |<mods>|): >
:tab RustTest
:belowright 16RustTest
:leftabove vert 80RustTest
<
rust.vim Debugging
------------------
:RustInfo *:RustInfo*
:RustInfo *:RustInfo*
Emits debugging info of the Vim Rust plugin.
:RustInfoToClipboard *:RustInfoClipboard*
:RustInfoToClipboard *:RustInfoClipboard*
Saves debugging info of the Vim Rust plugin to the default
register.
:RustInfoToFile [filename] *:RustInfoToFile*
:RustInfoToFile [filename] *:RustInfoToFile*
Saves debugging info of the Vim Rust plugin to the given file,
overwriting it.
==============================================================================
MAPPINGS *rust-mappings*
MAPPINGS *rust-mappings*
This plugin defines mappings for |[[| and |]]| to support hanging indents.
This plugin defines Normal mode, Visual mode, and Operator-pending mode
mappings for |[[| and |]]| to support hanging indents.
==============================================================================
vim:tw=78:sw=4:noet:ts=8:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*gui.txt* For Vim version 9.2. Last change: 2026 Feb 14
*gui.txt* For Vim version 9.2. Last change: 2026 Apr 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1150,11 +1150,22 @@ For the Win32 GUI *E244* *E245*
NONANTIALIASED, CLEARTYPE and DEFAULT. Normally you would use
"qDEFAULT".
Some quality values are not supported in legacy OSs.
fXX - OpenType font feature. Specify a single feature as
tag=value, where tag is a 4-character OpenType feature
tag and value is the parameter (0 to disable, 1 or
higher to enable/select variant). Multiple features
can be specified by repeating the ":f" option.
This only takes effect when 'renderoptions' is set to use
DirectWrite (type:directx). Default features (calt, liga,
etc.) are preserved unless explicitly overridden.
Example: ":fss19=1:fcalt=0" enables Stylistic Set 19
and disables Contextual Alternates.
- A '_' can be used in the place of a space, so you don't need to use
backslashes to escape the spaces.
Examples: >
:set guifont=courier_new:h12:w5:b:cRUSSIAN
:set guifont=Andale_Mono:h7.5:w4.5
:set guifont=Cascadia_Code:h14:fss19=1:fcalt=1:fliga=1
See also |font-sizes|.

View File

@@ -1,4 +1,4 @@
*if_pyth.txt* For Vim version 9.2. Last change: 2026 Feb 14
*if_pyth.txt* For Vim version 9.2. Last change: 2026 Mar 18
VIM REFERENCE MANUAL by Paul Moore
@@ -186,7 +186,7 @@ vim.eval(str) *python-eval*
- a list if the Vim expression evaluates to a Vim |list|
- a tuple if the Vim expression evaluates to a Vim |tuple|
- a dictionary if the Vim expression evaluates to a Vim |dict|
- a boolean if Vim exression evaluates to |v:true| or |v:false|
- a boolean if Vim expression evaluates to |v:true| or |v:false|
- `None` if Vim expression evaluates to |v:null| or |v:none|
Dictionaries, lists and tuples are recursively expanded.
Examples: >

View File

@@ -1,4 +1,4 @@
*netbeans.txt* For Vim version 9.2. Last change: 2026 Feb 14
*netbeans.txt* For Vim version 9.2. Last change: 2026 Apr 09
VIM REFERENCE MANUAL by Gordon Prieur et al.
@@ -849,7 +849,7 @@ REJECT Not used.
These errors occur when a message violates the protocol:
*E627* *E628* *E629* *E632* *E633* *E634* *E635* *E636*
*E637* *E638* *E639* *E640* *E641* *E642* *E643* *E644* *E645* *E646*
*E647* *E648* *E650* *E651* *E652*
*E647* *E648* *E649* *E650* *E651* *E652*
==============================================================================

View File

@@ -1,4 +1,4 @@
*options.txt* For Vim version 9.2. Last change: 2026 Mar 04
*options.txt* For Vim version 9.2. Last change: 2026 Apr 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -97,6 +97,17 @@ achieve special effects. These options come in three forms:
If the option is a list of flags, superfluous flags
are removed. When adding a flag that was already
present the option value doesn't change.
When the option supports "key:value" items and {value}
contains a "key:value" item or multiple
comma-separated items, each item is processed
individually:
- A "key:value" item where the key already exists with
a different value: the old item is removed and the
new item is appended to the end.
- A "key:value" item that is an exact duplicate is
left unchanged.
- Other items that already exist are left unchanged.
- New items are appended to the end.
Also see |:set-args| above.
:se[t] {option}^={value} *:set^=*
@@ -104,6 +115,11 @@ achieve special effects. These options come in three forms:
the {value} to a string option. When the option is a
comma-separated list, a comma is added, unless the
value was empty.
When the option supports "key:value" items and {value}
contains a "key:value" item or multiple
comma-separated items, each item is processed
individually. Works like |:set+=| but new items are
prepended to the beginning instead of appended.
Also see |:set-args| above.
:se[t] {option}-={value} *:set-=*
@@ -116,6 +132,12 @@ achieve special effects. These options come in three forms:
When the option is a list of flags, {value} must be
exactly as they appear in the option. Remove flags
one by one to avoid problems.
When the option supports "key:value" items and {value}
contains a "key:value" item or multiple
comma-separated items, each item is processed
individually. A "key:value" item removes the existing
item with that key regardless of its value. A "key:"
item also removes by key match.
The individual values from a comma separated list or
list of flags can be inserted by typing 'wildchar'.
See |complete-set-option|.
@@ -302,12 +324,12 @@ that was last closed are used again. If this buffer has been edited in this
window, the values from back then are used. Otherwise the values from the
last closed window where the buffer was edited last are used.
It's possible to set a local window option specifically for a type of buffer.
When you edit another buffer in the same window, you don't want to keep
using these local window options. Therefore Vim keeps a global value of the
local window options, which is used when editing another buffer. Each window
has its own copy of these values. Thus these are local to the window, but
global to all buffers in the window. With this you can do: >
":setlocal" can be used to set a local window option specifically for a type
of buffer. When you edit another buffer in the same window, you don't want to
keep using these local window options. Meanwhile ":set" also sets a global
value of a local window option, which is used when editing another buffer.
Each window has its own copy of these global values, making them local to the
window, but global to all buffers in the window. With this you can do: >
:e one
:set list
:e two
@@ -1008,10 +1030,10 @@ 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`, `:tag`, `:stop`,
`:suspend`, `:!`, `:make`, `:terminal`, CTRL-] or CTRL-^ command; and
when a `:buffer`, CTRL-O, CTRL-I, '{A-Z0-9}, or `{A-Z0-9} command
switches 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
@@ -1025,8 +1047,8 @@ A jump table for the options with a short description can be found at |Q_op|.
*'autowriteall'* *'awa'* *'noautowriteall'* *'noawa'*
'autowriteall' 'awa' boolean (default off)
global
Like 'autowrite', but also used for commands ":edit", ":enew",
":quit", ":qall", ":exit", ":xit", ":recover" and closing the Vim
Like 'autowrite', but also used for commands `:edit`, `:enew`,
`:quit`, `:qall`, `:exit`, `:xit`, `:recover` and closing the Vim
window.
Setting this option also implies that Vim behaves like 'autowrite' has
been set.
@@ -2204,6 +2226,8 @@ A jump table for the options with a short description can be found at |Q_op|.
Note: The match limit takes effect only during forward completion
(CTRL-N) and is ignored during backward completion (CTRL-P).
This option cannot be set in a modeline when 'modelineexpr' is off.
*'completefunc'* *'cfu'*
'completefunc' 'cfu' string (default: empty)
local to buffer
@@ -3210,7 +3234,10 @@ A jump table for the options with a short description can be found at |Q_op|.
difference. Non-alphanumeric
multi-byte characters such as emoji
and CJK characters are considered
individual words.
individual words. Small gaps of
non-word characters (5 bytes or less)
between changes are merged into a
single highlight block.
internal Use the internal diff library. This is
ignored when 'diffexpr' is set. *E960*
@@ -4661,6 +4688,7 @@ A jump table for the options with a short description can be found at |Q_op|.
You can include a line break. Simplest method is to use |:let|: >
:let &guitabtooltip = "line one\nline two"
<
This option cannot be set in a modeline when 'modelineexpr' is off.
*'helpfile'* *'hf'*
'helpfile' 'hf' string (default (MS-Windows) "$VIMRUNTIME\doc\help.txt"
@@ -4729,7 +4757,8 @@ A jump table for the options with a short description can be found at |Q_op|.
l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,
a:LineNrAbove,b:LineNrBelow,
N:CursorLineNr,r:Question,s:StatusLine,
S:StatusLineNC,c:VertSplit,t:Title,
S:StatusLineNC,c:VertSplit,
|:VertSplitNC,t:Title,
v:Visual,V:VisualNOS,w:WarningMsg,
W:WildMenu,f:Folded,F:FoldColumn,
A:DiffAdd,C:DiffChange,D:DiffDelete,
@@ -4777,6 +4806,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|hl-StatusLineNC| S status lines of not-current windows
|hl-Title| t Titles for output from ":set all", ":autocmd" etc.
|hl-VertSplit| c column used to separate vertically split windows
|hl-VertSplitNC| | column separating non-current vertically split
windows
|hl-Visual| v Visual mode
|hl-VisualNOS| V Visual mode when Vim is "Not Owning the
Selection" Only X11 Gui's |gui-x11|,
@@ -5184,7 +5215,8 @@ A jump table for the options with a short description can be found at |Q_op|.
command line has no uppercase characters, the added character is
converted to lowercase.
CTRL-R CTRL-W can be used to add the word at the end of the current
match, excluding the characters that were already typed.
match, excluding the characters that were already typed (starting from
the beginning of the word).
NOTE: This option is reset when 'compatible' is set.
*'indentexpr'* *'inde'*
@@ -6001,7 +6033,8 @@ A jump table for the options with a short description can be found at |Q_op|.
Increasing this limit above 200 also changes the maximum for Ex
command recursion, see |E169|.
See also |:function|.
Also used for maximum depth of callback functions.
Also used for maximum depth of callback functions and encoding and
decoding of deeply nested json data.
*'maxmapdepth'* *'mmd'* *E223*
'maxmapdepth' 'mmd' number (default 1000)
@@ -6166,6 +6199,48 @@ A jump table for the options with a short description can be found at |Q_op|.
NOTE: 'modeline' is set to the Vi default value when 'compatible' is
set and to the Vim default value when 'compatible' is reset.
*'modelinestrict'* *'mlst'* *'nomodelinestrict'* *'nomlst'*
'modelinestrict' 'mlst' boolean (default: on)
global
When on, only a safe subset of options can be set from a |modeline|.
The following options are allowed:
'autoindent'
'cindent'
'commentstring'
'expandtab'
'filetype'
'foldcolumn'
'foldenable'
'foldmethod'
'modifiable'
'readonly'
'rightleft'
'shiftwidth'
'smartindent'
'softtabstop'
'spell'
'spelllang'
'tabstop'
'textwidth'
'varsofttabstop'
'vartabstop'
Any other option set from a modeline will be silently ignored.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
The behaviour of 'modeline', 'modelinestrict' and 'modelineexpr' is
as follows:
'modeline'| 'modelinestrict'| 'modelineexpr' | Meaning
----------+-----------------+-------------------+--------~
on | off | on | All options can be set
on | on | any | Only whitelisted
| | | options can be set
on | off | off | All options except for
| | | expr options can be set
off | any | any | No options can be set
*'modifiable'* *'ma'* *'nomodifiable'* *'noma'*
*E21*
'modifiable' 'ma' boolean (default on)
@@ -6821,6 +6896,8 @@ A jump table for the options with a short description can be found at |Q_op|.
The format of the header produced in |:hardcopy| output.
See |pheader-option|.
This option cannot be set in a modeline when 'modelineexpr' is off.
*'printmbcharset'* *'pmbcs'*
'printmbcharset' 'pmbcs' string (default "")
global
@@ -6854,6 +6931,7 @@ A jump table for the options with a short description can be found at |Q_op|.
global
Defines a border and optional decorations for the popup menu in
completion. The value is a comma-separated list of keywords.
See 'pumopt' for a consolidated alternative.
Border styles (at most one):
"single" use thin box-drawing characters
@@ -6889,6 +6967,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Determines the maximum number of items to show in the popup menu for
Insert mode completion. When zero as much space as available is used.
|ins-completion-menu|.
See 'pumopt' for a consolidated alternative.
*'pummaxwidth'* *'pmw'*
'pummaxwidth' 'pmw' number (default 0)
@@ -6900,12 +6979,67 @@ A jump table for the options with a short description can be found at |Q_op|.
This option takes precedence over 'pumwidth'.
|ins-completion-menu|.
See 'pumopt' for a consolidated alternative.
*'pumopt'*
'pumopt' string (default "")
global
Configures the popup menu used for Insert mode completion.
The value is a comma-separated list of "key:value" pairs and flags.
Keys with values:
border:{style} set a border style (at most one):
"single" thin box-drawing characters
"double" double-line box-drawing characters
"round" rounded corners
"ascii" ASCII characters (-, |, +)
"custom:X;X;X;X;X;X;X;X"
eight characters separated by
semicolons, in the order: top, right,
bottom, left, topleft, topright,
botright, botleft
height:{n} maximum number of items to show (default 0,
meaning as much space as available)
width:{n} minimum width (default 15)
maxwidth:{n} maximum width (default 0, meaning no limit).
This takes precedence over width.
Truncated text is indicated by "trunc" value
of 'fillchars' option.
opacity:{n} opacity percentage 0-100 (default 100).
When less than 100, background content shows
through the popup menu.
Flags (no value):
margin adds one-cell spacing inside the left and
right border. Requires a border style.
shadow draws a shadow at the right and bottom edges.
Border styles using box-drawing characters ("single", "double",
"round") are only available when 'encoding' is "utf-8" and 'ambiwidth'
is "single".
Highlight groups:
|hl-PmenuBorder| used for the border characters
|hl-PmenuShadow| used for the shadow
Note: When 'pumopt' is set, all values are reset to their defaults
first, then the specified keys are applied. Unspecified keys get
their default values.
Examples: >
:set pumopt=border:single
:set pumopt=border:double,margin,shadow
:set pumopt=height:10,width:20,opacity:80
:set pumopt=border:custom:─;│;─;│;┌;┐;┘;└,shadow
<
See also: |ins-completion-menu|.
*'pumwidth'* *'pw'*
'pumwidth' 'pw' number (default 15)
global
Determines the minimum width to use for the popup menu for Insert mode
completion. |ins-completion-menu|.
See 'pumopt' for a consolidated alternative.
*'pythondll'*
'pythondll' string (default depends on the build)
@@ -7443,8 +7577,8 @@ A jump table for the options with a short description can be found at |Q_op|.
Minimal number of screen lines to keep above and below the cursor.
This will make some context visible around where you are working. If
you set it to a very large value (999) the cursor line will always be
in the middle of the window (except at the start or end of the file or
when long lines wrap).
in the middle of the window (except at the start or end of the file,
see 'scrolloffpad', or when long lines wrap).
After using the local value, go back the global value with one of
these two: >
setlocal scrolloff<
@@ -7452,7 +7586,24 @@ A jump table for the options with a short description can be found at |Q_op|.
< For scrolling horizontally see 'sidescrolloff'.
NOTE: This option is set to 0 when 'compatible' is set.
*'scrollopt'* *'sbo'*
*'scrolloffpad'* *'sop'*
'scrolloffpad' 'sop' number (default 0)
global or local to window |global-local|
When 'scrolloff' and 'scrolloffpad' are greater than zero, allow
the cursor to remain centered when at the end of the file.
Normally, 'scrolloff' will not keep the cursor centered at the
end of the file.
A value of 0 disables this feature. Any value above 0 enables it.
For a window-local value, -1 means to use the global value.
Values below -1 are invalid.
After using the local value, go back the global value with one of
these two: >
setlocal scrolloffpad<
setlocal scrolloffpad=-1
< *'scrollopt'* *'sbo'*
'scrollopt' 'sbo' string (default "ver,jump")
global
This is a comma-separated list of words that specifies how
@@ -8531,10 +8682,62 @@ A jump table for the options with a short description can be found at |Q_op|.
applied to StatusLineNC for the statusline of non-current
windows.
The number N must be between 1 and 9. See |hl-User1..9|
*stl-%@*
@ - Insert a line break (for the |tabpanel| or when the status line
'statuslineopt' has a "maxheight" value greater than 1).
*stl-%@*
@ - Inserts a newline. This only takes effect when the "maxheight"
value of 'statuslineopt' is greater than 1, or for |tabpanel|.
*stl-%[FuncName]*
%[ defines clickable regions in the statusline. When the user clicks
on a region with the mouse, the specified function is called. The
same syntax can also be used in 'tabline' and 'tabpanel'.
%[FuncName] Start of a clickable region. "FuncName" is the name
of a Vim function to call when the region is clicked.
%[] End of the clickable region. If omitted, the region
extends to the end of the statusline or to the start
of the next clickable region.
A {minwid} value can be used to pass an identifier to the callback:
%3[FuncName] Starts a clickable region with minwid 3.
The function receives a single |Dictionary| argument with these
entries:
"minwid" The minwid value from %N[Func] (0 if not specified).
"nclicks" Number of clicks: 1, 2, or 3.
"button" Mouse button: "l" (left), "m" (middle), "r" (right).
"mods" Modifier keys: combination of "s" (shift), "c" (ctrl),
"a" (alt). Empty string if no modifiers.
"winid" |window-ID| of the window whose statusline was clicked,
or 0 when the click was in 'tabline' or 'tabpanel'.
"area" "statusline", "tabline", or "tabpanel". Indicates
which option the clicked region belongs to.
"tabnr" (tabpanel only) Tab page number of the clicked label.
If the function returns non-zero, the statusline is redrawn.
Dragging the statusline to resize the window still works even when
click handlers are defined. When used in 'tabline' or 'tabpanel',
clicks in %[FuncName] regions are dispatched to the callback
instead of the default tab-selection behavior.
Example: >
func! ClickFile(info)
if a:info.button ==# 'l' && a:info.nclicks == 2
browse edit
endif
return 0
endfunc
set statusline=%[ClickFile]%f%[]\ %l:%c
< This makes the filename in the statusline clickable. Double-clicking
it opens the file browser.
Use `has('statusline_click')` to check if this feature is available.
This is useful for backward compatibility: >
if has('statusline_click')
set statusline=%[ClickFile]%f%[]\ %l:%c
else
set statusline=%f\ %l:%c
endif
<
When displaying a flag, Vim removes the leading comma, if any, when
that flag comes right after plaintext. This will make a nice display
when flags are used like in the examples below.
@@ -8594,31 +8797,48 @@ A jump table for the options with a short description can be found at |Q_op|.
<
*'statuslineopt'* *'stlo'*
'statuslineopt' 'stlo' string (default "")
global
global or local to window |global-local|
{not available when compiled without the |+statusline|
feature}
Optional settings for |status-line|. It can consist of the following
items. All are optional. Items must be separated by a comma.
maxheight:{n} Set the maximum status line height to {n}.
{n} must be 1 or greater.
If not present, 1 is used.
Check whether {n} is applicable to all windows
on all tab pages, and if not, set it to the
closest possible value.
The option value is updated to the actual
applied value. For example, setting
maxheight:999 may result in a smaller value
depending on the available space.
When {n} is set to 2 or more, you can use "@"
in 'statusline' to display information on
multiple lines in the status line.
See |stl-%@|.
fixedheight Fix the status line height to "maxheight".
Without this, the height varies from 1 to
"maxheight" based on the number of newline
|stl-%@| in 'statusline'.
maxheight:{n} Set the maximum status line height to {n}.
{n} must be 1 or greater. If not specified, the
height is 1.
When {n} is 2 or more, you can use newline
|stl-%@| in 'statusline' to display information on
multiple lines.
If {n} cannot be set due to insufficient window
height or other constraints, a best-effort
approach will be taken to set the closest possible
value that does not exceed {n}. No error will be
shown even if the setting cannot be changed.
For the global value, a value applicable to all
windows on all tab pages is used. For a
window-local value, a value applicable to that
window is used.
Note: When the applied value differs from {n}, the
option is updated to reflect it.
Example of updated options: >vim
:set statuslineopt=maxheight:999,fixedheight
" Only 20 lines could be applied, so
" maxheight is updated to 20.
:set statuslineopt?
statuslineopt=maxheight:20,fixedheight
<
Examples: >
:set statuslineopt=fixedheight
:set stlo=
:set stlo=maxheight:2
:set stlo+=maxheight:3
:set stlo=maxheight:2,fixedheight
:set stlo-=fixedheight
<
*'suffixes'* *'su'*
'suffixes' 'su' string (default ".bak,~,.o,.h,.info,.swp,.obj")
@@ -8805,7 +9025,7 @@ A jump table for the options with a short description can be found at |Q_op|.
You can use |g:actual_curtabpage| within a function assigned to
tabpanel. |g:actual_curtabpage| represents current tab's label number.
You can use "%@" or "\n" to insert a new line: >
You can use "%@" or "\n" to insert a newline: >
set tabpanel=%!TabPanel()
function! TabPanel() abort
@@ -8845,6 +9065,23 @@ A jump table for the options with a short description can be found at |Q_op|.
tab panel will not be displayed.
(default 20)
scroll Enable mouse wheel scrolling over the tabpanel
area when the tab list exceeds the visible
screen height. The scroll step is controlled
by 'mousescroll'. When disabled (the default),
the tabpanel shows the page containing the
current tab, with no way to view tabs outside
that page.
scrollbar Reserve a one-column scrollbar in the tabpanel
showing the current scroll position. The
scrollbar uses the |hl-PmenuSbar| and
|hl-PmenuThumb| highlight groups for the track
and thumb respectively. Clicking on the
scrollbar column jumps the thumb to that
position; the thumb can also be dragged.
Implies "scroll".
vert Use a vertical separator for tabpanel.
The vertical separator character is taken from
"tpl_vert" in 'fillchars'.
@@ -9096,6 +9333,24 @@ A jump table for the options with a short description can be found at |Q_op|.
<
NOTE: This option is reset when 'compatible' is set.
*'termresize'* *'trz'*
'termresize' 'trz' string (default "")
global
{only available in Unix, does not work in the GUI}
Determines the method to use for detecting window resize events,
possible values are:
"sigwinch": Use the SIGWINCH signal.
"inband": Receive resize events from the terminal via escape
sequences (recommended if supported by terminal).
"": Automatically choose depending on terminal.
The SIGWINCH handler is always available. If set to "inband" and the
terminal does not support in-band window resize events, then the
SIGWINCH handler will be used instead as a fallback. If set to ""
(empty option), then "inband" will be used if Vim detects that the
terminal supports it, otherwise "sigwinch".
*'termsync'* *'tsy'*
'termsync' 'tsy' boolean (default off)
global
@@ -9109,10 +9364,7 @@ A jump table for the options with a short description can be found at |Q_op|.
The specification can be found at:
https://github.com/contour-terminal/vt-extensions/blob/master/synchronized-output.md
Vim may set this option automatically at startup time when Vim is
compiled with the |+termresponse| feature, by querying the terminal
for DEC mode 2026 support. The terminal codes used are |t_BS| and
|t_ES|.
The terminal codes used are |t_BS| and |t_ES|.
*'termwinkey'* *'twk'*
'termwinkey' 'twk' string (default "")
@@ -10434,11 +10686,10 @@ A jump table for the options with a short description can be found at |Q_op|.
*'wlsteal'* *'wst'* *'nowlsteal'* *'nowst'*
'wlsteal' 'wst' boolean (default off)
global
{only when the |+wayland_focus_steal| feature is
included}
DEPRECATED: This option is no longer used; changing it has no effect.
When enabled, then allow Vim to steal focus by creating a temporary
surface, in order to access the clipboard. For more information see
|wayland-focus-steal|.
surface, in order to access the clipboard.
*'wltimeoutlen'* *'wtm'*
'wltimeoutlen' 'wtm' number (default 500)
@@ -10451,9 +10702,6 @@ A jump table for the options with a short description can be found at |Q_op|.
some cases. On the other hand, it may also mean you receive errors
when the compositor takes more time to respond than usual.
Additionally, this option is also used as the maximum timeout when
waiting for a surface to gain focus, see |wayland-focus-steal|.
*'wrap'* *'nowrap'*
'wrap' boolean (default on)
local to window

View File

@@ -2854,10 +2854,6 @@ your browsing preferences. (see also: |netrw-settings|)
such as listing, file removal, etc.
default: ssh
*g:netrw_tmpfile_escape* =' &;'
escape() is applied to all temporary files
to escape these characters.
*g:netrw_timefmt* specify format string to vim's strftime().
The default, "%c", is "the preferred date
and time representation for the current

View File

@@ -1,4 +1,4 @@
*pi_tar.txt* For Vim version 9.2. Last change: 2026 Feb 14
*pi_tar.txt* For Vim version 9.2. Last change: 2026 Apr 16
+====================+
| Tar File Interface |
@@ -101,10 +101,17 @@ Copyright 2005-2017: *tar-copyright*
4. History *tar-history*
unreleased:
Apr 16, 2026 * add missing g:tar_secure into tar#Extract
Apr 15, 2026 * add path traversal checks in tar#Extract()
Apr 09, 2026 * fix zstd support and dotted filename support
Apr 06, 2026 * fix lz4 support
Feb 07, 2026 * make path traversal detection more robust
Feb 06, 2026 * fix bug with nowrapscan
Jul 16, 2025 * update minimum required Vim version
Jul 13, 2025 * drop leading /
May 19, 2025 * restore working directory after read/write
Apr 16, 2025 * decouple from netrw by adding s:WinPath()
instead of shelling out to file(1)
instead of shelling out to file(1)
Mar 02, 2025 * determine the compression using readblob()
Mar 02, 2025 * escape the filename before using :read
Mar 01, 2025 * fix syntax error in tar#Read()

View File

@@ -1,4 +1,4 @@
*pi_vimball.txt* For Vim version 9.2. Last change: 2026 Feb 14
*pi_vimball.txt* For Vim version 9.2. Last change: 2026 Apr 16
----------------
Vimball Archiver
@@ -93,21 +93,6 @@ MAKING A VIMBALL *:MkVimball*
make.
MAKING DIRECTORIES VIA VIMBALLS *g:vimball_mkdir*
First, the |mkdir()| command is tried (not all systems support it).
If it doesn't exist, then if g:vimball_mkdir doesn't exist, it is set
as follows: >
|g:netrw_localmkdir|, if it exists
"mkdir" , if it is executable
"makedir" , if it is executable
Otherwise , it is undefined.
< One may explicitly specify the directory making command using
g:vimball_mkdir. This command is used to make directories that
are needed as indicated by the vimball.
CONTROLLING THE VIMBALL EXTRACTION DIRECTORY *g:vimball_home*
You may override the use of the 'runtimepath' by specifying a
@@ -181,6 +166,11 @@ WINDOWS *vimball-windows*
==============================================================================
4. Vimball History *vimball-history* {{{1
unreleased:
Feb 28, 2025 * add support for bzip3 (#16755)
Apr 05, 2026 * Detect path traversal attacks
Apr 09, 2026 * Detect more path traversal attacks
Apr 16, 2026 * Block Windows drive letter paths
37 : Jul 18, 2014 * (by request of T. Miedema) added augroup around
the autocmds in vimballPlugin.vim
Jul 06, 2015 * there are two uses of tabc; changed to tabc!

View File

@@ -1,4 +1,4 @@
*pi_zip.txt* For Vim version 9.2. Last change: 2026 Feb 14
*pi_zip.txt* For Vim version 9.2. Last change: 2026 Apr 05
+====================+
| Zip File Interface |
@@ -33,6 +33,10 @@ Copyright: Copyright (C) 2005-2015 Charles E Campbell *zip-copyright*
also write to the file. Currently, one may not make a new file in
zip archives via the plugin.
The zip plugin tries to detect some common path traversal attack
patterns, but it may not catch all possible cases. Please be very
careful when using this plugin with untrusted input.
COMMANDS~
*zip-x*
x : extract a listed file when the cursor is atop it

View File

@@ -1,4 +1,4 @@
*popup.txt* For Vim version 9.2. Last change: 2026 Mar 02
*popup.txt* For Vim version 9.2. Last change: 2026 Apr 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -254,7 +254,7 @@ popup_clear([{force}])
when it is the current window. If a terminal is running in a
popup it is killed.
Return type: |Number|
Return type: void
popup_close({id} [, {result}]) *popup_close()*
@@ -269,7 +269,7 @@ popup_close({id} [, {result}]) *popup_close()*
Can also be used as a |method|: >
GetPopup()->popup_close()
<
Return type: |Number|
Return type: void
popup_create({what}, {options}) *popup_create()*
@@ -351,7 +351,7 @@ popup_filter_menu({id}, {key}) *popup_filter_menu()*
To add shortcut keys, see the example here:
|popup_menu-shortcut-example|
Return type: |Number|
Return type: |vim9-boolean|
popup_filter_yesno({id}, {key}) *popup_filter_yesno()*
@@ -363,7 +363,7 @@ popup_filter_yesno({id}, {key}) *popup_filter_yesno()*
keys are ignored.
See the example here: |popup_dialog-example|
Return type: |Number|
Return type: |vim9-boolean|
popup_findecho() *popup_findecho()*
@@ -471,7 +471,7 @@ popup_hide({id}) *popup_hide()*
Can also be used as a |method|: >
GetPopup()->popup_hide()
<
Return type: |Number|
Return type: void
popup_list() *popup_list()*
@@ -542,7 +542,7 @@ popup_move({id}, {options}) *popup_move()*
Can also be used as a |method|: >
GetPopup()->popup_move(options)
<
Return type: |Number|
Return type: void
popup_notification({what}, {options}) *popup_notification()*
@@ -624,7 +624,7 @@ popup_setoptions({id}, {options}) *popup_setoptions()*
Can also be used as a |method|: >
GetPopup()->popup_setoptions(options)
<
Return type: |Number|
Return type: void
popup_settext({id}, {text}) *popup_settext()*
@@ -636,7 +636,7 @@ popup_settext({id}, {text}) *popup_settext()*
Can also be used as a |method|: >
GetPopup()->popup_settext('hello')
<
Return type: |Number|
Return type: void
popup_show({id}) *popup_show()*

View File

@@ -1,4 +1,4 @@
*quickref.txt* For Vim version 9.2. Last change: 2026 Mar 04
*quickref.txt* For Vim version 9.2. Last change: 2026 Apr 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -823,6 +823,7 @@ Short explanation of each option: *option-list*
'modeline' 'ml' recognize modelines at start or end of file
'modelineexpr' 'mle' allow setting expression options from a modeline
'modelines' 'mls' number of lines checked for modelines
'modelinestrict' 'mlst' only allow safe options in modelines
'modifiable' 'ma' changes to the text are not possible
'modified' 'mod' buffer has been modified
'more' pause listings when the whole screen is filled
@@ -865,6 +866,7 @@ Short explanation of each option: *option-list*
'printoptions' 'popt' controls the format of :hardcopy output
'prompt' 'prompt' enable prompt in Ex mode
'pumheight' 'ph' maximum height of the popup menu
'pumopt' 'pumopt' additional options for the popup menu
'pumwidth' 'pw' minimum width of the popup menu
'pythondll' name of the Python 2 dynamic library
'pythonhome' name of the Python 2 home directory
@@ -893,6 +895,7 @@ Short explanation of each option: *option-list*
'scrollfocus' 'scf' scroll wheel applies to window under pointer
'scrolljump' 'sj' minimum number of lines to scroll
'scrolloff' 'so' minimum nr. of lines above and below cursor
'scrolloffpad' 'sop' vertically center cursor at end of file
'scrollopt' 'sbo' how 'scrollbind' should behave
'sections' 'sect' nroff macros that separate sections
'secure' secure mode for reading .vimrc in current dir

View File

@@ -1,4 +1,4 @@
*starting.txt* For Vim version 9.2. Last change: 2026 Feb 25
*starting.txt* For Vim version 9.2. Last change: 2026 Mar 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -252,7 +252,8 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
":sh", filtering, the |system()| function, backtick expansion
and libcall().
Also disallowed are |delete()|, |rename()|, |mkdir()|,
|job_start()|, |setenv()| etc.
|job_start()|, |setenv()| and setting environment variables,
etc.
Interfaces, such as Python, Ruby and Lua, are also disabled,
since they could be used to execute shell commands. Perl uses
the Safe module.

View File

@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 9.2. Last change: 2026 Feb 14
*syntax.txt* For Vim version 9.2. Last change: 2026 Apr 23
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -849,6 +849,20 @@ ADA
See |ft-ada-syntax|
ALGOL 68 *algol68* *ft-algol68-syntax*
This syntax file currently targets the Algol 68 Genie project using the
default UPPER stropping regime. It should also be usuable in other
environments using the UPPER stropping regime, though somewhat less complete.
Highlighting can be further configured with the following variables.
Variable Highlight ~
*algol68_no_preludes* no prelude identifiers, procedures or
bold word operators
*algol68_symbolic_operators* all prelude symbolic operators
ANT *ant.vim* *ft-ant-syntax*
The ant syntax file provides syntax highlighting for javascript and python
@@ -2285,11 +2299,11 @@ cycles for such a feature to become either integrated into the platform or
withdrawn from this effort. To cater for early adopters, there is optional
support in Vim for syntax related preview features that are implemented. You
can request it by specifying a list of preview feature numbers as follows: >
:let g:java_syntax_previews = [507]
:let g:java_syntax_previews = [530]
The supported JEP numbers are to be drawn from this table:
`430`: String Templates [JDK 21]
`507`: Primitive types in Patterns, instanceof, and switch
`530`: Primitive types in Patterns, instanceof, and switch
Note that as soon as the particular preview feature will have been integrated
into the Java platform, its entry will be removed from the table and related
@@ -5978,7 +5992,14 @@ EndOfBuffer Filler lines (~) after the last line in the buffer.
*hl-ErrorMsg*
ErrorMsg Error messages on the command line.
*hl-VertSplit*
VertSplit Column separating vertically split windows.
VertSplit Column separating vertically split windows that are adjacent
to the current window. On the current window's status line
rows, the separator cell is drawn as a space with the
|hl-StatusLine| highlight so it blends into the status line
without a stray fillchar glyph.
*hl-VertSplitNC*
VertSplitNC Column separating vertically split windows of non-current
windows. By default, highlighted like |hl-VertSplit|.
*hl-Folded*
Folded Line used for closed folds.
*hl-FoldColumn*

View File

@@ -1,4 +1,4 @@
*tabpage.txt* For Vim version 9.2. Last change: 2026 Feb 14
*tabpage.txt* For Vim version 9.2. Last change: 2026 Apr 26
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -482,6 +482,47 @@ The vertical separator character is taken from "tpl_vert" in 'fillchars'.
You can customize the appearance of the tab page labels using the highlight
groups: |hl-TabPanel| |hl-TabPanelSel| |hl-TabPanelFill|
SCROLLING IN THE TABPANEL: *tabpanel-scroll*
When the total height of the tab page list exceeds the visible screen height,
the tabpanel by default displays the "page" that contains the current tab page
and offers no way to view tab pages outside that page.
To make the tabpanel scrollable, add "scroll" to 'tabpanelopt': >
:set tabpanelopt+=scroll
With "scroll" enabled, mouse wheel events over the tabpanel area scroll the
tab page list up or down. The scroll step follows the 'mousescroll' setting.
Wheel events inside the tabpanel area are consumed by the tabpanel and do not
trigger |<ScrollWheelUp>| or |<ScrollWheelDown>| mappings.
To additionally show a vertical scrollbar indicating the current scroll
position, use "scrollbar": >
:set tabpanelopt+=scrollbar
The "scrollbar" value implies "scroll". A one-column scrollbar is reserved at
the edge of the tabpanel; clicking on the scrollbar column moves the thumb to
the click position, and the thumb can be dragged to scroll continuously.
When "vert" is combined with "scrollbar", the scrollbar is drawn next to the
vertical separator, on the panel side.
The scrollbar uses the |hl-PmenuSbar| highlight group for the track and
|hl-PmenuThumb| for the thumb.
The scroll offset is remembered across redraws but is reset when "scroll" or
"scrollbar" is toggled off and back on.
MOUSE CLICKS IN THE TABPANEL: *tabpanel-mouse*
A left click on a row in the tabpanel selects the tab page that the row
belongs to. Unlike the tabline, a double click in the tabpanel does not
open a new, empty tab page; it is treated the same as a single click.
For finer-grained control, the 'tabpanel' value may contain |stl-%[FuncName]|
click regions. Clicks on those regions are dispatched to the callback
function instead of falling through to tab selection.
==============================================================================
6. Setting 'guitablabel' *setting-guitablabel*

View File

@@ -531,6 +531,7 @@ $quote eval.txt /*$quote*
'ml' options.txt /*'ml'*
'mle' options.txt /*'mle'*
'mls' options.txt /*'mls'*
'mlst' options.txt /*'mlst'*
'mm' options.txt /*'mm'*
'mmd' options.txt /*'mmd'*
'mmp' options.txt /*'mmp'*
@@ -539,6 +540,7 @@ $quote eval.txt /*$quote*
'modeline' options.txt /*'modeline'*
'modelineexpr' options.txt /*'modelineexpr'*
'modelines' options.txt /*'modelines'*
'modelinestrict' options.txt /*'modelinestrict'*
'modifiable' options.txt /*'modifiable'*
'modified' options.txt /*'modified'*
'mopt' options.txt /*'mopt'*
@@ -706,9 +708,11 @@ $quote eval.txt /*$quote*
'nomh' options.txt /*'nomh'*
'noml' options.txt /*'noml'*
'nomle' options.txt /*'nomle'*
'nomlst' options.txt /*'nomlst'*
'nomod' options.txt /*'nomod'*
'nomodeline' options.txt /*'nomodeline'*
'nomodelineexpr' options.txt /*'nomodelineexpr'*
'nomodelinestrict' options.txt /*'nomodelinestrict'*
'nomodifiable' options.txt /*'nomodifiable'*
'nomodified' options.txt /*'nomodified'*
'nomore' options.txt /*'nomore'*
@@ -891,6 +895,7 @@ $quote eval.txt /*$quote*
'pumborder' options.txt /*'pumborder'*
'pumheight' options.txt /*'pumheight'*
'pummaxwidth' options.txt /*'pummaxwidth'*
'pumopt' options.txt /*'pumopt'*
'pumwidth' options.txt /*'pumwidth'*
'pvh' options.txt /*'pvh'*
'pvp' options.txt /*'pvp'*
@@ -948,6 +953,7 @@ $quote eval.txt /*$quote*
'scrollfocus' options.txt /*'scrollfocus'*
'scrolljump' options.txt /*'scrolljump'*
'scrolloff' options.txt /*'scrolloff'*
'scrolloffpad' options.txt /*'scrolloffpad'*
'scrollopt' options.txt /*'scrollopt'*
'scs' options.txt /*'scs'*
'sect' options.txt /*'sect'*
@@ -1006,6 +1012,7 @@ $quote eval.txt /*$quote*
'so' options.txt /*'so'*
'softtabstop' options.txt /*'softtabstop'*
'sol' options.txt /*'sol'*
'sop' options.txt /*'sop'*
'sourceany' vi_diff.txt /*'sourceany'*
'sp' options.txt /*'sp'*
'spc' options.txt /*'spc'*
@@ -1237,6 +1244,7 @@ $quote eval.txt /*$quote*
'termbidi' options.txt /*'termbidi'*
'termencoding' options.txt /*'termencoding'*
'termguicolors' options.txt /*'termguicolors'*
'termresize' options.txt /*'termresize'*
'termsync' options.txt /*'termsync'*
'termwinkey' options.txt /*'termwinkey'*
'termwinscroll' options.txt /*'termwinscroll'*
@@ -1269,6 +1277,7 @@ $quote eval.txt /*$quote*
'tplo' options.txt /*'tplo'*
'tpm' options.txt /*'tpm'*
'tr' options.txt /*'tr'*
'trz' options.txt /*'trz'*
'ts' options.txt /*'ts'*
'tsl' options.txt /*'tsl'*
'tsr' options.txt /*'tsr'*
@@ -1553,7 +1562,6 @@ $quote eval.txt /*$quote*
+vtp various.txt /*+vtp*
+wayland various.txt /*+wayland*
+wayland_clipboard various.txt /*+wayland_clipboard*
+wayland_focus_steal various.txt /*+wayland_focus_steal*
+wildignore various.txt /*+wildignore*
+wildmenu various.txt /*+wildmenu*
+windows various.txt /*+windows*
@@ -4571,7 +4579,6 @@ E1335 vim9class.txt /*E1335*
E1336 options.txt /*E1336*
E1337 vim9class.txt /*E1337*
E1338 vim9class.txt /*E1338*
E1339 textprop.txt /*E1339*
E134 change.txt /*E134*
E1340 vim9class.txt /*E1340*
E1341 vim9class.txt /*E1341*
@@ -4768,6 +4775,9 @@ E157 sign.txt /*E157*
E1570 builtin.txt /*E1570*
E1571 builtin.txt /*E1571*
E1572 options.txt /*E1572*
E1573 channel.txt /*E1573*
E1574 channel.txt /*E1574*
E1575 builtin.txt /*E1575*
E158 sign.txt /*E158*
E159 sign.txt /*E159*
E16 cmdline.txt /*E16*
@@ -5294,6 +5304,7 @@ E645 netbeans.txt /*E645*
E646 netbeans.txt /*E646*
E647 netbeans.txt /*E647*
E648 netbeans.txt /*E648*
E649 netbeans.txt /*E649*
E65 pattern.txt /*E65*
E650 netbeans.txt /*E650*
E651 netbeans.txt /*E651*
@@ -6222,11 +6233,15 @@ added-win32-GUI version5.txt /*added-win32-GUI*
aff-dic-format spell.txt /*aff-dic-format*
after-directory options.txt /*after-directory*
aleph options.txt /*aleph*
algol68 syntax.txt /*algol68*
algol68_no_preludes syntax.txt /*algol68_no_preludes*
algol68_symbolic_operators syntax.txt /*algol68_symbolic_operators*
alt intro.txt /*alt*
alt-input debugger.txt /*alt-input*
alternate-file editing.txt /*alternate-file*
amiga-window starting.txt /*amiga-window*
and() builtin.txt /*and()*
android builtin.txt /*android*
anonymous-function eval.txt /*anonymous-function*
ant.vim syntax.txt /*ant.vim*
ap motion.txt /*ap*
@@ -6337,6 +6352,7 @@ b:rust_cargo_check_benches ft_rust.txt /*b:rust_cargo_check_benches*
b:rust_cargo_check_examples ft_rust.txt /*b:rust_cargo_check_examples*
b:rust_cargo_check_tests ft_rust.txt /*b:rust_cargo_check_tests*
b:rustfmt_autosave ft_rust.txt /*b:rustfmt_autosave*
b:rustfmt_autosave_if_config_present ft_rust.txt /*b:rustfmt_autosave_if_config_present*
b:tex_stylish syntax.txt /*b:tex_stylish*
b:var eval.txt /*b:var*
b:yaml_schema syntax.txt /*b:yaml_schema*
@@ -6582,6 +6598,7 @@ ch_evalraw() channel.txt /*ch_evalraw()*
ch_getbufnr() channel.txt /*ch_getbufnr()*
ch_getjob() channel.txt /*ch_getjob()*
ch_info() channel.txt /*ch_info()*
ch_listen() channel.txt /*ch_listen()*
ch_log() channel.txt /*ch_log()*
ch_logfile() channel.txt /*ch_logfile()*
ch_open() channel.txt /*ch_open()*
@@ -6632,6 +6649,7 @@ channel-demo channel.txt /*channel-demo*
channel-drop channel.txt /*channel-drop*
channel-functions usr_41.txt /*channel-functions*
channel-functions-details channel.txt /*channel-functions-details*
channel-listen-demo channel.txt /*channel-listen-demo*
channel-mode channel.txt /*channel-mode*
channel-more channel.txt /*channel-more*
channel-noblock channel.txt /*channel-noblock*
@@ -7504,6 +7522,7 @@ ft-ada-options ft_ada.txt /*ft-ada-options*
ft-ada-plugin ft_ada.txt /*ft-ada-plugin*
ft-ada-syntax ft_ada.txt /*ft-ada-syntax*
ft-ada-variables ft_ada.txt /*ft-ada-variables*
ft-algol68-syntax syntax.txt /*ft-algol68-syntax*
ft-ant-syntax syntax.txt /*ft-ant-syntax*
ft-apache-syntax syntax.txt /*ft-apache-syntax*
ft-arduino-plugin filetype.txt /*ft-arduino-plugin*
@@ -7955,7 +7974,6 @@ g:netrw_ssh_browse_reject pi_netrw.txt /*g:netrw_ssh_browse_reject*
g:netrw_ssh_cmd pi_netrw.txt /*g:netrw_ssh_cmd*
g:netrw_sshport pi_netrw.txt /*g:netrw_sshport*
g:netrw_timefmt pi_netrw.txt /*g:netrw_timefmt*
g:netrw_tmpfile_escape pi_netrw.txt /*g:netrw_tmpfile_escape*
g:netrw_uid pi_netrw.txt /*g:netrw_uid*
g:netrw_use_noswf pi_netrw.txt /*g:netrw_use_noswf*
g:netrw_use_nt_rcp pi_netrw.txt /*g:netrw_use_nt_rcp*
@@ -8030,7 +8048,6 @@ g:vim_indent_cont indent.txt /*g:vim_indent_cont*
g:vim_json_conceal syntax.txt /*g:vim_json_conceal*
g:vim_json_warnings syntax.txt /*g:vim_json_warnings*
g:vimball_home pi_vimball.txt /*g:vimball_home*
g:vimball_mkdir pi_vimball.txt /*g:vimball_mkdir*
g:vimsyn_comment_strings syntax.txt /*g:vimsyn_comment_strings*
g:vimsyn_embed syntax.txt /*g:vimsyn_embed*
g:vimsyn_folding syntax.txt /*g:vimsyn_folding*
@@ -8478,6 +8495,7 @@ hl-User1 syntax.txt /*hl-User1*
hl-User1..9 syntax.txt /*hl-User1..9*
hl-User9 syntax.txt /*hl-User9*
hl-VertSplit syntax.txt /*hl-VertSplit*
hl-VertSplitNC syntax.txt /*hl-VertSplitNC*
hl-Visual syntax.txt /*hl-Visual*
hl-VisualNOS syntax.txt /*hl-VisualNOS*
hl-WarningMsg syntax.txt /*hl-WarningMsg*
@@ -10538,6 +10556,7 @@ status-line windows.txt /*status-line*
statusmsg-variable eval.txt /*statusmsg-variable*
stl-%! options.txt /*stl-%!*
stl-%@ options.txt /*stl-%@*
stl-%[FuncName] options.txt /*stl-%[FuncName]*
stl-%{ options.txt /*stl-%{*
str2blob() builtin.txt /*str2blob()*
str2float() builtin.txt /*str2float()*
@@ -10874,6 +10893,8 @@ tabpagebuflist() builtin.txt /*tabpagebuflist()*
tabpagenr() builtin.txt /*tabpagenr()*
tabpagewinnr() builtin.txt /*tabpagewinnr()*
tabpanel tabpage.txt /*tabpanel*
tabpanel-mouse tabpage.txt /*tabpanel-mouse*
tabpanel-scroll tabpage.txt /*tabpanel-scroll*
tag tagsrch.txt /*tag*
tag-! tagsrch.txt /*tag-!*
tag-binary-search tagsrch.txt /*tag-binary-search*
@@ -11077,6 +11098,7 @@ termresponse-variable eval.txt /*termresponse-variable*
termrfgresp-variable eval.txt /*termrfgresp-variable*
termstyleresp-variable eval.txt /*termstyleresp-variable*
termu7resp-variable eval.txt /*termu7resp-variable*
termux builtin.txt /*termux*
ternary eval.txt /*ternary*
test-functions usr_41.txt /*test-functions*
test-functions-details testing.txt /*test-functions-details*
@@ -11787,8 +11809,6 @@ waittime channel.txt /*waittime*
warningmsg-variable eval.txt /*warningmsg-variable*
wayland wayland.txt /*wayland*
wayland-and-x11 wayland.txt /*wayland-and-x11*
wayland-focus-steal wayland.txt /*wayland-focus-steal*
wayland-gnome wayland.txt /*wayland-gnome*
wayland-gui wayland.txt /*wayland-gui*
wayland-persist wayland.txt /*wayland-persist*
wayland-primary-selection wayland.txt /*wayland-primary-selection*

View File

@@ -1,4 +1,4 @@
*terminal.txt* For Vim version 9.2. Last change: 2026 Feb 24
*terminal.txt* For Vim version 9.2. Last change: 2026 Apr 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -596,7 +596,7 @@ term_dumpwrite({buf}, {filename} [, {options}]) *term_dumpwrite()*
name: >
GetFilename()->term_dumpwrite(bufnr)
<
Return type: |Number|
Return type: void
term_getaltscreen({buf}) *term_getaltscreen()*
@@ -817,7 +817,7 @@ term_sendkeys({buf}, {keys}) *term_sendkeys()*
Can also be used as a |method|: >
GetBufnr()->term_sendkeys(keys)
<
Return type: |Number|
Return type: void
term_setansicolors({buf}, {colors}) *term_setansicolors()*
@@ -852,7 +852,7 @@ term_setansicolors({buf}, {colors}) *term_setansicolors()*
Can also be used as a |method|: >
GetBufnr()->term_setansicolors(colors)
<
Return type: |Number|
Return type: void
{only available with GUI enabled and/or the |+termguicolors|
feature}
@@ -870,7 +870,7 @@ term_setapi({buf}, {expr}) *term_setapi()*
When used as a method the base is used for {buf}: >
GetBufnr()->term_setapi({expr})
<
Return type: |Number|
Return type: void
term_setkill({buf}, {how}) *term_setkill()*
@@ -888,7 +888,7 @@ term_setkill({buf}, {how}) *term_setkill()*
Can also be used as a |method|: >
GetBufnr()->term_setkill(how)
<
Return type: |Number|
Return type: void
term_setrestore({buf}, {command}) *term_setrestore()*
@@ -903,7 +903,7 @@ term_setrestore({buf}, {command}) *term_setrestore()*
Can also be used as a |method|: >
GetBufnr()->term_setrestore(command)
<
Return type: |Number|
Return type: void
term_setsize({buf}, {rows}, {cols}) *term_setsize()* *E955*
@@ -919,7 +919,7 @@ term_setsize({buf}, {rows}, {cols}) *term_setsize()* *E955*
Can also be used as a |method|: >
GetBufnr()->term_setsize(rows, cols)
<
Return type: |Number|
Return type: void
term_start({cmd} [, {options}]) *term_start()*
@@ -944,9 +944,26 @@ term_start({cmd} [, {options}]) *term_start()*
"in_io", "in_top", "in_bot", "in_name", "in_buf"
"out_io", "out_name", "out_buf", "out_modifiable", "out_msg"
"err_io", "err_name", "err_buf", "err_modifiable", "err_msg"
However, at least one of stdin, stdout or stderr must be
connected to the terminal. When I/O is connected to the
terminal then the callback function for that part is not used.
On Unix:
stdin, stdout, and stderr are connected to a pty by default,
since bidirectional communication with the terminal is
required. Setting "out_cb" does not switch stdout from the
pty to a pipe. Only setting "err_cb" switches stderr to a
pipe.
Note: Since a pty is line-buffered and a pipe is
block-buffered, the order of output between stdout and stderr
may not be preserved. Without "err_cb", stderr uses the same
pty as stdout, so the output order is preserved but stdout and
stderr cannot be distinguished.
On MS-Windows with |ConPTY|:
stdin, stdout, and stderr are always connected through pipes
to the pseudo console, regardless of callback settings.
Since stdout and stderr share the same pipe, they cannot be
separated by "err_cb".
This is because the CreatePseudoConsole() API only accepts one
input and one output handle, with no separate handle for
stderr.
There are extra options:
"term_name" name to use for the buffer name, instead
@@ -1010,7 +1027,7 @@ term_wait({buf} [, {time}]) *term_wait()*
Can also be used as a |method|: >
GetBufnr()->term_wait()
<
Return type: |Number|
Return type: void
==============================================================================
3. Terminal communication *terminal-communication*
@@ -1427,11 +1444,25 @@ gdb:
`:Arguments` {args} set arguments for the next `:Run`
*:Break* set a breakpoint at the cursor position
:Break {position}
:Break [{position}] [thread {nr}] [if {expr}]
set a breakpoint at the specified position
if {position} is omitted, use the current file and line
thread {nr} limits the breakpoint to one thread
if {expr} sets a conditional breakpoint
Examples: >
:Break if argc == 1
:Break 42 thread 3 if x > 10
:Break main
<
*:Tbreak* set a temporary breakpoint at the cursor position
:Tbreak {position}
set a temporary breakpoint at the specified position
:Tbreak [{position}] [thread {nr}] [if {expr}]
like `:Break`, but the breakpoint is deleted after
it is hit once
Examples: >
:Tbreak if argc == 1
:Tbreak 42 thread 3 if x > 10
:Tbreak main
<
*:Clear* delete the breakpoint at the cursor position
*:ToggleBreak* set a breakpoint at the cursor position or delete all
breakpoints at the cursor position

View File

@@ -1,4 +1,4 @@
*testing.txt* For Vim version 9.2. Last change: 2026 Feb 14
*testing.txt* For Vim version 9.2. Last change: 2026 Apr 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -46,14 +46,14 @@ test_alloc_fail({id}, {countdown}, {repeat}) *test_alloc_fail()*
Can also be used as a |method|: >
GetAllocId()->test_alloc_fail()
<
Return type: |Number|
Return type: void
test_autochdir() *test_autochdir()*
Set a flag to enable the effect of 'autochdir' before Vim
startup has finished.
Return type: |Number|
Return type: void
test_feedinput({string}) *test_feedinput()*
@@ -64,7 +64,7 @@ test_feedinput({string}) *test_feedinput()*
Can also be used as a |method|: >
GetText()->test_feedinput()
<
Return type: |Number|
Return type: void
test_garbagecollect_now() *test_garbagecollect_now()*
@@ -75,13 +75,13 @@ test_garbagecollect_now() *test_garbagecollect_now()*
This will not work when called from a :def function, because
variables on the stack will be freed.
Return type: |Number|
Return type: void
test_garbagecollect_soon() *test_garbagecollect_soon()*
Set the flag to call the garbagecollector as if in the main
loop. Only to be used in tests.
Return type: |Number|
Return type: void
test_getvalue({name}) *test_getvalue()*
Get the value of an internal variable. These values for
@@ -237,7 +237,7 @@ test_ignore_error({expr}) *test_ignore_error()*
Can also be used as a |method|: >
GetErrorText()->test_ignore_error()
<
Return type: |Number|
Return type: void
test_mswin_event({event}, {args}) *test_mswin_event()*
Generate a low-level MS-Windows {event} with arguments {args}
@@ -381,7 +381,7 @@ test_option_not_set({name}) *test_option_not_set()*
Can also be used as a |method|: >
GetOptionName()->test_option_not_set()
<
Return type: |Number|
Return type: void
test_override({name}, {val}) *test_override()*
Overrides certain parts of Vim's internal processing to be
@@ -438,7 +438,7 @@ test_override({name}, {val}) *test_override()*
< Can also be used as a |method|: >
GetOverrideVal()-> test_override('starting')
<
Return type: |Number|
Return type: void
test_refcount({expr}) *test_refcount()*
Return the reference count of {expr}. When {expr} is of a
@@ -457,7 +457,7 @@ test_setmouse({row}, {col}) *test_setmouse()*
call test_setmouse(4, 20)
call feedkeys("\<LeftMouse>", "xt")
<
Return type: |Number|
Return type: void
test_settime({expr}) *test_settime()*
@@ -472,13 +472,13 @@ test_settime({expr}) *test_settime()*
Can also be used as a |method|: >
GetTime()->test_settime()
<
Return type: |Number|
Return type: void
test_srand_seed([{seed}]) *test_srand_seed()*
When {seed} is given this sets the seed value used by
`srand()`. When omitted the test seed is removed.
Return type: |Number|
Return type: void
test_unknown() *test_unknown()*
Return a value with unknown type. Only useful for testing.

View File

@@ -1,4 +1,4 @@
*textprop.txt* For Vim version 9.2. Last change: 2026 Feb 14
*textprop.txt* For Vim version 9.2. Last change: 2026 Apr 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -141,9 +141,9 @@ prop_add({lnum}, {col}, {props})
the current buffer is used
id user defined ID for the property; must be a
number, should be positive |E1510|;
when using "text" then "id" must not be
present and will be set automatically to a
negative number; otherwise zero is used
when using "text" then any "id" value is
ignored and a negative number is assigned
automatically; otherwise zero is used
*E1305*
text text to be displayed before {col}, or
above/below the line if {col} is zero; prepend
@@ -224,14 +224,9 @@ prop_add({lnum}, {col}, {props})
is difficult to compute).
A negative "id" will be chosen and is returned.
Before text properties with text were supported it was
possible to use a negative "id", even though this was very
rare. Now that negative "id"s are reserved for text
properties with text an error is given when using a negative
"id". When a text property with text already exists using a
negative "id" results in *E1293* . If a negative "id" was
used and later a text property with text is added results in
*E1339* .
Negative "id"s are reserved for text properties with "text"
and cannot be used otherwise. Using a negative "id" results
in *E1293* .
Can also be used as a |method|: >
GetLnum()->prop_add(col, props)
@@ -275,6 +270,8 @@ prop_add_list({props}, [{item}, ...]) *prop_add_list()*
<
Can also be used as a |method|: >
GetProp()->prop_add_list([[1, 1, 1, 2], [1, 4, 1, 8]])
<
Return type: void
prop_clear({lnum} [, {lnum-end} [, {props}]]) *prop_clear()*
@@ -288,7 +285,7 @@ prop_clear({lnum} [, {lnum-end} [, {props}]]) *prop_clear()*
Can also be used as a |method|: >
GetLnum()->prop_clear()
<
Return type: |Number|
Return type: void
prop_find({props} [, {direction}]) *prop_find()*
@@ -449,7 +446,7 @@ prop_type_add({name}, {props}) *prop_type_add()* *E969* *E970*
Can also be used as a |method|: >
GetPropName()->prop_type_add(props)
<
Return type: |Number|
Return type: void
prop_type_change({name}, {props}) *prop_type_change()*
@@ -460,7 +457,7 @@ prop_type_change({name}, {props}) *prop_type_change()*
Can also be used as a |method|: >
GetPropName()->prop_type_change(props)
<
Return type: |Number|
Return type: void
prop_type_delete({name} [, {props}]) *prop_type_delete()*
@@ -477,7 +474,7 @@ prop_type_delete({name} [, {props}]) *prop_type_delete()*
Can also be used as a |method|: >
GetPropName()->prop_type_delete()
<
Return type: |Number|
Return type: void
prop_type_get({name} [, {props}]) *prop_type_get()*
@@ -514,7 +511,9 @@ will move accordingly.
When text is deleted and a text property no longer includes any text, it is
deleted. However, a text property that was defined as zero-width will remain,
unless the whole line is deleted.
unless the whole line is deleted. When lines are joined by a multi-line
substitute command, virtual text properties on the deleted lines are moved to
the resulting joined line.
*E275*
When a buffer is unloaded, all the text properties are gone. There is no way
to store the properties in a file. You can only re-create them. When a

View File

@@ -1287,23 +1287,24 @@ Testing: *test-functions*
Inter-process communication: *channel-functions*
ch_canread() check if there is something to read
ch_open() open a channel
ch_close() close a channel
ch_close_in() close the in part of a channel
ch_evalexpr() evaluate an expression over channel
ch_evalraw() evaluate a raw string over channel
ch_getbufnr() get the buffer number for a channel
ch_getjob() get the Job of a channel
ch_info() get information about a channel
ch_listen() listen on a channel
ch_log() write a message in the channel log
ch_logfile() start logging channel activity
ch_open() open a channel
ch_read() read a message from a channel
ch_readblob() read a Blob from a channel
ch_readraw() read a raw message from a channel
ch_sendexpr() send a JSON message over a channel
ch_sendraw() send a raw message over a channel
ch_evalexpr() evaluate an expression over channel
ch_evalraw() evaluate a raw string over channel
ch_setoptions() set channel options
ch_status() get status of a channel
ch_getbufnr() get the buffer number of a channel
ch_getjob() get the job associated with a channel
ch_info() get channel information
ch_log() write a message in the channel log file
ch_logfile() set the channel log file
ch_setoptions() set the options for a channel
json_encode() encode an expression to a JSON string
json_decode() decode a JSON string to Vim types
js_encode() encode an expression to a JSON string

View File

@@ -1,4 +1,4 @@
*various.txt* For Vim version 9.2. Last change: 2026 Feb 14
*various.txt* For Vim version 9.2. Last change: 2026 Apr 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -60,10 +60,9 @@ ga Print the ascii value of the character under the
but printable according to the 'isprint' option, the
non-printable version is also given.
When the character is larger than 127, the <M-x> form
is also printed. For example:
<~A> <M-^A> 129, Hex 81, Octal 201 ~
<p> <|~> <M-~> 254, Hex fe, Octal 376 ~
When the character is larger than 127:
<<81>> 129, Hex 0081, Octal 201 ~
<p> 254, Hex 00fe, Octal 376 ~
(where <p> is a special character)
The <Nul> character in a file is stored internally as
@@ -185,6 +184,9 @@ g8 Print the hex values of the bytes used in the
If the mark is "=", a line of dashes is printed
around the current line.
If the 'number' option is set, absolute line numbers
will be included in the output.
*:z!*
:[range]z![+-^.=][count]
Like ":z", but when [count] is not specified, it
@@ -529,9 +531,6 @@ T *+vreplace* |gR| and |gr|
*+vtp* on MS-Windows console: support for 'termguicolors'
N *+wayland* Unix only: support for the Wayland protocol.
N *+wayland_clipboard* Unix only: support for Wayland selections/clipboard.
N *+wayland_focus_steal*
Unix only: support for Wayland clipboard on
compositors without a data control protocol
T *+wildignore* 'wildignore' Always enabled since 9.0.0278
T *+wildmenu* 'wildmenu' Always enabled since 9.0.0279
T *+windows* more than one window; Always enabled since 8.0.1118.

View File

@@ -1,4 +1,4 @@
*version9.txt* For Vim version 9.2. Last change: 2026 Mar 08
*version9.txt* For Vim version 9.2. Last change: 2026 Apr 26
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -41954,7 +41954,7 @@ Vim Arguments: ~
Configure Switches: ~
--with-wayland Enable the |wayland| feature.
--enable-wayland-focus-steal Enable the |wayland-focus-steal| feature.
--enable-wayland-focus-steal Enable the wayland-focus-steal feature.
--enable-socketserver Enable the |socketserver-clientserver|
feature.
@@ -52588,6 +52588,20 @@ Popups ~
- 'previewpopup' supports the same values as 'completepopup' (except for
"align").
Diff mode ~
---------
When using inline word diffs, adjacent changes are now merged if the gap
between them is small (5 bytes or less) and contains only non-word characters.
This prevents fragmented highlighting when only whitespace or punctuation
separates changes.
Restricted mode ~
---------------
Using external diff mode or setting environment variables is no longer allowed
when Vim is running in |restricted-mode|.
Using |:cscope| is no longer allowed.
Other ~
-----
- The new |xdg.vim| script for full XDG compatibility is included.
@@ -52595,30 +52609,70 @@ Other ~
- Support for "dap" channel mode for the |debug-adapter-protocol|.
- |status-line| can use several lines, see 'statuslineopt'.
- New "leadtab" value for the 'listchars' setting.
- Improved |:set+=|, |:set^=| and |:set-=| handling of comma-separated "key:value"
pairs individually (e.g. 'listchars', 'fillchars', 'diffopt').
- |system()| and |systemlist()| functions accept a list as first argument,
bypassing the shell completely.
- Allow mouse clickable regions in the 'statusline', 'tabline' and the
'tabpanel' using the |stl-%[FuncName]| atom.
- Enable reflow support in the |:terminal|.
- Added "scroll" and "scrollbar" sub-options to 'tabpanelopt' so the tabpanel
can scroll when the tab page list exceeds the visible screen height.
Platform specific ~
-----------------
- support OpenType font features in 'guifont' for DirectWrite (Win32)
- Include strptime() fallback for MS-Windows
xxd ~
---
Add "-t" option to append a terminating NUL byte to C include output (-i).
*changed-9.3*
Changed~
Changed ~
-------
- Support for NeXTStep was dropped with patch v9.2.0122
- |json_decode()| is stricter: keywords must be lowercase, lone surrogates are
now invalid
- |js_decode()| rejects lone surrogates
- virtual text properties on lines deleted by a multi-line substitute
are moved to the resulting joined line instead of being dropped.
- Only a few whitelisted options are allowed to be set by a modeline to
improve overall security, see for details: 'modelinestrict'
- Removed the Wayland focus steal feature 'wlsteal', since it causes too many
issues and can now be re-implemted using the |clipboard-providers| feature
if needed, see |wayland-primary-selection| for an example.
*added-9.3*
Added ~
-----
Various syntax, indent and other plugins were added.
Functions: ~
|ch_listen()| listen on {address}
Autocommands: ~
|SessionLoadPre| before loading a |Session| file
Options: ~
'statuslineopt' Extra options for the 'statusline', e.g. use the
"maxheight" suboption to use several lines.
'modelinestrict' Only allow safe options to be set from a modeline.
'pumopt' Additional options for the popup menu.
'scrolloffpad' Vertically center cursor at end of file.
'statuslineopt' Extra window-local options for the 'statusline', to
configure the height.
't_BS' Begin synchronized update.
't_ES' End synchronized update.
'termresize' Method for handling terminal resize events.
'termsync' Enable support for terminal DEC 2026 sync mode.
'winhighlight' Window-local highlight group mappings.
Highlighting: ~
|hl-VertSplitNC| Column separator of non-current window.
==============================================================================
PATCHES *patches-9.3* *bug-fixes-9.3*
*patches-after-9.2*

View File

@@ -1,4 +1,4 @@
*wayland.txt* For Vim version 9.2. Last change: 2026 Feb 14
*wayland.txt* For Vim version 9.2. Last change: 2026 Apr 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -54,15 +54,12 @@ try connecting again.
2. Wayland Selections *wayland-selections*
Vim supports the wlr-data-control-unstable-v1 and ext-data-control-v1
protocols, for accessing the current Wayland selection. These are the best
case scenario protocols, see |wayland-focus-steal|. Selection in this case
protocols, for accessing the current Wayland selection. Selection in this case
essentially means the "clipboard." You can check if your Wayland compositor
supports either of these protocols by running the wayland-info command, which
should be bundled with libwayland on your system: >
wayland-info | grep -E '(ext_data_control|zwlr_data_control)'
<If grep finds a match, then you have either or both protocols on your system.
If you don't get any match, then please see |wayland-focus-steal| for more
information.
Some compositors that are known to support either or both protocols:
1. KWin (KDE)
@@ -90,39 +87,65 @@ Vim determines which one to use when accessing the clipboard using the
*wayland-primary-selection*
If you find X11 style primary selections useful, Wayland also implements this
behaviour in its own protocols:
feature using the protocols that Vim supports. This is unless you are using
version 1 (not the same as the 'v1' in the protocol name), of the
wlr-data-control protocol, then primary selection will not be supported. You
can check this using >
wayland-info | grep -E '(ext_data_control|zwlr_data_control)'
If the "version:" entry for "zwlr_data_control_manager_v1" is "2" or greater,
then primary selection is supported. If you also get
"ext_data_control_manager_v1", then Vim will use that protocol instead, which
has primary selection support builtin into it.
- The primary selection protocol is the most widely supported, but requires
focus in order to be used, see |wayland-focus-steal|.
If your Wayland compositor does not support the wlr-data-control-v1 or the
ext-data-control-v1 protocol, Vim cannot access the clipboard directly through
the Wayland protocol. External tools such as wl-clipboard can be used instead
via a user-defined |clipboard-providers|.
- Data control protocol available on your system, such as the ext or wlr
protocols, then primary selection is also supported. This is unless you are
using version 1 (not the same as the 'v1' in the protocol name), of the
wlr-data-control protocol. Then the primary selection protocol will be used
as a fallback.
Example: define a provider that shells out to `wl-copy` and `wl-paste`: >vim9
*wayland-focus-steal* *wayland-gnome*
If you are using the GNOME desktop environment on Wayland, as of this writing,
there is no method of accessing/modifying the clipboard for external clients
such as Vim without being focused. Focused in this case means the client has
received some sort of input event, such as a window being focused. This is
what the wlr-data-control-unstable-v1 and ext-data-control-v1 protocols solve.
If your Wayland compositor does not support the above protocols, then the
above explanation applies.
vim9script
To solve this problem, Vim implements a way of gaining focus in order to
access the clipboard, by creating a temporary transparent top-level surface.
This is by default disabled and can be enabled via the 'wlsteal' option.
Moreover, a seat that has a keyboard is also required, see 'wlseat', and the
xdg-shell protocol must be available. Additionally, Vim must be compiled with
the |+wayland_focus_steal| feature.
def Available(): bool
return executable('wl-copy') && executable('wl-paste')
enddef
Note that this method can have several side effects from the result of focus
stealing. For example, if you have a taskbar that shows currently opened apps
in your desktop environment, then when Vim attempts to steal focus, it may
"flicker," as if a window was opened then immediately closed after.
Additionally, if you are in fullscreen mode, this focus stealing won't work,
because the created surface won't ever gain focus. If this happens, Vim will
seem to freeze temporarily, see 'wltimeoutlen' for more information.
def Copy(reg: string, type: string, str: list<string>)
var args = "wl-copy"
if reg == "*"
args ..= " -p"
endif
system(args, str)
enddef
def Paste(reg: string): tuple<string, list<string>>
var args = "wl-paste --type text/plain;charset=utf-8"
if reg == "*"
args ..= " -p"
endif
return ("", systemlist(args))
enddef
v:clipproviders["wl_clipboard"] = {
available: Available,
copy: {
"+": Copy,
"*": Copy
},
paste: {
"+": Paste,
"*": Paste
}
}
set clipmethod=wl_clipboard
This relies on the wl-clipboard package being installed
(https://github.com/bugaevc/wl-clipboard).
vim:tw=78:ts=8:noet:ft=help:norl

View File

@@ -122,10 +122,9 @@ when the last window also has a status line:
'laststatus' = 1 status line if there is more than one window
'laststatus' = 2 always a status line
You can change the contents of the status line with the 'statusline' option.
This option can be local to the window, so that you can have a different
status line in each window.
You can change the height of the status line with the 'statuslineopt' option.
You can change the contents and height of the status line with the
'statusline' and 'statuslineopt' options. Both can be local to the window,
allowing each window to have a unique status line appearance and height.
Normally, inversion is used to display the status line. This can be changed
with the 's' character in the 'highlight' option. For example, "sb" sets it

View File

@@ -1,9 +1,9 @@
.TH XXD 1 "Maggio 2024" "Pagina di manuale per xxd"
.TH XXD 1 "Mar 2026" "Pagina di manuale per xxd"
.\"
.\" 21 Maggio 1996
.\" Autore della pagina di manuale:
.\" 21st May 1996
.\" Man page author:
.\" Tony Nugent <tony@sctnugen.ppp.gu.edu.au> <T.Nugent@sct.gu.edu.au>
.\" Modificato da Bram Moolenaar <Bram@vim.org>
.\" Changes by Bram Moolenaar <Bram@vim.org>
.SH NOME
.I xxd
\- Produce lista esadecimale da un file binario o viceversa.
@@ -170,11 +170,14 @@ byte assoluti (o relativi) di distanza all'interno di input_file.
(o se in combinazione con \fI+ \fR: prima della posizione corrente nel file `standard input').
Se non si specifica l'opzione \-s, xxd inizia dalla posizione corrente all'interno del file.
.TP
.I \-t
Quando l'output è nello stile delle `include' di C (opzione \-i ) aggiungere uno zero binario a fine stringa.
.TP
.I \-u
Usa lettere esadecimali maiuscole. Per default si usano lettere minuscole.
Usare lettere esadecimali maiuscole. Per default si usano lettere minuscole.
.TP
.IR \-v " | " \-version
Visualizza la stringa contenente la versione del programma.
Visualizzare la stringa contenente la versione del programma.
.SH ATTENZIONE
.PP
.I xxd \-r
@@ -182,7 +185,8 @@ Visualizza la stringa contenente la versione del programma.
Se è possibili posizionarsi tramite `seek' sul file di output, il numero di riga
di ogni riga esadecimale può essere non ordinato, delle righe possono mancare, o
sovrapporsi. In tal caso xxd userà lseek(2) per posizionarsi all'interno del file.
Se per il file di output non si può usare `seek', sono permessi solo dei "buchi", che saranno riempiti con zeri binari.
Se per il file di output non si può usare `seek', sono permessi solo dei "buchi",
che saranno riempiti con zeri binari.
.PP
.I xxd \-r
non genera mai errori per parametri errati. I parametri extra sono silenziosamente ignorati.
@@ -246,25 +250,25 @@ Stampa 3 righe (0x30 byte in esadecimale) alla fine di
\fI% xxd \-s \-0x30 file\fR
.PP
Nota: I risultati degli esempi seguenti sono riferiti alla versione di
Maggio 2024 della pagina di manuale [quella che state leggendo].
Marzo 2026 della pagina di manuale [quella che state leggendo].
.PP
.br
Stampa 120 byte come immagine esadecimale continua con 20 byte per riga.
.br
\fI% xxd \-l 120 \-ps \-c 20 xxd-it.UTF-8.1\fR
.br
2e544820585844203120224d616767696f203230
2e544820585844203120224d6172203230323622
.br
3234222022506167696e61206469206d616e7561
2022506167696e61206469206d616e75616c6520
.br
6c652070657220787864220a2e5c220a2e5c2220
70657220787864220a2e5c220a2e5c2220323173
.br
3231204d616767696f20313939360a2e5c222041
74204d617920313939360a2e5c22204d616e2070
.br
75746f72652064656c6c6120706167696e612064
61676520617574686f723a0a2e5c222020202054
.br
6f6e79204e7567656e74203c746f6e7940736374
.br
69206d616e75616c653a0a2e5c2220202020546f
.PP
.br
Stampa i primi 120 byte di questa pagina di manuale a 12 byte per riga.
@@ -273,30 +277,30 @@ Stampa i primi 120 byte di questa pagina di manuale a 12 byte per riga.
.br
00000000: 2e54 4820 5858 4420 3120 224d .TH XXD 1 "M
.br
0000000c: 6167 6769 6f20 3230 3234 2220 aggio 2024"
0000000c: 6172 2032 3032 3622 2022 5061 ar 2026" "Pa
.br
00000018: 2250 6167 696e 6120 6469 206d "Pagina di m
00000018: 6769 6e61 2064 6920 6d61 6e75 gina di manu
.br
00000024: 616e 7561 6c65 2070 6572 2078 anuale per x
00000024: 616c 6520 7065 7220 7878 6422 ale per xxd"
.br
00000030: 7864 220a 2e5c 220a 2e5c 2220 xd"..\"..\"
00000030: 0a2e 5c22 0a2e 5c22 2032 3173 ..\\"..\\" 21s
.br
0000003c: 3231 204d 6167 6769 6f20 3139 21 Maggio 19
0000003c: 7420 4d61 7920 3139 3936 0a2e t May 1996..
.br
00000048: 3936 0a2e 5c22 2041 7574 6f72 96..\" Autor
00000048: 5c22 204d 616e 2070 6167 6520 \\" Man page
.br
00000054: 6520 6465 6c6c 6120 7061 6769 e della pagi
00000054: 6175 7468 6f72 3a0a 2e5c 2220 author:..\\"
.br
00000060: 6e61 2064 6920 6d61 6e75 616c na di manual
00000060: 2020 2054 6f6e 7920 4e75 6765 Tony Nuge
.br
0000006c: 653a 0a2e 5c22 2020 2020 546f e:..\" To
0000006c: 6e74 203c 746f 6e79 4073 6374 nt <tony@sct
.PP
.br
Visualizza la data dal file xxd-it.UTF-8.1
Visualizza la data della prima versione di questa pagina dal file xxd-it.UTF-8.1
.br
\fI% xxd \-s 0x3c \-l 14 \-c 14 xxd-it.UTF-8.1\fR
\fI% xxd \-s 0x39 \-l 13 \-c 13 xxd-it.UTF-8.1\fR
.br
0000003c: 3231 204d 6167 6769 6f20 3139 3936 21 Maggio 1996
00000039: 3231 7374 204d 6179 2031 3939 36 21st May 1996
.PP
.br
Copia
@@ -311,11 +315,11 @@ premettendogli 100 byte a 0x00.
.br
Modifica (patch) la data nel file xxd-it.UTF-8.1
.br
\fI% echo "000003c: 3331" | xxd \-r \- xxd-it.UTF-8.1\fR
\fI% echo "0000039: 3331" | xxd \-r \- xxd-it.UTF-8.1\fR
.br
\fI% xxd \-s 0x3c \-l 14 \-c 14 xxd-it.UTF-8.1\fR
\fI% xxd \-s 0x39 \-l 13 \-c 13 xxd-it.UTF-8.1\fR
.br
0000003c: 3331 204d 6167 6769 6f20 3139 3936 31 Maggio 1996
00000039: 3331 7374 204d 6179 2031 3939 36 31st May 1996
.PP
.br
Crea un file di 65537 byte tutto a 0x00,
@@ -366,6 +370,20 @@ Leggere singoli caratteri da una linea seriale
.br
\fI% echo \-n foo > /dev/term/b\fR
.PP
Output nello stile delle `include' di C (opzione \-i ) con uno zero binario a fine stringa
.br
\fI% echo -n \&"0123456789\&" > cifre\fR
.br
\fI% xxd -i -t cifre\fR
.br
unsigned char cifre[] = {
.br
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x00
.br
};
.br
unsigned int cifre_len = 10;
.PP
.SH CODICI DI RITORNO
Il programma può restituire questi codici di errore:
.TP

View File

@@ -1,9 +1,9 @@
.TH XXD 1 "Maggio 2024" "Pagina di manuale per xxd"
.TH XXD 1 "Mar 2026" "Pagina di manuale per xxd"
.\"
.\" 21 Maggio 1996
.\" Autore della pagina di manuale:
.\" 21st May 1996
.\" Man page author:
.\" Tony Nugent <tony@sctnugen.ppp.gu.edu.au> <T.Nugent@sct.gu.edu.au>
.\" Modificato da Bram Moolenaar <Bram@vim.org>
.\" Changes by Bram Moolenaar <Bram@vim.org>
.SH NOME
.I xxd
\- Produce lista esadecimale da un file binario o viceversa.
@@ -170,11 +170,14 @@ byte assoluti (o relativi) di distanza all'interno di input_file.
(o se in combinazione con \fI+ \fR: prima della posizione corrente nel file `standard input').
Se non si specifica l'opzione \-s, xxd inizia dalla posizione corrente all'interno del file.
.TP
.I \-t
Quando l'output è nello stile delle `include' di C (opzione \-i ) aggiungere uno zero binario a fine stringa.
.TP
.I \-u
Usa lettere esadecimali maiuscole. Per default si usano lettere minuscole.
Usare lettere esadecimali maiuscole. Per default si usano lettere minuscole.
.TP
.IR \-v " | " \-version
Visualizza la stringa contenente la versione del programma.
Visualizzare la stringa contenente la versione del programma.
.SH ATTENZIONE
.PP
.I xxd \-r
@@ -182,7 +185,8 @@ Visualizza la stringa contenente la versione del programma.
Se è possibili posizionarsi tramite `seek' sul file di output, il numero di riga
di ogni riga esadecimale può essere non ordinato, delle righe possono mancare, o
sovrapporsi. In tal caso xxd userà lseek(2) per posizionarsi all'interno del file.
Se per il file di output non si può usare `seek', sono permessi solo dei "buchi", che saranno riempiti con zeri binari.
Se per il file di output non si può usare `seek', sono permessi solo dei "buchi",
che saranno riempiti con zeri binari.
.PP
.I xxd \-r
non genera mai errori per parametri errati. I parametri extra sono silenziosamente ignorati.
@@ -246,25 +250,25 @@ Stampa 3 righe (0x30 byte in esadecimale) alla fine di
\fI% xxd \-s \-0x30 file\fR
.PP
Nota: I risultati degli esempi seguenti sono riferiti alla versione di
Maggio 2024 della pagina di manuale [quella che state leggendo].
Marzo 2026 della pagina di manuale [quella che state leggendo].
.PP
.br
Stampa 120 byte come immagine esadecimale continua con 20 byte per riga.
.br
\fI% xxd \-l 120 \-ps \-c 20 xxd-it.UTF-8.1\fR
.br
2e544820585844203120224d616767696f203230
2e544820585844203120224d6172203230323622
.br
3234222022506167696e61206469206d616e7561
2022506167696e61206469206d616e75616c6520
.br
6c652070657220787864220a2e5c220a2e5c2220
70657220787864220a2e5c220a2e5c2220323173
.br
3231204d616767696f20313939360a2e5c222041
74204d617920313939360a2e5c22204d616e2070
.br
75746f72652064656c6c6120706167696e612064
61676520617574686f723a0a2e5c222020202054
.br
6f6e79204e7567656e74203c746f6e7940736374
.br
69206d616e75616c653a0a2e5c2220202020546f
.PP
.br
Stampa i primi 120 byte di questa pagina di manuale a 12 byte per riga.
@@ -273,30 +277,30 @@ Stampa i primi 120 byte di questa pagina di manuale a 12 byte per riga.
.br
00000000: 2e54 4820 5858 4420 3120 224d .TH XXD 1 "M
.br
0000000c: 6167 6769 6f20 3230 3234 2220 aggio 2024"
0000000c: 6172 2032 3032 3622 2022 5061 ar 2026" "Pa
.br
00000018: 2250 6167 696e 6120 6469 206d "Pagina di m
00000018: 6769 6e61 2064 6920 6d61 6e75 gina di manu
.br
00000024: 616e 7561 6c65 2070 6572 2078 anuale per x
00000024: 616c 6520 7065 7220 7878 6422 ale per xxd"
.br
00000030: 7864 220a 2e5c 220a 2e5c 2220 xd"..\"..\"
00000030: 0a2e 5c22 0a2e 5c22 2032 3173 ..\\"..\\" 21s
.br
0000003c: 3231 204d 6167 6769 6f20 3139 21 Maggio 19
0000003c: 7420 4d61 7920 3139 3936 0a2e t May 1996..
.br
00000048: 3936 0a2e 5c22 2041 7574 6f72 96..\" Autor
00000048: 5c22 204d 616e 2070 6167 6520 \\" Man page
.br
00000054: 6520 6465 6c6c 6120 7061 6769 e della pagi
00000054: 6175 7468 6f72 3a0a 2e5c 2220 author:..\\"
.br
00000060: 6e61 2064 6920 6d61 6e75 616c na di manual
00000060: 2020 2054 6f6e 7920 4e75 6765 Tony Nuge
.br
0000006c: 653a 0a2e 5c22 2020 2020 546f e:..\" To
0000006c: 6e74 203c 746f 6e79 4073 6374 nt <tony@sct
.PP
.br
Visualizza la data dal file xxd-it.UTF-8.1
Visualizza la data della prima versione di questa pagina dal file xxd-it.UTF-8.1
.br
\fI% xxd \-s 0x3c \-l 14 \-c 14 xxd-it.UTF-8.1\fR
\fI% xxd \-s 0x39 \-l 13 \-c 13 xxd-it.UTF-8.1\fR
.br
0000003c: 3231 204d 6167 6769 6f20 3139 3936 21 Maggio 1996
00000039: 3231 7374 204d 6179 2031 3939 36 21st May 1996
.PP
.br
Copia
@@ -311,11 +315,11 @@ premettendogli 100 byte a 0x00.
.br
Modifica (patch) la data nel file xxd-it.UTF-8.1
.br
\fI% echo "000003c: 3331" | xxd \-r \- xxd-it.UTF-8.1\fR
\fI% echo "0000039: 3331" | xxd \-r \- xxd-it.UTF-8.1\fR
.br
\fI% xxd \-s 0x3c \-l 14 \-c 14 xxd-it.UTF-8.1\fR
\fI% xxd \-s 0x39 \-l 13 \-c 13 xxd-it.UTF-8.1\fR
.br
0000003c: 3331 204d 6167 6769 6f20 3139 3936 31 Maggio 1996
00000039: 3331 7374 204d 6179 2031 3939 36 31st May 1996
.PP
.br
Crea un file di 65537 byte tutto a 0x00,
@@ -366,6 +370,20 @@ Leggere singoli caratteri da una linea seriale
.br
\fI% echo \-n foo > /dev/term/b\fR
.PP
Output nello stile delle `include' di C (opzione \-i ) con uno zero binario a fine stringa
.br
\fI% echo -n \&"0123456789\&" > cifre\fR
.br
\fI% xxd -i -t cifre\fR
.br
unsigned char cifre[] = {
.br
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x00
.br
};
.br
unsigned int cifre_len = 10;
.PP
.SH CODICI DI RITORNO
Il programma può restituire questi codici di errore:
.TP

View File

@@ -1,4 +1,4 @@
.TH XXD 1 "May 2024" "Справочник по программе xxd"
.TH XXD 1 "Март 2026" "Справочник по программе xxd"
.\"
.\" 21st May 1996
.\" Man page author:
@@ -203,6 +203,10 @@ ASCII,
Если аргумент \-s не используется, то программа xxd начинает обработку
от текущей позиции в файле.
.TP
.I \-t
При использовании аргумента \-i для вывода в стиле подключаемых заголовочных
файлов языка Си также включать завершающий нулевой символ
.TP
.I \-u
Указывает, что в выводе отображать шестнадцатеричные цифры в верхнем регистре.
По умолчанию используются символы в нижнем регистре символов.
@@ -304,7 +308,7 @@ PostScript
.br
\fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR
.br
2e544820585844203120224d6179203230323422
2e544820585844203120224d6172203230323622
.br
20224d616e75616c207061676520666f72207878
.br
@@ -327,7 +331,7 @@ PostScript
.br
00000000: 2e54 4820 5858 4420 3120 224d .TH XXD 1 "M
.br
0000000c: 6179 2032 3032 3422 2022 4d61 ay 2024" "Ma
0000000c: 6172 2032 3032 3622 2022 4d61 ar 2026" "Ma
.br
00000018: 6e75 616c 2070 6167 6520 666f nual page fo
.br
@@ -433,6 +437,20 @@ PostScript
.br
\fI% echo \-n foo \> /dev/term/b\fR
.PP
Вывод в стиле подключаемых заголовочных файлв языка Си с завершающим нулём
.br
\fI% echo -n \&"0123456789\&" > digits\fR
.br
\fI% xxd -i -t digits\fR
.br
unsigned char digits[] = {
.br
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x00
.br
};
.br
unsigned int digits_len = 10;
.PP
.SH КОДЫ ЗАВЕРШЕНИЯ
При завершении работы, программа xxd возвращает следующие значения:
.TP

View File

@@ -1,4 +1,4 @@
.TH XXD 1 "May 2024" "Справочник по программе xxd"
.TH XXD 1 "Март 2026" "Справочник по программе xxd"
.\"
.\" 21st May 1996
.\" Man page author:
@@ -203,6 +203,10 @@ ASCII, которые можно передавать по электронно
Если аргумент \-s не используется, то программа xxd начинает обработку
от текущей позиции в файле.
.TP
.I \-t
При использовании аргумента \-i для вывода в стиле подключаемых заголовочных
файлов языка Си также включать завершающий нулевой символ
.TP
.I \-u
Указывает, что в выводе отображать шестнадцатеричные цифры в верхнем регистре.
По умолчанию используются символы в нижнем регистре символов.
@@ -304,7 +308,7 @@ PostScript с помощью команды xxd \-r \-p количество к
.br
\fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR
.br
2e544820585844203120224d6179203230323422
2e544820585844203120224d6172203230323622
.br
20224d616e75616c207061676520666f72207878
.br
@@ -327,7 +331,7 @@ PostScript с помощью команды xxd \-r \-p количество к
.br
00000000: 2e54 4820 5858 4420 3120 224d .TH XXD 1 "M
.br
0000000c: 6179 2032 3032 3422 2022 4d61 ay 2024" "Ma
0000000c: 6172 2032 3032 3622 2022 4d61 ar 2026" "Ma
.br
00000018: 6e75 616c 2070 6167 6520 666f nual page fo
.br
@@ -433,6 +437,20 @@ PostScript с помощью команды xxd \-r \-p количество к
.br
\fI% echo \-n foo \> /dev/term/b\fR
.PP
Вывод в стиле подключаемых заголовочных файлв языка Си с завершающим нулём
.br
\fI% echo -n \&"0123456789\&" > digits\fR
.br
\fI% xxd -i -t digits\fR
.br
unsigned char digits[] = {
.br
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x00
.br
};
.br
unsigned int digits_len = 10;
.PP
.SH КОДЫ ЗАВЕРШЕНИЯ
При завершении работы, программа xxd возвращает следующие значения:
.TP

View File

@@ -1,4 +1,4 @@
.TH XXD 1 "May 2024" "Manual page for xxd"
.TH XXD 1 "Mar 2026" "Manual page for xxd"
.\"
.\" 21st May 1996
.\" Man page author:
@@ -169,6 +169,9 @@ should be that many characters from the end of the input (or if combined with
\fI+\fR: before the current stdin file position).
Without \-s option, xxd starts at the current file position.
.TP
.I \-t
When outputting in C include file style using \-i include the terminating zero.
.TP
.I \-u
Use upper-case hex letters. Default is lower-case.
.TP
@@ -243,14 +246,14 @@ Print 3 lines (hex 0x30 bytes) from the end of
\fI% xxd \-s \-0x30 file\fR
.PP
Note: The results of the examples below are relevant to the xxd.1 man page as of
May 2024
March 2026
.PP
.br
Print 120 bytes as a continuous hex dump with 20 octets per line.
.br
\fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR
.br
2e544820585844203120224d6179203230323422
2e544820585844203120224d6172203230323622
.br
20224d616e75616c207061676520666f72207878
.br
@@ -270,7 +273,7 @@ Hex dump the first 120 bytes of this man page with 12 octets per line.
.br
00000000: 2e54 4820 5858 4420 3120 224d .TH XXD 1 "M
.br
0000000c: 6179 2032 3032 3422 2022 4d61 ay 2024" "Ma
0000000c: 6172 2032 3032 3622 2022 4d61 ar 2026" "Ma
.br
00000018: 6e75 616c 2070 6167 6520 666f nual page fo
.br
@@ -363,6 +366,20 @@ Read single characters from a serial line
.br
\fI% echo \-n foo > /dev/term/b\fR
.PP
Output in C style include output with terminating zero
.br
\fI% echo -n \&"0123456789\&" > digits\fR
.br
\fI% xxd -i -t digits\fR
.br
unsigned char digits[] = {
.br
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x00
.br
};
.br
unsigned int digits_len = 10;
.PP
.SH "RETURN VALUES"
The following error values are returned:
.TP

View File

@@ -119,26 +119,29 @@ OPTIONS
(or if combined with +: before the current stdin file position).
Without -s option, xxd starts at the current file position.
-t When outputting in C include file style using -i include the
terminating zero.
-u Use upper-case hex letters. Default is lower-case.
-v | -version
Show version string.
CAVEATS
xxd -r has some built-in magic while evaluating line number informa
tion. If the output file is seekable, then the line numbers at the
start of each hex dump line may be out of order, lines may be missing,
or overlapping. In these cases xxd will lseek(2) to the next position.
If the output file is not seekable, only gaps are allowed, which will
xxd -r has some built-in magic while evaluating line number informa
tion. If the output file is seekable, then the line numbers at the
start of each hex dump line may be out of order, lines may be missing,
or overlapping. In these cases xxd will lseek(2) to the next position.
If the output file is not seekable, only gaps are allowed, which will
be filled by null-bytes.
xxd -r never generates parse errors. Garbage is silently skipped.
When editing hex dumps, please note that xxd -r skips everything on the
input line after reading enough columns of hexadecimal data (see option
-c). This also means that changes to the printable ASCII (or EBCDIC)
-c). This also means that changes to the printable ASCII (or EBCDIC)
columns are always ignored. Reverting a plain (or PostScript) style hex
dump with xxd -r -p does not depend on the correct number of columns.
dump with xxd -r -p does not depend on the correct number of columns.
Here, anything that looks like a pair of hex digits is interpreted.
Note the difference between
@@ -146,28 +149,28 @@ CAVEATS
and
% xxd -i < file
xxd -s +seek may be different from xxd -s seek, as lseek(2) is used to
xxd -s +seek may be different from xxd -s seek, as lseek(2) is used to
"rewind" input. A '+' makes a difference if the input source is stdin,
and if stdin's file position is not at the start of the file by the
time xxd is started and given its input. The following examples may
and if stdin's file position is not at the start of the file by the
time xxd is started and given its input. The following examples may
help to clarify (or further confuse!):
Rewind stdin before reading; needed because the `cat' has already read
Rewind stdin before reading; needed because the `cat' has already read
to the end of stdin.
% sh -c "cat > plain_copy; xxd -s 0 > hex_copy" < file
Hex dump from file position 0x480 (=1024+128) onwards. The `+' sign
Hex dump from file position 0x480 (=1024+128) onwards. The `+' sign
means "relative to the current position", thus the `128' adds to the 1k
where dd left off.
% sh -c "dd of=plain_snippet bs=1k count=1; xxd -s +128 > hex_snippet"
% sh -c "dd of=plain_snippet bs=1k count=1; xxd -s +128 > hex_snippet"
< file
Hex dump from file position 0x100 (=1024-768) onwards.
% sh -c "dd of=plain_snippet bs=1k count=1; xxd -s +-768 > hex_snippet"
< file
However, this is a rare situation and the use of `+' is rarely needed.
The author prefers to monitor the effect of xxd with strace(1) or
However, this is a rare situation and the use of `+' is rarely needed.
The author prefers to monitor the effect of xxd with strace(1) or
truss(1), whenever -s is used.
EXAMPLES
@@ -177,12 +180,12 @@ EXAMPLES
Print 3 lines (hex 0x30 bytes) from the end of file.
% xxd -s -0x30 file
Note: The results of the examples below are relevant to the xxd.1 man
page as of May 2024
Note: The results of the examples below are relevant to the xxd.1 man
page as of March 2026
Print 120 bytes as a continuous hex dump with 20 octets per line.
% xxd -l 120 -ps -c 20 xxd.1
2e544820585844203120224d6179203230323422
2e544820585844203120224d6172203230323622
20224d616e75616c207061676520666f72207878
64220a2e5c220a2e5c222032317374204d617920
313939360a2e5c22204d616e2070616765206175
@@ -192,7 +195,7 @@ EXAMPLES
Hex dump the first 120 bytes of this man page with 12 octets per line.
% xxd -l 120 -c 12 xxd.1
00000000: 2e54 4820 5858 4420 3120 224d .TH XXD 1 "M
0000000c: 6179 2032 3032 3422 2022 4d61 ay 2024" "Ma
0000000c: 6172 2032 3032 3622 2022 4d61 ar 2026" "Ma
00000018: 6e75 616c 2070 6167 6520 666f nual page fo
00000024: 7220 7878 6422 0a2e 5c22 0a2e r xxd"..\"..
00000030: 5c22 2032 3173 7420 4d61 7920 \" 21st May
@@ -214,7 +217,7 @@ EXAMPLES
% xxd -s 0x33 -l 13 -c 13 xxd.1
00000033: 3235 7468 204d 6179 2031 3939 36 25th May 1996
Create a 65537 byte file with all bytes 0x00, except for the last one
Create a 65537 byte file with all bytes 0x00, except for the last one
which is 'A' (hex 0x41).
% echo "010000: 41" | xxd -r > file
@@ -225,11 +228,11 @@ EXAMPLES
0000fffc: 0000 0000 41 ....A
Create a 1 byte file containing a single 'A' character. The number af
ter '-r -s' adds to the line numbers found in the file; in effect, the
ter '-r -s' adds to the line numbers found in the file; in effect, the
leading bytes are suppressed.
% echo "010000: 41" | xxd -r -s -0x10000 > file
Use xxd as a filter within an editor such as vim(1) to hex dump a re
Use xxd as a filter within an editor such as vim(1) to hex dump a re
gion marked between `a' and `z'.
:'a,'z!xxd
@@ -246,6 +249,14 @@ EXAMPLES
% stty < /dev/term/b -echo -opost -isig -icanon min 1
% echo -n foo > /dev/term/b
Output in C style include output with terminating zero
% echo -n "0123456789" > digits
% xxd -i -t digits
unsigned char digits[] = {
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x00
};
unsigned int digits_len = 10;
RETURN VALUES
The following error values are returned:
@@ -283,4 +294,4 @@ AUTHOR
<tony@sctnugen.ppp.gu.edu.au> <T.Nugent@sct.gu.edu.au>
Small changes by Bram Moolenaar. Edited by Juergen Weigert.
Manual page for xxd May 2024 XXD(1)
Manual page for xxd Mar 2026 XXD(1)

View File

@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2026 Feb 18
" Last Change: 2026 Apr 20
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" If the filetype can be detected from extension or file name(the final path component),
@@ -119,10 +119,13 @@ au BufNewFile,BufRead */boot/grub/menu.lst,*/boot/grub/grub.conf,*/etc/grub.conf
" *.mc omitted - used by dist#ft#McSetf()
au BufNewFile,BufRead *.demo,*.dm{1,2,3,t},*.wxm,maxima-init.mac setf maxima
" ObjectScript routine or assembly
au BufNewFile,BufRead *.mac call dist#ft#FTmac()
" Assembly (all kinds)
" *.lst is not pure assembly, it has two extra columns (address, byte codes)
" *.[sS], *.[aA] usually Assembly - GNU
au BufNewFile,BufRead *.asm,*.[sS],*.[aA],*.mac,*.lst call dist#ft#FTasm()
au BufNewFile,BufRead *.asm,*.[sS],*.[aA],*.lst call dist#ft#FTasm()
" BASIC or Visual Basic
au BufNewFile,BufRead *.bas call dist#ft#FTbas()
@@ -572,6 +575,9 @@ au BufNewFile,BufRead *.pro call dist#ft#ProtoCheck('idlang')
" Initng
au BufNewFile,BufRead */etc/initng/*/*.i,*.ii setf initng
" Intel HEX or ObjectScript routine
au BufNewFile,BufRead *.int call dist#ft#FTint()
" Innovation Data Processing
au BufNewFile,BufRead upstream.dat\c,upstream.*.dat\c,*.upstream.dat\c setf upstreamdat
au BufNewFile,BufRead fdrupstream.log,upstream.log\c,upstream.*.log\c,*.upstream.log\c,UPSTREAM-*.log\c setf upstreamlog
@@ -884,7 +890,10 @@ au BufNewFile,BufRead requirements/*.txt setf requirements
au BufNewFile,BufRead requires/*.txt setf requirements
" Pkl
au BufNewFile,BufRead *.pkl,*.pcf,pkl-lsp://* setf pkl
au BufNewFile,BufRead PklProject,*.pkl,*.pcf,pkl-lsp://* setf pkl
" WIC kickstarter files
au BufNewFile,BufRead *.wks,*.wks.in,*.wks.inc setf wks
" Povray, Pascal, PHP or assembly
au BufNewFile,BufRead *.inc call dist#ft#FTinc()
@@ -1054,7 +1063,7 @@ au BufNewFile,BufRead *.scm,*.ss,*.sld,*.stsg,*/supertux2/config,.lips_repl_hist
" SiSU
au BufNewFile,BufRead *.sst.meta,*.-sst.meta,*._sst.meta setf sisu
" Smalltalk (and Rexx, TeX, and Visual Basic)
" Smalltalk (and ObjectScript, Rexx, TeX, and Visual Basic)
au BufNewFile,BufRead *.cls call dist#ft#FTcls()
" SMIL or XML
@@ -1303,7 +1312,7 @@ au BufNewFile,BufRead *Xmodmap setf xmodmap
au BufNewFile,BufRead *.y call dist#ft#FTy()
" Yaml
au BufNewFile,BufRead */.kube/config,*/.kube/kuberc setf yaml
au BufNewFile,BufRead buf.lock,*/.kube/config,*/.kube/kuberc setf yaml
" yum conf (close enough to dosini)
au BufNewFile,BufRead */etc/yum.conf setf dosini
@@ -1571,6 +1580,9 @@ au BufNewFile,BufRead *vimrc* call s:StarSetf('vim')
" Subversion commit file
au BufNewFile,BufRead svn-commit*.tmp setf svn
" Wireguard config
au BufNewFile,BufRead */etc/wireguard/*.conf setf dosini
" X resources file
au BufNewFile,BufRead Xresources*,*/app-defaults/*,*/Xresources/* call s:StarSetf('xdefaults')
@@ -1605,6 +1617,10 @@ au BufNewFile,BufRead *.txt
\| setf text
\| endif
" Ghostty configuration
au BufNewFile,BufRead */ghostty/config setf ghostty
au BufNewFile,BufRead */ghostty/themes/* call s:StarSetf('ghostty')
au BufNewFile,BufRead */com.mitchellh.ghostty/config setf ghostty
" Generic log file

View File

@@ -0,0 +1,47 @@
" Vim filetype plugin
" Language: Algol 68
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2026 Apr 23
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
" TODO: 'comments'
setlocal commentstring=#\ %s\ #
let &l:include='\c\%(^\|;\)\s*\%(PR\|PRAGMAT\)\s\+\%(read\|include\)'
let b:undo_ftplugin = "setl cms< inc<"
if exists("loaded_matchit") && !exists("b:match_words")
let b:match_ignorecase = 0
let b:match_words = '\<BEGIN\>:\<END\>,' ..
\ '\<IF\>:\<THEN\>:\<ELIF\>:\<ELSE\>:\<FI\>,' ..
\ '\<CASE\>:\<IN\>:\<OUSE\>:\<OUT\>:\<ESAC\>,' ..
"\ TODO: loops have overlapping start and intermediate keywords like
"\ `TO` which are difficult to match with patterns alone.
\ '\<DO\>:\<OD\>'
let b:match_skip = 's:Comment\|String\|PreProc'
let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_skip b:match_words"
endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "Algol 68 Source Files (*.a68)\t*.a68\n"
if has("win32")
let b:browsefilter ..= "All Files (*.*)\t*\n"
else
let b:browsefilter ..= "All Files (*)\t*\n"
endif
let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: nowrap sw=2 sts=2 ts=8

View File

@@ -5,10 +5,15 @@
" Last Change: February 1, 2023
" 2023 Aug 28 by Vim Project (undo_ftplugin)
" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
" 2026 Mar 16 by Phạm Bình An (add matchit support)
if exists("b:did_ftplugin")
finish
endif
let s:saved_cpo = &cpo
set cpo-=C
let b:did_ftplugin = 1
setlocal iskeyword=@,48-57,_,192-255,-,.
@@ -17,3 +22,20 @@ setlocal commentstring=#\ %s
setlocal formatoptions+=crjq
let b:undo_ftplugin = "setl cms< com< fo< isk<"
" Define patterns for the matchit plugin
if exists("loaded_matchit") && !exists("b:match_words")
let b:match_words =
\ '\<\%(else\s\+\)\@<!if\>\|\<\%(switch\|begin\|function\|while\|for\)\>:' ..
\ '\<else\%(\s\+if\)\?\>\|\<case\>:' ..
\ '\<end\>'
let b:match_ignorecase = 0
let b:match_skip = "S:keyword"
let b:undo_ftplugin ..= " | unlet! b:match_words b:match_ignorecase b:match_skip"
endif
" Restore 'cpo' to its original value
let &cpo = s:saved_cpo
unlet s:saved_cpo

View File

@@ -0,0 +1,10 @@
" Vim filetype plugin file
" Language: ghostty
" Quit if a ftplugin file was already loaded
if exists("b:did_ftplugin")
finish
endif
" Use the cfg plugin, it's similar enough.
runtime! ftplugin/cfg.vim

View File

@@ -4,6 +4,7 @@
" Last Change: 2025 Apr 08
" 2025 Apr 08 by Vim project (set 'omnifunc' and 'iskeyword', #17073)
" 2025 Aug 08 by Vim project (unset comment options, #17889)
" 2026 Apr 26 by Vim project (make HelpComplete global, #20024)
if exists("b:did_ftplugin")
finish
@@ -17,14 +18,14 @@ let b:undo_ftplugin = "setl isk< fo< tw< cole< cocu< keywordprg< omnifunc< comme
setl comments= cms=
setlocal formatoptions+=tcroql textwidth=78 keywordprg=:help omnifunc=s:HelpComplete
setlocal formatoptions+=tcroql textwidth=78 keywordprg=:help omnifunc=HelpComplete
let &l:iskeyword='!-~,^*,^|,^",192-255'
if has("conceal")
setlocal cole=2 cocu=nc
endif
if !exists('*s:HelpComplete')
func s:HelpComplete(findstart, base)
if !exists('*HelpComplete')
func HelpComplete(findstart, base)
if a:findstart
let colnr = col('.') - 1 " Get the column number before the cursor
let line = getline('.')

View File

@@ -4,6 +4,8 @@
" Previous Maintainer: Will Langstroth <will@langstroth.com>
" URL: https://github.com/benknoble/vim-racket
" Last Change: 2025 Aug 09
" 2026 Mar 31 by Vim project: use shellescape for the K mapping
" 2026 Apr 01 by Vim project: make K mapping more robust for shell injection
if exists("b:did_ftplugin")
finish
@@ -51,7 +53,7 @@ if !exists("no_plugin_maps") && !exists("no_racket_maps")
try
let l:old_a = @a
normal! gv"ay
call system("raco docs '". @a . "'")
call system("raco docs -- ". string(shellescape(@a)))
redraw!
return @a
finally

View File

@@ -2,7 +2,7 @@
" Language: OpenSSH client configuration file
" Maintainer: This runtime file is looking for a new maintainer.
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2025-07-22 (use :hor term #17822)
" Latest Revision: 2026-03-11 (`less -I`)
if exists("b:did_ftplugin")
finish
@@ -17,7 +17,7 @@ let b:undo_ftplugin = 'setlocal com< cms< fo<'
if has('unix') && executable('less') && exists(':terminal') == 2
command -buffer -nargs=1 SshconfigKeywordPrg
\ silent exe 'hor term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s+' . <q-args> . '$', '\') . ''' --hilite-search" man ' . 'ssh_config'
\ silent exe 'hor term ' . 'env LESS= MANPAGER="less -I --pattern=''' . escape('^\s+' . <q-args> . '$', '\') . ''' --hilite-search" man ' . 'ssh_config'
setlocal iskeyword+=-
setlocal keywordprg=:SshconfigKeywordPrg
let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer SshconfigKeywordPrg'

View File

@@ -19,9 +19,8 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
if has('unix') && executable('less') && exists(':terminal') == 2
command -buffer -nargs=1 SudoersKeywordPrg
\ silent exe ':hor term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('\b' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . 'sudoers'
setlocal iskeyword+=-
setlocal keywordprg=:SudoersKeywordPrg
let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer SudoersKeywordPrg'
let b:undo_ftplugin .= '| setlocal keywordprg< | sil! delc -buffer SudoersKeywordPrg'
endif
let &cpo = s:cpo_save

14
runtime/ftplugin/wks.vim Normal file
View File

@@ -0,0 +1,14 @@
" Vim filetype plugin file
" Language: OpenEmbedded Image Creator (WIC) Kickstarter files wks
" Maintainer: Anakin Childerhose <anakin@childerhose.ca>
" Last Change: 2026 Mar 23
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
setlocal comments=:#
setlocal commentstring=#\ %s
let b:undo_ftplugin = 'setlocal com< cms<'

22
runtime/ftplugin/yara.vim Normal file
View File

@@ -0,0 +1,22 @@
" Vim filetype plugin file
" Language: YARA
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2026 Mar 17
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
finish
endif
" Don't load another plugin for this buffer
let b:did_ftplugin = 1
" Set 'formatoptions' to break comment lines but not other lines,
" and insert the comment leader when hitting <CR> or using "o".
setlocal formatoptions-=t formatoptions+=croql
setlocal commentstring=//\ %s
setlocal comments=s1:/*,mb:*,ex:*/,://
" Undo settings when leaving buffer
let b:undo_ftplugin = "setlocal commentstring< comments< formatoptions<"

View File

@@ -9,9 +9,13 @@ Name[es]=GVim
Name[fi]=GVim
Name[fr]=GVim
Name[ga]=GVim
Name[hy]=ԳՎիմ
Name[it]=GVim
Name[ru]=GVim
Name[ja]=GVim
Name[ru]=gVim
Name[sr]=GVim
Name[sv]=GVim
Name[ta]=சிவிம்
Name[tr]=GVim
Name[uk]=GVim
Name[zh_CN]=GVim
@@ -24,12 +28,14 @@ GenericName[es]=Editor de texto
GenericName[fi]=Tekstinmuokkain
GenericName[fr]=Éditeur de texte
GenericName[ga]=Eagarthóir Téacs
GenericName[hy]=Տեքստի խմբագիր
GenericName[it]=Editor di testi
GenericName[ja]=テキストエディタ
GenericName[ru]=Текстовый редактор
GenericName[sr]=Едитор текст
GenericName[sr]=Едитор текста
GenericName[sv]=Textredigerare
GenericName[tr]=Metin Düzenleyici
GenericName[ta]=உரை திருத்தி
GenericName[tr]=Metin Düzenleyicisi
GenericName[uk]=Редактор Тексту
GenericName[zh_CN]=文本编辑器
GenericName=Text Editor
@@ -41,11 +47,14 @@ Comment[es]=Editar archivos de texto
Comment[fi]=Muokkaa tekstitiedostoja
Comment[fr]=Éditer des fichiers texte
Comment[ga]=Cuir comhaid téacs in eagar
Comment[hy]=Խմբագրել տեքստային ֆայլերը
Comment[it]=Edita file di testo
Comment[ja]=テキストファイルを編集します
Comment[ru]=Редактирование текстовых файлов
Comment[ru]=Редактировать текстовые файлы
Comment[sr]=Уређујте текст фајлове
Comment[tr]=Metin dosyaları düzenleyin
Comment[sv]=Redigera textfiler
Comment[ta]=உரை கோப்புகளைத் திருத்தவும்
Comment[tr]=Metin dosyalarını düzenleyin
Comment[uk]=Редагувати текстові файли
Comment[zh_CN]=编辑文本文件
Comment=Edit text files
@@ -55,7 +64,6 @@ GenericName[da]=Teksteditor
GenericName[pl]=Edytor tekstu
GenericName[is]=Ritvinnsluforrit
Comment[af]=Redigeer tekslêers
Comment[am]=የጽሑፍ ፋይሎች ያስተካክሉ
Comment[ar]=حرّر ملفات نصية
Comment[az]=Mətn fayllarını redaktə edin
Comment[be]=Рэдагаваньне тэкставых файлаў
@@ -102,8 +110,6 @@ Comment[sk]=Úprava textových súborov
Comment[sl]=Urejanje datotek z besedili
Comment[sq]=Përpuno files teksti
Comment[sr@Latn]=Izmeni tekstualne datoteke
Comment[sv]=Redigera textfiler
Comment[ta]=உரை கோப்புகளை தொகுக்கவும்
Comment[th]=แก้ไขแฟ้มข้อความ
Comment[tk]=Metin faýllary editle
Comment[vi]=Soạn thảo tập tin văn bản
@@ -121,11 +127,13 @@ Keywords[es]=Texto;editor;
Keywords[fi]=Teksti;muokkain;editori;
Keywords[fr]=Texte;éditeur;
Keywords[ga]=Téacs;eagarthóir;
Keywords[hy]=Տեքստ;խմբագիր;
Keywords[it]=Testo;editor;
Keywords[ja]=テキスト;エディタ;
Keywords[ru]=текст;текстовый редактор;
Keywords[sr]=Текст;едитор;
Keywords[sv]=Text;Redigerare;
Keywords[sv]=Text;redigerare;
Keywords[ta]=உரை;திருத்தி;
Keywords[tr]=Metin;düzenleyici;
Keywords[uk]=текст;редактор;
Keywords[zh_CN]=Text;editor;文本;编辑器;

View File

@@ -1,7 +1,7 @@
" These commands create the option window.
"
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2026 Mar 04
" Last Change: 2026 Apr 21
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" If there already is an option window, jump to that one.
@@ -351,6 +351,8 @@ call append("$", "\t" .. s:local_to_window)
call <SID>BinOptionL("sms")
call <SID>AddOption("scrolloff", gettext("number of screen lines to show around the cursor"))
call append("$", " \tset so=" . &so)
call <SID>AddOption("scrolloffpad", gettext("vertically center cursor even at end of file"))
call append("$", " \tset sop=" . &sop)
call <SID>AddOption("wrap", gettext("long lines wrap"))
call append("$", "\t" .. s:local_to_window)
call <SID>BinOptionL("wrap")
@@ -385,6 +387,10 @@ call <SID>AddOption("window", gettext("number of lines to scroll for CTRL-F and
call append("$", " \tset window=" . &window)
call <SID>AddOption("lazyredraw", gettext("don't redraw while executing macros"))
call <SID>BinOptionG("lz", &lz)
if has("unix")
call <SID>AddOption("termresize", gettext("configure method of receiving terminal size changes"))
call <SID>BinOptionG("trz", &trz)
endif
call <SID>AddOption("termsync", gettext("enable terminal sync mode"))
call <SID>BinOptionG("tsy", &tsy)
if has("reltime")
@@ -829,10 +835,6 @@ if has('wayland')
call <SID>AddOption("wlseat", gettext("Wayland seat to use"))
call <SID>OptionG("wse", &wse)
endif
if has("wayland_focus_steal")
call <SID>AddOption("wlsteal", gettext("Enable wayland focus stealing functionality in order to access the clipboard"))
call <SID>BinOptionG("wst", &wst)
endif
call <SID>AddOption("keymodel", gettext("\"startsel\" and/or \"stopsel\"; what special keys can do"))
call <SID>OptionG("km", &km)
@@ -909,6 +911,8 @@ if has("insert_expand")
call <SID>OptionG("pmw", &pmw)
call <SID>AddOption("pumborder", gettext("popup border style"))
call <SID>OptionG("pb", &pb)
call <SID>AddOption("pumopt", gettext("additional options for the popup menu"))
call <SID>OptionG("pumopt", &pumopt)
call <SID>AddOption("completefunc", gettext("user defined function for Insert mode completion"))
call append("$", "\t" .. s:local_to_buffer)
call <SID>OptionL("cfu")
@@ -1102,6 +1106,8 @@ call append("$", "\t" .. s:local_to_buffer)
call <SID>BinOptionL("ml")
call <SID>AddOption("modelineexpr", gettext("allow setting expression options from a modeline"))
call <SID>BinOptionG("mle", &mle)
call <SID>AddOption("modelinestrict", gettext("only allow safe options to be set from a modeline"))
call <SID>BinOptionG("modelinestrict", &modelinestrict)
call <SID>AddOption("modelines", gettext("number of lines to check for modelines"))
call append("$", " \tset mls=" . &mls)
call <SID>AddOption("binary", gettext("binary file editing"))

View File

@@ -1,7 +1,7 @@
vim9script
# Highlight Yank plugin
# Last Change: 2025 Mar 22
# Last Change: 2026 Apr 11
def HighlightedYank()
@@ -28,7 +28,11 @@ def HighlightedYank()
return [v[0][1], col_beg, col_end - col_beg]
}))
var winid = win_getid()
timer_start(duration, (_) => m->matchdelete(winid))
timer_start(duration, (_) => {
if winbufnr(winid) != -1
m->matchdelete(winid)
endif
})
endif
enddef

View File

@@ -22,6 +22,12 @@
" 2026 Feb 21 by Vim Project better absolute path detection on MS-Windows #19477
" 2026 Feb 27 by Vim Project Make the hostname validation more strict
" 2026 Mar 01 by Vim Project include portnumber in hostname checking #19533
" 2026 Apr 01 by Vim Project use fnameescape() with netrw#FileUrlEdit()
" 2026 Apr 05 by Vim Project Fix netrw#RFC2396() #19913
" 2026 Apr 15 by Vim Project Add missing escape()
" 2026 Apr 19 by Vim Project expand ~ on Windows #20003
" 2026 Apr 21 by Vim Project fix shell-injection via tempfile suffix (sftp://, file://)
" 2026 Apr 21 by Vim Project drop unused g:netrw_tmpfile_escape
" Copyright: Copyright (C) 2016 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
@@ -396,7 +402,6 @@ else
call s:NetrwInit("g:netrw_glob_escape",'*[]?`{~$\')
endif
call s:NetrwInit("g:netrw_menu_escape",'.&? \')
call s:NetrwInit("g:netrw_tmpfile_escape",' &;')
call s:NetrwInit("s:netrw_map_escape","<|\n\r\\\<C-V>\"")
if has("gui_running") && (&enc == 'utf-8' || &enc == 'utf-16' || &enc == 'ucs-4')
let s:treedepthstring= "│ "
@@ -527,8 +532,8 @@ function netrw#Explore(indx,dosplit,style,...)
NetrwKeepj norm! 0
if a:0 > 0
if a:1 =~ '^\~' && (has("unix") || g:netrw_cygwin)
let dirname= simplify(substitute(a:1,'\~',expand("$HOME"),''))
if a:1 =~ '^\~' && (has("unix") || has("win32") || g:netrw_cygwin)
let dirname= simplify(substitute(a:1,'^\~',escape(expand("$HOME"),'\&~'),''))
elseif a:1 == '.'
let dirname= simplify(exists("b:netrw_curdir")? b:netrw_curdir : getcwd())
if dirname !~ '/$'
@@ -1817,14 +1822,14 @@ function netrw#NetRead(mode,...)
".........................................
" NetRead: (sftp) NetRead Method #9 {{{3
elseif b:netrw_method == 9
call netrw#os#Execute(s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".netrw#os#Escape(g:netrw_machine.":".b:netrw_fname,1)." ".tmpfile)
call netrw#os#Execute(s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".netrw#os#Escape(g:netrw_machine.":".b:netrw_fname,1)." ".netrw#os#Escape(tmpfile,1))
let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
let b:netrw_lastfile = choice
".........................................
" NetRead: (file) NetRead Method #10 {{{3
elseif b:netrw_method == 10 && exists("g:netrw_file_cmd")
call netrw#os#Execute(s:netrw_silentxfer."!".g:netrw_file_cmd." ".netrw#os#Escape(b:netrw_fname,1)." ".tmpfile)
call netrw#os#Execute(s:netrw_silentxfer."!".g:netrw_file_cmd." ".netrw#os#Escape(b:netrw_fname,1)." ".netrw#os#Escape(tmpfile,1))
let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
let b:netrw_lastfile = choice
@@ -5302,6 +5307,8 @@ function s:NetrwMarkFileCompress(islocal)
if a:islocal
if g:netrw_keepdir
let fname= netrw#os#Escape(netrw#fs#ComposePath(curdir,fname))
else
let fname= netrw#os#Escape(fname)
endif
call system(exe." ".fname)
if v:shell_error
@@ -5636,6 +5643,8 @@ function s:NetrwMarkFileExe(islocal,enbloc)
if a:islocal
if g:netrw_keepdir
let fname= netrw#os#Escape(netrw#fs#WinPath(netrw#fs#ComposePath(curdir,fname)))
else
let fname= netrw#os#Escape(netrw#fs#WinPath(fname))
endif
else
let fname= netrw#os#Escape(netrw#fs#WinPath(b:netrw_curdir.fname))
@@ -8282,7 +8291,7 @@ function netrw#FileUrlEdit(fname)
endif
exe "sil doau BufReadPre ".fname2396e
exe 'NetrwKeepj keepalt edit '.plainfname
exe 'NetrwKeepj keepalt edit '. fnameescape(plainfname)
exe 'sil! NetrwKeepj keepalt bdelete '.fnameescape(a:fname)
exe "sil doau BufReadPost ".fname2396e
@@ -8825,8 +8834,7 @@ endfunction
" netrw#RFC2396: converts %xx into characters {{{2
function netrw#RFC2396(fname)
let fname = escape(substitute(a:fname,'%\(\x\x\)','\=printf("%c","0x".submatch(1))','ge')," \t")
return fname
return substitute(a:fname, '%\(\x\x\)', '\=printf("%c","0x".submatch(1))', 'ge')
endfunction
" netrw#UserMaps: supports user-specified maps {{{2
@@ -8958,14 +8966,17 @@ function s:GetTempfile(fname)
endif
" use fname's suffix for the temporary file
" Restrict the suffix to word characters so shell metacharacters in a
" remote filename (e.g. sftp://host/foo.txt;id) cannot ride along into
" the tempfile name and out into a downstream shell command.
if a:fname != ""
if a:fname =~ '\.[^./]\+$'
if a:fname =~ '\.\w\+$'
if a:fname =~ '\.tar\.gz$' || a:fname =~ '\.tar\.bz2$' || a:fname =~ '\.tar\.xz$'
let suffix = ".tar".substitute(a:fname,'^.*\(\.[^./]\+\)$','\1','e')
let suffix = ".tar".substitute(a:fname,'^.*\(\.\w\+\)$','\1','e')
elseif a:fname =~ '.txz$'
let suffix = ".txz".substitute(a:fname,'^.*\(\.[^./]\+\)$','\1','e')
let suffix = ".txz".substitute(a:fname,'^.*\(\.\w\+\)$','\1','e')
else
let suffix = substitute(a:fname,'^.*\(\.[^./]\+\)$','\1','e')
let suffix = substitute(a:fname,'^.*\(\.\w\+\)$','\1','e')
endif
let tmpfile= substitute(tmpfile,'\.tmp$','','e')
let tmpfile .= suffix

View File

@@ -2854,10 +2854,6 @@ your browsing preferences. (see also: |netrw-settings|)
such as listing, file removal, etc.
default: ssh
*g:netrw_tmpfile_escape* =' &;'
escape() is applied to all temporary files
to escape these characters.
*g:netrw_timefmt* specify format string to vim's strftime().
The default, "%c", is "the preferred date
and time representation for the current

View File

@@ -4,7 +4,7 @@ vim9script
# Author: Bram Moolenaar
# Copyright: Vim license applies, see ":help license"
# Last Change: 2025 Dec 26
# Last Change: 2026 Mar 11
# Converted to Vim9: Ubaldo Tiberi <ubaldo.tiberi@gmail.com>
# WORK IN PROGRESS - The basics works stable, more to come
@@ -1592,6 +1592,87 @@ def QuoteArg(x: string): string
return printf('"%s"', x ->substitute('[\\"]', '\\&', 'g'))
enddef
def DefaultBreakpointLocation(): string
# Use the fname:lnum format, older gdb can't handle --source.
var fname = Remote2LocalPath(expand('%:p'))
return QuoteArg($"{fname}:{line('.')}")
enddef
def TokenizeBreakpointArguments(args: string): list<dict<any>>
var tokens: list<dict<any>> = []
var start = -1
var escaped = false
var in_quotes = false
var i = 0
for ch in args
if start < 0 && ch !~ '\s'
start = i
endif
if start >= 0
if escaped
escaped = false
elseif ch == '\'
escaped = true
elseif ch == '"'
in_quotes = !in_quotes
elseif !in_quotes && ch =~ '\s'
tokens->add({text: args[start : i - 1], start: start, end: i - 1})
start = -1
endif
endif
i += 1
endfor
if start >= 0
tokens->add({text: args[start :], start: start, end: i - 1})
endif
return tokens
enddef
def BuildBreakpointCommand(at: string, tbreak=false): string
var args = trim(at)
var cmd = '-break-insert'
if tbreak
cmd ..= ' -t'
endif
if empty(args)
return $'{cmd} {DefaultBreakpointLocation()}'
endif
var condition = ''
var prefix = args
for token in TokenizeBreakpointArguments(args)
if token.text == 'if' && token.end < strchars(args) - 1
condition = trim(args[token.end + 1 :])
prefix = token.start > 0 ? trim(args[: token.start - 1]) : ''
break
endif
endfor
var prefix_tokens = TokenizeBreakpointArguments(prefix)
var location = prefix
var thread = ''
if len(prefix_tokens) >= 2
&& prefix_tokens[-2].text == 'thread'
&& prefix_tokens[-1].text =~ '^\d\+$'
thread = prefix_tokens[-1].text
location = join(prefix_tokens[: -3]->mapnew('v:val.text'), ' ')
endif
if empty(trim(location))
location = DefaultBreakpointLocation()
endif
if !empty(thread)
cmd ..= $' -p {thread}'
endif
if !empty(condition)
cmd ..= $' -c {QuoteArg(condition)}'
endif
return $'{cmd} {trim(location)}'
enddef
# :Until - Execute until past a specified position or current line
def Until(at: string)
@@ -1620,15 +1701,7 @@ def SetBreakpoint(at: string, tbreak=false)
sleep 10m
endif
# Use the fname:lnum format, older gdb can't handle --source.
var fname = Remote2LocalPath(expand('%:p'))
var AT = empty(at) ? QuoteArg($"{fname}:{line('.')}") : at
var cmd = ''
if tbreak
cmd = $'-break-insert -t {AT}'
else
cmd = $'-break-insert {AT}'
endif
var cmd = BuildBreakpointCommand(at, tbreak)
SendCommand(cmd)
if do_continue
ContinueCommand()

View File

@@ -1,6 +1,8 @@
" Vim plugin for using Vim as manpager.
" Maintainer: Enno Nagel <ennonagel+vim@gmail.com>
" Last Change: 2024 Jul 03
" 2026 Mar 22 by Vim Project: strip OSC 9 sequences (#19787)
" 2026 Mar 24 by Vim Project: strip Bell char: Ctrl-G (#19807)
if exists('g:loaded_manpager_plugin')
finish
@@ -32,6 +34,9 @@ function s:ManPager()
" Remove ansi sequences
exe 'silent! keepj keepp %s/\v\e\[%(%(\d;)?\d{1,2})?[mK]//e' .. (&gdefault ? '' : 'g')
" Remove OSC 8 hyperlink sequences: \e]8;;...\e\ or \e]8;;...<BEL>
exe 'silent! keepj keepp %s/\v\e\]8;[^\x07\e]*%(%x07|\e\\)//e' .. (&gdefault ? '' : 'g')
" Remove empty lines above the header
call cursor(1, 1)
let n = search(".*(.*)", "c")

469
runtime/syntax/algol68.vim Normal file
View File

@@ -0,0 +1,469 @@
" Vim syntax file
" Language: Algol 68
" Version: 0.4
" Maintainer: Janis Papanagnou
" Previous Maintainer: NevilleD.ALGOL_68@sgr-a.net
" Last Change: 2026 Apr 23
if exists("b:current_syntax")
finish
endif
syn sync minlines=250 maxlines=500
" Algol68 Final Report, unrevised
syn keyword algol68PreProc PRIORITY
syn keyword algol68Operator BTB CTB CONJ QUOTE CT CTAB EITHER SIGN
" Algol68 Revised Report
syn keyword algol68Boolean TRUE FALSE
syn keyword algol68Conditional IF THEN ELSE ELIF FI
syn keyword algol68Conditional CASE IN OUT OUSE ESAC
syn keyword algol68Constant NIL SKIP EMPTY
syn keyword algol68Statement MODE OP PRIO PROC
syn keyword algol68Label GOTO
syn match algol68Label "\<GO TO\>"
syn keyword algol68Operator ABS REPR ROUND ENTIER ARG BIN LENG SHORTEN ODD
syn keyword algol68Operator SHL SHR ROL ROR UP DOWN LEVEL LWB UPB I RE IM
syn keyword algol68Operator OVER MOD ELEM SET CLEAR
syn keyword algol68Operator LT LE GE GT
syn keyword algol68Operator EQ NE
syn keyword algol68Operator AND OR XOR NOT
" Genie short-circuit pseudo operators
syn keyword algol68Operator THEF ANDF ANDTH ELSF ORF OREL
syn keyword algol68Operator ANDTHEN ORELSE
syn keyword algol68Operator MINUSAB PLUSAB TIMESAB DIVAB OVERAB MODAB PLUSTO
syn keyword algol68Operator IS ISNT OF AT
syn keyword algol68Operator SORT ELEMS
syn keyword algol68Repeat FOR FROM BY UPTO DOWNTO TO WHILE DO UNTIL OD
syn keyword algol68Statement PAR BEGIN END EXIT
syn keyword algol68Struct STRUCT
syn keyword algol68PreProc VECTOR
syn keyword algol68Type FLEX HEAP LOC LONG REF SHORT
syn keyword algol68Type VOID BOOL INT REAL COMPL CHAR STRING COMPLEX
syn keyword algol68Type BITS BYTES FILE CHANNEL PIPE SEMA SOUND
syn keyword algol68Type FORMAT STRUCT UNION
" Genie extensions in addition to ROUND and ENTIER
syn keyword algol68Operator FLOOR CEIL NINT TRUNC FRAC FIX
" 20011222az: Added new items.
syn keyword algol68Todo contained TODO FIXME XXX DEBUG NOTE
" String
syn region algol68String matchgroup=algol68String start=+"+ end=+"+ contains=algol68StringEscape
syn match algol68StringEscape contained '""'
syn match algol68StringEscape contained "\\$"
syn match algol68Identifier "\<[a-z][a-z0-9_]*\>"
if exists("algol68_symbolic_operators")
syn match algol68SymbolOperator "\\"
syn match algol68SymbolOperator ":=\|="
syn match algol68SymbolOperator "[~^]"
syn match algol68SymbolOperator "[~^]="
syn match algol68SymbolOperator "[<>]"
syn match algol68SymbolOperator "[<>]="
syn match algol68SymbolOperator "\%([-+*%/]\|%\*\)"
syn match algol68SymbolOperator "\%([-+*%/]\|%\*\):="
syn match algol68SymbolOperator "+=:"
syn match algol68SymbolOperator "*\*\|&"
endif
syn match algol68Number "\<\d\+\%(\s\+\d\+\)*\>"
syn match algol68Float "\c\.\d\+\%(\s\+\d\+\)*\%(\s*[e\\⏨]\s*[-+]\?\s*\d\+\%(\s\+\d\+\)*\)\?\>"
syn match algol68Float "\c\<\d\+\%(\s\+\d\+\)*\%(\s*[e\\⏨]\s*[-+]\?\s*\d\+\%(\s\+\d\+\)*\)\>"
syn match algol68Float "\c\<\d\+\%(\s\+\d\+\)*\s*\.\s*\d\+\%(\s\+\d\+\)*\%(\s*[e\\⏨]\s*[-+]\?\s*\d\+\%(\s\+\d\+\)*\)\?\>"
syn match algol68HexNumber "\c\<2r\s*[01]\+\%(\s\+[01]\+\)*\>"
syn match algol68HexNumber "\c\<4r\s*[0-3]\+\%(\s\+[0-3]\+\)*\>"
syn match algol68HexNumber "\c\<8r\s*[0-7]\+\%(\s\+[0-7]\+\)*\>"
syn match algol68HexNumber "\c\<16r\s*[0-9a-f]\+\%(\s\+[0-9a-f]\+\)*\>"
syn region algol68Special start="\$" end="\$" contains=algol68String
syn region algol68Comment start="¢" end="¢" contains=algol68Todo,algol68SpaceError
syn region algol68Comment start="£" end="£" contains=algol68Todo,algol68SpaceError
syn region algol68Comment start="#" end="#" contains=algol68Todo,algol68SpaceError
syn region algol68Comment start="\<CO\>" end="\<CO\>" contains=algol68Todo,algol68SpaceError
syn region algol68Comment start="\<COMMENT\>" end="\<COMMENT\>" contains=algol68Todo,algol68SpaceError
syn region algol68PreProc start="\<PR\>" end="\<PR\>" contains=algol68Todo,algol68SpaceError
syn region algol68PreProc start="\<PRAGMAT\>" end="\<PRAGMAT\>" contains=algol68Todo,algol68SpaceError
" algol68r
syn region algol68Comment start="{" end="}" contains=algol68Todo,algol68SpaceError
syn region algol68Comment start="{{{" end="}}}" contains=algol68Todo,algol68SpaceError
" ALGOL 68r
syn keyword algol68PreProc DECS CONTEXT configinfo A68CONFIG KEEP FINISH USE SYSPROCS IOSTATE FORALL
" ALGOL 68c
syn keyword algol68PreProc USING ENVIRON FOREACH ASSERT
if !exists("algol68_no_preludes")
" THE STANDARD ENVIRONMENT
" Enquiries
syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(blank\|formfeed\|newline\|null\|tab\|eof\)\s*char\%(acter\)\?\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(max\s*abs\|exp\|error\)\s*char\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(\%(long\s*\)\?long\s*\)\?max\s*\%(bits\|int\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(\%(long\s*\)\?long\s*\)\?\%(max\|min\|small\)\s*real\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(\%(\%(long\s*\)\?long\s*\)\?\%(bits\|bytes\|exp\|int\|real\)\s*width\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(bits\|bytes\|compl\|int\|real\)\s*\%(lengths\|shorths\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(blank\|flip\|flop\)\>\%(\s*[a-z0-9]\)\@!"
" Transput Files and Channels
syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<stand\s*\%(in\|out\|back\|error\)\%(\s*channel\)\?\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<stand\s*draw\s*channel\>\%(\s*[a-z0-9]\)\@!"
" Transput Event Routines
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<on\s*\%(\%(line\|page\|\%(logical\s*\|physical\s*\)\?file\|format\)\s*\)end\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<on\s*\%(\%(format\|value\|open\|transput\)\s*\)error\>\%(\s*[a-z0-9]\)\@!"
" Connections to Files
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(open\|establish\|append\|create\|associate\|close\|lock\|erase\|scratch\)\>\%(\s*[a-z0-9]\)\@!"
" Positioning on Files
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<new\s*line\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<new\s*page\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<back\s*space\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(reset\|rewind\|rewrite\|set\|seek\|space\)\>\%(\s*[a-z0-9]\)\@!"
" I/O on Files (Standard)
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(get\|put\|print\|read\|write\)\%(f\|\s*bin\)\?\>\%(\s*[a-z0-9]\)\@!"
" I/O on Files (Algol68C)
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(print\|read\)\s*\%(\%(long\s*\)\?long\s*\)\?\%(int\|real\|complex\|bits\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(print\|read\)\s*\%(bool\|char\|string\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<read\s*line\>\%(\s*[a-z0-9]\)\@!"
" Enquiries on Files
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(get\|put\|bin\|set\|reset\|rewind\|reidf\|draw\)\s*possible\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<end\s*of\s*\%(file\|line\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(make\s*\)\?term\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(compressible\|eof\|eoln\)\>\%(\s*[a-z0-9]\)\@!"
" Keyboard Control
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(cooked\|raw\)\>\%(\s*[a-z0-9]\)\@!"
" Math Constants
syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(\%(long\s*\)\?long\s*\)\?\%(min\s*real\|\%(minus\s*\)\?infinity\|\%(min\s*\)\?inf\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(\%(\%(long\s*\)\?long\s*\)\|[qd]\)\?pi\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<mp\s*radix\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<nan\>\%(\s*[a-z0-9]\)\@!"
" Math Basic Functions
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\%([a-z0-9]\s\+\)\@8<!\<\%(\%(\%(long\s*\)\?long\s*\)\|[qd]\)\?\%(sqrt\|cbrt\|curt\|exp\|ln\|log\)\>\%(\s*[a-z0-9]\)\@!\%(\s\{1,7}[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<ln\s*abs\>\%(\s*[a-z0-9]\)\@!"
" Math Trigonometric Functions
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(\%(\%(long\s*\)\?long\s*\)\|[qd]\)\?\%(arc\s*\|a\)\?\%(sin\|cos\|tan\|cot\|sec\|csc\|cas\)\%(h\|\%(\s*dg\)\)\?\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(\%(\%(long\s*\)\?long\s*\)\|[qd]\)\?\%(arc\s*\|a\)\?tan2\%(\s*dg\)\?\>\%(\s*[a-z0-9]\)\@!"
" long-long-sinpi/cospi/tanpi/cotpi
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(\%(\%(long\s*\)\?long\s*\)\|[qd]\)\?\%(sin\|cos\|tan\|cot\)\s*pi\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<ln\s*\%(sinh\|cosh\)\>\%(\s*[a-z0-9]\)\@!"
" a special case in Genie?
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<atan\s*int\>\%(\s*[a-z0-9]\)\@!"
" Random Number Generator
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(\%(long\s*\)\?long\s*\)\?\%(next\s*\)\?random\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<first\s*random\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<rnd\>\%(\s*[a-z0-9]\)\@!"
" Garbage Collection and Memory
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<collect\s*seconds\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<garbage\%(\s*\%(collections\|freed\|refused\|seconds\)\)\?\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<gc\s*heap\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<on\s*gc\s*event\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<preemptive\s*\%(gc\|sweep\%(\s*heap\)\?\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<sweep\s*heap\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<sweeps\%(\s*refused\)\?\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(system\s*\)\?\%(heap\|stack\)\s*pointer\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(actual\|system\)\s*stack\s*size\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(blocks\|collections\)\>\%(\s*[a-z0-9]\)\@!"
" I/O on Strings
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(puts\|gets\|string\)f\?\>\%(\s*[a-z0-9]\)\@!"
" Character Type Tests
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<is\s*\%(alnum\|alpha\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\)\>\%(\s*[a-z0-9]\)\@!"
" Operations on Characters
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<to\s*\%(upper\|lower\)\>\%(\s*[a-z0-9]\)\@!"
" Search in Strings
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(char\|last\s*char\|string\)\s*in\s*string\>\%(\s*[a-z0-9]\)\@!"
" Time and Date
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(cpu\|wall\|utc\|local\)\s*time\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(wall\s*\)\?clock\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(wall\s*\)\?seconds\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<sleep\>\%(\s*[a-z0-9]\)\@!"
" Type Operations
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(long\s*\)\?\%(bits\|bytes\)\s*pack\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(long\s*long\s*\)\?bits\s*pack\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\%([a-z0-9]\s\+\)\@8<!\<\%(bits\|whole\|fixed\|float\|real\)\>\%(\s*[a-z0-9]\)\@!\%(\s*[a-z0-9]\)\@!"
" Runtime
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(program\s*\)\?idf\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(backtrace\|break\|debug\|monitor\|abend\|evaluate\|system\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(i32\|i64\|r64\|r128\)mach\>\%(\s*[a-z0-9]\)\@!"
" UNIX EXTENSIONS
" Environment Functions
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(a68g\s*\)\?\%(argc\|argv\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<get\s*env\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<reset\s*errno\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<str\s*error\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(get\|set\)\s*pwd\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(rows\|columns\|abend\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<errno\>\%(\s*[a-z0-9]\)\@!"
" Processes
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<execve\%(\s*child\%(\s*pipe\)\?\|\s*output\)\?\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<exec\%(\s*sub\%(\s*pipeline\|\s*output\)\?\)\?\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<fork\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<wait\s*pid\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<create\s*pipe\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<peek\s*char\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<sig\s*segv\>\%(\s*[a-z0-9]\)\@!"
" File types and attributes
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<file\s*is\s*\%(block\s*device\|char\s*device\|directory\|regular\|fifo\|link\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<file\s*mode\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<get\s*directory\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<real\s*path\>\%(\s*[a-z0-9]\)\@!"
" Fetching web page contents and sending requests
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<https\?\s*\%(content\|timeout\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<tcp\s*request\>\%(\s*[a-z0-9]\)\@!"
" Regular expressions in string manipulation
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<grep\s*in\s*\%(sub\)\?string\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<sub\s*in\s*string\>\%(\s*[a-z0-9]\)\@!"
" Curses support
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<curses\s*\%(start\|end\|clear\|refresh\|get\s*char\|put\s*char\|move\|lines\|columns\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<curses\s*\%(green\|cyan\|red\|yellow\|magenta\|blue\|white\)\%(\s*inverse\)\?\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<curses\s*del\s*char\>\%(\s*[a-z0-9]\)\@!"
" POSTGRESQL CLIENT ROUTINES
" Connecting to a server
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<pq\s*\%(connect\s*db\|finish\|reset\|parameter\s*status\)\>\%(\s*[a-z0-9]\)\@!"
" Sending queries and retrieving results
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<pq\s*\%(exec\|ntuples\|nfields\|fname\|fnumber\|fformat\|get\s*is\s*null\|get\s*value\|cmd\s*status\|cmd\s*tuples\)\>\%(\s*[a-z0-9]\)\@!"
" Connection status information
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<pq\s*\%(\%(result\s*\)\?error\s*message\|db\|user\|pass\|host\|port\|tty\|options\|\%(protocol\|server\)\s*version\|socket\|backend\s*pid\)\>\%(\s*[a-z0-9]\)\@!"
" SOUND
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(new\|get\|set\)\s*sound\>\%(\s*[a-z0-9]\)\@!"
syn keyword algol68Operator RESOLUTION CHANNELS RATE SAMPLES
" DRAWING USING THE GNU PLOTTING UTILITIES
" Setting up a graphics device
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<draw\s*\%(device\|erase\|show\|move\|aspect\|fill\s*style\|line\s*style\|line\s*width\|clear\|flush\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<make\s*device\>\%(\s*[a-z0-9]\)\@!"
" Specifying colours
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<draw\s*\%(\%(background\s*\)\?colou\?r\%(\s*name\)\?\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<draw\s*get\s*colou\?r\s*name\>\%(\s*[a-z0-9]\)\@!"
" Drawing objects
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<draw\s*\%(point\|line\|rect\|circle\|ball\|star\)\>\%(\s*[a-z0-9]\)\@!"
" Drawing text
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<draw\s*\%(text\%(\s*angle\)\?\|font\s*\%(name\|size\)\)\>\%(\s*[a-z0-9]\)\@!"
" EXTRA NUMERICAL PROCEDURES
" COMPLEX Functions
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(\%(\%(long\s*\)\?long\s*\)\|[qd]\)\?c\%(omplex\s*\)\?\%(sqrt\|exp\|ln\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(\%(long\s*\)\?long\s*\)\?complex\s*\%(arc\s*\)\?\%(sin\|cos\|tan\)h\?\>\%(\s*[a-z0-9]\)\@!"
" cas casin casinh dcas dcasin dcasinh qcas qcasin qcasinh longcas longlongcas
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(\%(\%(long\s*\)\?long\s*\)\|[dq]\?\)ca\?\%(sin\|cos\|tan\)h\?\>\%(\s*[a-z0-9]\)\@!"
" a special case in Genie?
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<long\s*complex\s*atanh\>\%(\s*[a-z0-9]\)\@!"
" REAL Airy Functions
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<airy\s*[ab]i\%(\s*deriv\)\?\%(\s*scaled\)\?\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<airy\s*[ab]i\%(\s*derivative\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<airy\s*zero\s*[ab]i\%(\s*deriv\)\?\>\%(\s*[a-z0-9]\)\@!"
" REAL Bessel Functions
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<bessel\s*\%(jn\|yn\|in\|exp\s*in\|kn\|exp\s*kn\|jl\|yl\|exp\s*il\|exp\s*kl\|jnu\|ynu\|inu\|exp\s*inu\|knu\|exp\s*knu\)\>\%(\s*[a-z0-9]\)\@!"
" only a few could be sensibly merged; we keep them apart
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<bessel\s*\%(il[012]\?\s*scaled\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<bessel\s*\%(in[01]\%(\s*scaled\)\?\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<bessel\s*\%(in\s*u\?\s*scaled\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<bessel\s*\%(j\%(\l[012]\|n[01]\)\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<bessel\s*\%(kl[012]\?\s*scaled\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<bessel\s*\%(kn[01]\%(\s*scaled\)\?\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<bessel\s*\%(kn\s*[u_]\?\s*scaled\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<bessel\s*ln\s*knu\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<bessel\s*\%(y\%(\l[012]\|n[01]\)\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<bessel\s*zero\s*j\%([01]\|nu\)\>\%(\s*[a-z0-9]\)\@!"
" REAL Elliptic Integrals
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<elliptic\s*integral\s*\%(k\|e\|rf\<rd\|rj\|rc\)\>\%(\s*[a-z0-9]\)\@!"
" REAL Error and Gamma Functions
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(ln\s*\)\?\%(fact\|choose\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<prime\s*factors\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(\%(\%(long\s*\)\?long\s*\)\|[qd]\)\?\%(inv\%(erse\)\?\s*\)\?erfc\?\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<mpfr\s*\%(\%(\%(long\s*\)\?long\s*\)\|q\)\?\%(inv\s*\)\?erfc\?\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(\%(\%(\%(mpfr\s*\)\?long\s*\)\?long\s*\)\|\%(d\|\%(mpfr\s*\)\?q\)\)\?\%(beta\|gamma\)\%(\s*inc\s*g\?f\?\)\?\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<beta\s*inc\s*gsl\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(\%(\%(\%(mpfr\s*\)\?long\s*\)\?long\s*\)\|\%(d\|\%(mpfr\s*\)\?q\)\)\?ln\s*\%(beta\|gamma\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<mpfr\s*mp\>\%(\s*[a-z0-9]\)\@!"
" is the following a special case in Genie?
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<mpfr\s*\%(long\s*\|d\)gamma\s*inc\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "gamma\s*\%(\%(inc\s*\%(gsl\|[pq]\)\)\|inv\|star\)\>\%(\s*\%([a-z_]\|\l\d\+\)\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<lj[ef]\s*126\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<ln1p\>\%(\s*[a-z0-9]\)\@!"
" Scaling Factors
" strangely missing some common factors (hecto, deca, deci, centi),
" also myria, and the more extreme factors (quetta, ronna, ronto, quecto)
syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<num\s*\%(yotta\|zetta\|exa\|peta\|tera\|giga\|mega\|kilo\|milli\|micro\|nano\|pico\|femto\|atto\|zepto\|yocto\)\>\%(\s*[a-z0-9]\)\@!"
" Physical Constants
" Fundamental Constants
syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(cgs\|mksa\)\s*\%(boltzmann\|faraday\|gauss\|hectare\|\%(kilometers\|miles\)\s*per\s*hour\|micron\|molar\s*gas\|planck\s*constant\%(\s*bar\)\?\|speed\s*of\s*light\|standard\s*gas\s*volume\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<mksa\s*vacuum\s*\%(permeability\|permittivity\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<num\s*avogadro\>\%(\s*[a-z0-9]\)\@!"
" Astronomy and Astrophysics
syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(cgs\|mksa\)\s*\%(astronomical\s*unit\|grav\s*accel\|gravitational\s*constant\|light\s*year\|parsec\|solar\s*mass\)\>\%(\s*[a-z0-9]\)\@!"
" Atomic and Nuclear Physics
syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(cgs\|mksa\)\s*\%(angstrom\|barn\|bohr\s*magneton\|bohr\s*radius\|electron\s*\%(charge\|magnetic\s*moment\|volt\)\|mass\s*\%(electron\|muon\|neutron\|proton\)\|nuclear\s*magneton\|proton\s*magnetic\s*moment\|rydberg\|unified\s*atomic\s*mass\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<num\s*fine\s*structure\>\%(\s*[a-z0-9]\)\@!"
" Time
syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(cgs\|mksa\)\s*\%(day\|hour\|minute\|week\)\>\%(\s*[a-z0-9]\)\@!"
" Imperial units
syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(cgs\|mksa\)\s*\%(foot\|inch\|mil\|mile\|yard\|\%(tex\)\?point\)\>\%(\s*[a-z0-9]\)\@!"
" Nautical units
syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(cgs\|mksa\)\s*\%(fathom\|knot\|nautical\s*mile\)\>\%(\s*[a-z0-9]\)\@!"
" Volume
syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(cgs\|mksa\)\s*\%(acre\|\%(canadian\|uk\|us\)\s*gallon\|liter\|pint\|quart\|cup\|fluid\s*ounce\|\%(table\|tea\)\s*spoon\)\>\%(\s*[a-z0-9]\)\@!"
" Mass and weight
syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(cgs\|mksa\)\s*\%(carat\|\%(gram\|\%(kilo\s*\)\?pound\)\s*force\|\%(metric\s*\|uk\s*\)\?ton\|\%(ounce\|pound\)\s*mass\|poundal\|troy\s*ounce\)\>\%(\s*[a-z0-9]\)\@!"
" Thermal energy and power
syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(cgs\|mksa\)\s*\%(btu\|calorie\|horsepower\|therm\)\>\%(\s*[a-z0-9]\)\@!"
" Pressure
syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(cgs\|mksa\)\s*\%(bar\|inch\s*of\s*\%(mercury\|water\)\|meter\s*of\s*mercury\|psi\|std\s*atmosphere\|torr\)\>\%(\s*[a-z0-9]\)\@!"
" Viscosity
syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(cgs\|mksa\)\s*\%(poise\|stokes\)\>\%(\s*[a-z0-9]\)\@!"
" Light and illumination
syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(cgs\|mksa\)\s*\%(foot\s*candle\|foot\s*lambert\|lambert\|lumen\|lux\|phot\|stilb\)\>\%(\s*[a-z0-9]\)\@!"
" Radioactivity
syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(cgs\|mksa\)\s*\%(curie\|rad\|roentgen\)\>\%(\s*[a-z0-9]\)\@!"
" Force and energy
syn match algol68Predefined "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(cgs\|mksa\)\s*\%(dyne\|erg\|joule\|newton\)\>\%(\s*[a-z0-9]\)\@!"
" Functions from GSL
syn keyword algol68Operator CV RV T INV PINV MEAN DET TRACE NORM DYAD BEFORE ABOVE
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<angle\s*restrict\s*\%(pos\|symm\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<conical\s*p\s*\%([01]\|cylreg\|m\?half\|sph\s*reg\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<cholesky\s*\%(decomp\|solve\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<debye\s*[1-6]\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<ellint\s*\%([defp]\|[ekp]\s*comp\|r[cdfj]\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(expint\s*\%(3\|e[12in]\)\|expm1\|exprel[2n]\?\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<fermi\s*dirac\s*\%([012]\|3\?half\|inc0\|int\|m1\|mhalf\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<fft\s*\%(complex\s*\)\?\%(forward\|backward\|inverse\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(gegenpoly\|laguerre\)\s*[123n]\s*real\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<lambert\s*\%(w0\|wm1\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<legendre\s*\%(h3d\%([01]\)\?\|p[123l]\|q[01l]\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<pseudo\s*inv\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<psi\s*\%(1\%(\s*int\|\s*piy\)\?\|int\|n\)\?\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<synchrotron\s*[12]\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<taylor\s*coeff\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<transport\s*[2-5]\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<zeta\%(\s*m1\)\?\%(\s*int\)\?\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(chi\|ci\|clausen\|dawson\|digamma\|dilog\|\%(ln\s*\)\?doublefact\|eta\|eta\s*int\|hermite\s*func\|hypot\|hzeta\|laplace\|shi\|si\|sinc\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<ln1\s*\%(plusx\%(mx\)\?\)\?\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(compl\s*\)\?\%(matrix\|vector\)\s*echo\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<print\s*\%(matrix\|vector\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(complex\s*\)\?lu\s*\%(decomp\|det\|inv\|solve\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<left\s*columns\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(ols\|tls\|pcacv\|pcasvd\|pcr\|pls[12]\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<\%(ln\s*poch\|poch\s*\%(rel\)\?\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<qr\s*\%(decomp\|\%(ls\s*\)\?solve\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<svd\s*\%(decomp\|solve\)\>\%(\s*[a-z0-9]\)\@!"
" Functions from R Mathlib
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<r\s*[dpqr]n\?\s*binom\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<r\s*\%(di\|tri\|tetra\|penta\|psi\)\s*gamma\>\%(\s*[a-z0-9]\)\@!"
" note: Genie documents 'r rn chisq' but it's missing in the code?
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<r\s*[dpqr]n\?\s*chisq\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<r\s*[dpqr]\%(\s*n\)\?\s*f\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<r\s*[dpq]\%(\s*n\)\?\s*t\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<r\s*[dpqr]\s*\%(l\s*\)\?norm\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<r\s*[dpqr]\s*\%(beta\|cauchy\|exp\|geom\|hyper\|logis\|pois\|sign\s*rank\|t\|unif\|weibull\|wilcox\)\>\%(\s*[a-z0-9]\)\@!"
syn match algol68Function "\%(\%([a-z_]\|\l\d\+\)\s\+\)\@8<!\<r\s*[pq]\s*tu\s*key\>\%(\s*[a-z0-9]\)\@!"
endif
" Define the default highlighting.
hi def link algol68Boolean Boolean
hi def link algol68Comment Comment
hi def link algol68Conditional Conditional
hi def link algol68Constant Constant
hi def link algol68Float Float
hi def link algol68Function Function
hi def link algol68Label Label
hi def link algol68MatrixDelimiter Identifier
hi def link algol68HexNumber Number
hi def link algol68Number Number
hi def link algol68Operator Operator
hi def link algol68Predefined Identifier
hi def link algol68PreProc PreProc
hi def link algol68Repeat Repeat
hi def link algol68SpaceError Error
hi def link algol68Statement Statement
hi def link algol68String String
hi def link algol68StringEscape Special
hi def link algol68Struct algol68Statement
hi def link algol68SymbolOperator algol68Operator
hi def link algol68Todo Todo
hi def link algol68Type Type
hi def link algol68ShowTab Error
let b:current_syntax = "algol68"
" vim: ts=8 sw=2

View File

@@ -1,89 +1,303 @@
" Vim syntax file
" Language: AmigaDos
" Maintainer: This runtime file is looking for a new maintainer.
" Former Maintainer: Charles E. Campbell
" Last Change: Aug 31, 2016
" Version: 10
" Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_AMIGA
" Language: AmigaDOS
" Maintainer: Ola Söder <rolfkopman@gmail.com>
" First Author: Charles E. Campbell
" Last Change: 2026 Mar 25
" Version: 11
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
finish
endif
syn case ignore
" Amiga Devices
syn match amiDev "\(par\|ser\|prt\|con\|nil\):"
" Directives
syn match amiDirective "^\.\(key\|k\)\>.*$" contains=amiTemplate
syn match amiDirective "^\.\(bra\|ket\|dot\|dollar\|dol\|def\|default\)\>.*$"
" Amiga aliases and paths
syn match amiAlias "\<[a-zA-Z][a-zA-Z0-9]\+:"
syn match amiAlias "\<[a-zA-Z][a-zA-Z0-9]\+:[a-zA-Z0-9/]*/"
" Template arguments
syn match amiTemplate contained "/[AKSNMF]\>"
" strings
syn region amiString start=+"+ end=+"+ oneline contains=@Spell
" Strings
syn region amiString start=+"+ end=+"+ oneline contains=amiEscape,amiVar,amiSubst,@Spell
" numbers
syn match amiNumber "\<\d\+\>"
" Escape sequences
syn match amiEscape contained "\*[nNeE"*]"
" Logic flow
syn region amiFlow matchgroup=Statement start="if" matchgroup=Statement end="endif" contains=ALL
syn keyword amiFlow skip endskip
syn match amiError "else\|endif"
syn keyword amiElse contained else
" Numbers
syn match amiNumber "\<\d\+\>"
syn keyword amiTest contained not warn error fail eq gt ge val exists
" Variables
syn match amiVar "\$[a-zA-Z_][a-zA-Z0-9_]*"
syn match amiVar "\$\$"
" echo exception
syn region amiEcho matchgroup=Statement start="\<echo\>" end="$" oneline contains=amiComment
syn region amiEcho matchgroup=Statement start="^\.[bB][rR][aA]" end="$" oneline
syn region amiEcho matchgroup=Statement start="^\.[kK][eE][tT]" end="$" oneline
" Parameters
syn region amiSubst start="<\a" end=">" oneline contains=amiVar
syn match amiSubst "<\$\$>"
" commands
syn keyword amiKey addbuffers copy fault join pointer setdate
syn keyword amiKey addmonitor cpu filenote keyshow printer setenv
syn keyword amiKey alias date fixfonts lab printergfx setfont
syn keyword amiKey ask delete fkey list printfiles setmap
syn keyword amiKey assign dir font loadwb prompt setpatch
syn keyword amiKey autopoint diskchange format lock protect sort
syn keyword amiKey avail diskcopy get magtape quit stack
syn keyword amiKey binddrivers diskdoctor getenv makedir relabel status
syn keyword amiKey bindmonitor display graphicdump makelink remrad time
syn keyword amiKey blanker iconedit more rename type
syn keyword amiKey break ed icontrol mount resident unalias
syn keyword amiKey calculator edit iconx newcli run unset
syn keyword amiKey cd endcli ihelp newshell say unsetenv
syn keyword amiKey changetaskpri endshell info nocapslock screenmode version
syn keyword amiKey clock eval initprinter nofastmem search wait
syn keyword amiKey cmd exchange input overscan serial wbpattern
syn keyword amiKey colors execute install palette set which
syn keyword amiKey conclip failat iprefs path setclock why
" Devices / assigns / paths
syn match amiPath "\<[a-zA-Z][a-zA-Z0-9]*:[^ \t]*"
" comments
syn cluster amiCommentGroup contains=amiTodo,@Spell
syn case ignore
syn keyword amiTodo contained todo
syn case match
syn match amiComment ";.*$" contains=amiCommentGroup
" Redirection
syn match amiOperator ">>"
syn match amiOperator "[<>|]"
" sync
syn sync lines=50
" Control flow
syn region amiIfBlock matchgroup=amiConditional start="\<IF\>" matchgroup=amiConditional end="\<ENDIF\>" contains=ALLBUT,amiIfError
syn keyword amiIfError ELSE ENDIF
syn keyword amiElse contained ELSE
syn keyword amiConditional SKIP ENDSKIP
syn keyword amiLabel LAB
syn keyword amiRepeat FOREACH
" Conditions
syn keyword amiCondition contained NOT WARN ERROR FAIL EQ GT GE VAL EXISTS
" Echo
syn region amiEcho matchgroup=amiCommand start="\<echo\>" end="$" oneline contains=amiComment,amiVar,amiSubst,amiBacktick,amiEscape
" Commands
syn keyword amiCommand ADDAUDIOMODES
syn keyword amiCommand ADDBUFFERS
syn keyword amiCommand ADDDATATYPES
syn keyword amiCommand ADDMONITOR
syn keyword amiCommand ADDNETINTERFACE
syn keyword amiCommand ADDNETROUTE
syn keyword amiCommand ALIAS
syn keyword amiCommand APPLISTINFO
syn keyword amiCommand ARP
syn keyword amiCommand ASK
syn keyword amiCommand ASSIGN
syn keyword amiCommand AVAIL
syn keyword amiCommand BINDDRIVERS
syn keyword amiCommand BINDMONITOR
syn keyword amiCommand BREAK
syn keyword amiCommand BUILDMAPTABLE
syn keyword amiCommand CACHESTAT
syn keyword amiCommand CD
syn keyword amiCommand CHANGETASKPRI
syn keyword amiCommand CHARSETCONVERT
syn keyword amiCommand CLIP
syn keyword amiCommand CLOCK
syn keyword amiCommand CMD
syn keyword amiCommand CONCLIP
syn keyword amiCommand CONFIGURENETINTERFACE
syn keyword amiCommand COPY
syn keyword amiCommand COUNTLINES
syn keyword amiCommand CPU
syn keyword amiCommand CROSSDOS
syn keyword amiCommand CUT
syn keyword amiCommand DATE
syn keyword amiCommand DELETE
syn keyword amiCommand DELETENETROUTE
syn keyword amiCommand DIR
syn keyword amiCommand DISKCHANGE
syn keyword amiCommand DISKCOPY
syn keyword amiCommand DISKDOCTOR
syn keyword amiCommand DISMOUNT
syn keyword amiCommand ENDCLI
syn keyword amiCommand ENDSHELL
syn keyword amiCommand EVAL
syn keyword amiCommand EXECUTE
syn keyword amiCommand FAILAT
syn keyword amiCommand FAULT
syn keyword amiCommand FDTOOL
syn keyword amiCommand FILENOTE
syn keyword amiCommand FILESIZE
syn keyword amiCommand FORMAT
syn keyword amiCommand GET
syn keyword amiCommand GETENV
syn keyword amiCommand GETNETSTATUS
syn keyword amiCommand GROUP
syn keyword amiCommand HELP
syn keyword amiCommand HI
syn keyword amiCommand HISTORY
syn keyword amiCommand IHELP
syn keyword amiCommand INFO
syn keyword amiCommand INITPRINTER
syn keyword amiCommand INPUT
syn keyword amiCommand INSTALL
syn keyword amiCommand INTELLIFONT
syn keyword amiCommand IPMON
syn keyword amiCommand IPNAT
syn keyword amiCommand JOIN
syn keyword amiCommand KDEBUG
syn keyword amiCommand LAB
syn keyword amiCommand LIST
syn keyword amiCommand LOADMONDRVS
syn keyword amiCommand LOADRESOURCE
syn keyword amiCommand LOADWB
syn keyword amiCommand LOCALE
syn keyword amiCommand LOCK
syn keyword amiCommand MAKEDIR
syn keyword amiCommand MAKELINK
syn keyword amiCommand MEMSTAT
syn keyword amiCommand MORE
syn keyword amiCommand MOUNT
syn keyword amiCommand MOUNTINFO
syn keyword amiCommand MOVE
syn keyword amiCommand NETLOGVIEWER
syn keyword amiCommand NETSHUTDOWN
syn keyword amiCommand NEWCLI
syn keyword amiCommand NEWSHELL
syn keyword amiCommand OWNER
syn keyword amiCommand PATH
syn keyword amiCommand PATHPART
syn keyword amiCommand PIPE
syn keyword amiCommand POINTER
syn keyword amiCommand POOLSTAT
syn keyword amiCommand POPCD
syn keyword amiCommand PREPCARD
syn keyword amiCommand PROMPT
syn keyword amiCommand PROTECT
syn keyword amiCommand PUSHCD
syn keyword amiCommand QUIT
syn keyword amiCommand REBOOT
syn keyword amiCommand RELABEL
syn keyword amiCommand RELOADAPPLIST
syn keyword amiCommand REMOVENETINTERFACE
syn keyword amiCommand REMRAD
syn keyword amiCommand RENAME
syn keyword amiCommand REQUESTCHOICE
syn keyword amiCommand REQUESTFILE
syn keyword amiCommand REQUESTSTRING
syn keyword amiCommand RESIDENT
syn keyword amiCommand ROADSHOWCONTROL
syn keyword amiCommand RUN
syn keyword amiCommand RX
syn keyword amiCommand RXC
syn keyword amiCommand RXLIB
syn keyword amiCommand RXSET
syn keyword amiCommand SAY
syn keyword amiCommand SEARCH
syn keyword amiCommand SET
syn keyword amiCommand SETCLOCK
syn keyword amiCommand SETDATE
syn keyword amiCommand SETDOSDEBUG
syn keyword amiCommand SETENV
syn keyword amiCommand SETFONT
syn keyword amiCommand SETFONTCHARSET
syn keyword amiCommand SETKEYBOARD
syn keyword amiCommand SETMAP
syn keyword amiCommand SETPATCH
syn keyword amiCommand SHOW68LOADS
syn keyword amiCommand SHOWAPPLIST
syn keyword amiCommand SHOWNETSTATUS
syn keyword amiCommand SMARTCTL
syn keyword amiCommand SORT
syn keyword amiCommand SOUNDPLAYER
syn keyword amiCommand STACK
syn keyword amiCommand STATUS
syn keyword amiCommand SWAPCD
syn keyword amiCommand TYPE
syn keyword amiCommand UNALIAS
syn keyword amiCommand UNSET
syn keyword amiCommand UNSETENV
syn keyword amiCommand UPTIME
syn keyword amiCommand URLOPEN
syn keyword amiCommand VERSION
syn keyword amiCommand WAIT
syn keyword amiCommand WAITFORPORT
syn keyword amiCommand WBRUN
syn keyword amiCommand WBSTARTUPCTRL
syn keyword amiCommand WHICH
syn keyword amiCommand WHY
" Options
syn keyword amiOption ADD
syn keyword amiOption ALL
syn keyword amiOption APPEND
syn keyword amiOption BACK
syn keyword amiOption BODY
syn keyword amiOption BUF
syn keyword amiOption BUFFER
syn keyword amiOption CASE
syn keyword amiOption CHARSET
syn keyword amiOption CHECK
syn keyword amiOption CLEAR
syn keyword amiOption CLONE
syn keyword amiOption COPYLINKS
syn keyword amiOption DATES
syn keyword amiOption DEBUG
syn keyword amiOption DEVICE
syn keyword amiOption DIRS
syn keyword amiOption DRIVE
syn keyword amiOption FILE
syn keyword amiOption FILES
syn keyword amiOption FOLLOWLINKS
syn keyword amiOption FORCE
syn keyword amiOption FROM
syn keyword amiOption FULL
syn keyword amiOption HARD
syn keyword amiOption INTERACTIVE
syn keyword amiOption LFORMAT
syn keyword amiOption LOAD
syn keyword amiOption LOCK
syn keyword amiOption MULTI
syn keyword amiOption NAME
syn keyword amiOption NEGATIVE
syn keyword amiOption NOHEAD
syn keyword amiOption NONUM
syn keyword amiOption NOREPLACE
syn keyword amiOption NOREQ
syn keyword amiOption NUMERIC
syn keyword amiOption OFF
syn keyword amiOption ON
syn keyword amiOption PATTERN
syn keyword amiOption POSITIVE
syn keyword amiOption PREPEND
syn keyword amiOption PUBSCREEN
syn keyword amiOption QUICK
syn keyword amiOption QUIET
syn keyword amiOption REMOVE
syn keyword amiOption REPLACE
syn keyword amiOption RESET
syn keyword amiOption SAVE
syn keyword amiOption SHOW
syn keyword amiOption SINCE
syn keyword amiOption SOFT
syn keyword amiOption SORT
syn keyword amiOption SUB
syn keyword amiOption TIMEOUT
syn keyword amiOption TITLE
syn keyword amiOption TO
syn keyword amiOption UNLOCK
syn keyword amiOption UPTO
syn keyword amiOption VERBOSE
syn keyword amiOption WITH
" Comments
syn match amiComment ";.*$" contains=amiTodo,@Spell
syn match amiComment "^\.\s.*$" contains=amiTodo,@Spell
syn match amiComment "^\.$"
" Miscellaneous
syn keyword amiTodo contained TODO FIXME XXX NOTE
syn region amiBacktick start="`" end="`" oneline
" Define the default highlighting.
if !exists("skip_amiga_syntax_inits")
hi def link amiAlias Type
hi def link amiComment Comment
hi def link amiDev Type
hi def link amiEcho String
hi def link amiElse Statement
hi def link amiError Error
hi def link amiKey Statement
hi def link amiNumber Number
hi def link amiString String
hi def link amiTest Special
hi def link amiBacktick Special
hi def link amiCommand Statement
hi def link amiComment Comment
hi def link amiCondition Special
hi def link amiConditional Conditional
hi def link amiDirective PreProc
hi def link amiEcho String
hi def link amiElse Conditional
hi def link amiEscape SpecialChar
hi def link amiIfError Error
hi def link amiLabel Label
hi def link amiNumber Number
hi def link amiOperator Operator
hi def link amiOption Identifier
hi def link amiPath Type
hi def link amiRepeat Repeat
hi def link amiString String
hi def link amiSubst Special
hi def link amiTemplate Type
hi def link amiTodo Todo
hi def link amiVar Special
endif
let b:current_syntax = "amiga"
" vim:ts=15
let b:current_syntax = "amiga"

View File

@@ -3,6 +3,8 @@
" Maintainer: Michael Wong
" https://github.com/mmikeww/autohotkey.vim
" Latest Revision: 2022-07-25
" Last Change:
" 2026 Apr 20 by Vim project: remove wrong oneline keyword #20018
" Previous Maintainers: SungHyun Nam <goweol@gmail.com>
" Nikolai Weibull <now@bitwi.se>
@@ -35,7 +37,6 @@ syn region autohotkeyString
syn match autohotkeyVariable
\ display
\ oneline
\ contains=autohotkeyBuiltinVariable
\ keepend
\ '%\S\{-}%'
@@ -123,7 +124,7 @@ syn keyword autohotkeyCommand
syn keyword autohotkeyFunction
\ InStr RegExMatch RegExReplace StrLen SubStr Asc Chr Func
\ DllCall VarSetCapacity WinActive WinExist IsLabel OnMessage
\ DllCall VarSetCapacity WinActive WinExist IsLabel OnMessage
\ Abs Ceil Exp Floor Log Ln Mod Round Sqrt Sin Cos Tan ASin ACos ATan
\ FileExist GetKeyState NumGet NumPut StrGet StrPut RegisterCallback
\ IsFunc Trim LTrim RTrim IsObject Object Array FileOpen

View File

@@ -6,6 +6,8 @@
" Copyright (C) 2008 Ricardo Salveti <rsalveti@rsalveti.net>
" Last Change: 2022 Jul 25
" 2025 Oct 13 by Vim project: update multiline function syntax #18565
" 2026 Apr 07 by Vim project: update syntax script #19931
" 2026 Apr 15 by Vim project: allow forward-slashes in bitbake varflags #19983
"
" This file is licensed under the MIT license, see COPYING.MIT in
" this source distribution for the terms.
@@ -58,18 +60,18 @@ syn match bbVarValue ".*$" contained contains=bbString,bbVarDeref,bbV
syn region bbVarPyValue start=+${@+ skip=+\\$+ end=+}+ contained contains=@python
" Vars metadata flags
syn match bbVarFlagDef "^\([a-zA-Z0-9\-_\.]\+\)\(\[[a-zA-Z0-9\-_\.+]\+\]\)\@=" contains=bbIdentifier nextgroup=bbVarFlagFlag
syn match bbVarFlagDef "^\([a-zA-Z0-9\-_\.+/]\+\)\(\[[a-zA-Z0-9\-_\.+/]\+\]\)\@=" contains=bbIdentifier nextgroup=bbVarFlagFlag
syn region bbVarFlagFlag matchgroup=bbArrayBrackets start="\[" end="\]\s*\(:=\|=\|.=\|=.|+=\|=+\|?=\)\@=" contained contains=bbIdentifier nextgroup=bbVarEq
" Includes and requires
syn keyword bbInclude inherit include require contained
syn keyword bbInclude inherit inherit_defer include include_all require contained
syn match bbIncludeRest ".*$" contained contains=bbString,bbVarDeref
syn match bbIncludeLine "^\(inherit\|include\|require\)\s\+" contains=bbInclude nextgroup=bbIncludeRest
syn match bbIncludeLine "^\(inherit\|inherit_defer\|include\|include_all\|require\)\s\+" contains=bbInclude nextgroup=bbIncludeRest
" Add taks and similar
syn keyword bbStatement addtask deltask addhandler after before EXPORT_FUNCTIONS contained
syn keyword bbStatement addtask deltask addhandler after before EXPORT_FUNCTIONS addpylib contained
syn match bbStatementRest ".*$" skipwhite contained contains=bbStatement
syn match bbStatementLine "^\(addtask\|deltask\|addhandler\|after\|before\|EXPORT_FUNCTIONS\)\s\+" contains=bbStatement nextgroup=bbStatementRest
syn match bbStatementLine "^\(addtask\|deltask\|addhandler\|after\|before\|EXPORT_FUNCTIONS\|addpylib\)\s\+" contains=bbStatement nextgroup=bbStatementRest
" OE Important Functions
syn keyword bbOEFunctions do_fetch do_unpack do_patch do_configure do_compile do_stage do_install do_package contained

View File

@@ -5,8 +5,10 @@
" Previous Maintainer: Vincent Berthoux <twinside@gmail.com>
" File Types: .cabal
" Last Change: 22 Oct 2022
" 2026 Apr 20 by Vim project: remove wrong oneline keyword #20018
"
" v1.6: Added support for foreign-libraries
" Added highlighting for various fields
" Added highlighting for various fields
" v1.5: Incorporated changes from
" https://github.com/sdiehl/haskell-vim-proto/blob/master/vim/syntax/cabal.vim
" Use `syn keyword` instead of `syn match`.
@@ -25,7 +27,7 @@
" Cabal known compiler are highlighted too.
"
" V1.2: Added cpp-options which was missing. Feature implemented
" by GHC, found with a GHC warning, but undocumented.
" by GHC, found with a GHC warning, but undocumented.
" Whatever...
"
" v1.1: Fixed operator problems and added ftdetect file
@@ -186,7 +188,7 @@ syn match cabalVersionRegionA
\ contains=cabalVersionOperator,cabalVersion
\ keepend
\ /\%(==\|\^\?>=\|<=\|<\|>\)\s*\d\+\%(\.\d\+\)*\%(\.\*\)\?\>/
" version inside `version: ...`
" version inside `version: ...`
syn match cabalVersionRegionB
\ contains=cabalStatementRegion,cabalVersionOperator,cabalVersion
\ /^\s*\%(cabal-\)\?version\s*:.*$/
@@ -198,7 +200,6 @@ syn match cabalName contained /:\@<=.*/
syn match cabalNameRegion
\ contains=cabalStatementRegion,cabalName
\ nextgroup=cabalStatementRegion
\ oneline
\ /^\c\s*name\s*:.*$/
" author region
@@ -206,7 +207,6 @@ syn match cabalAuthor contained /:\@<=.*/
syn match cabalAuthorRegion
\ contains=cabalStatementRegion,cabalStatement,cabalAuthor
\ nextgroup=cabalStatementRegion
\ oneline
\ /^\c\s*author\s*:.*$/
" maintainer region
@@ -214,7 +214,6 @@ syn match cabalMaintainer contained /:\@<=.*/
syn match cabalMaintainerRegion
\ contains=cabalStatementRegion,cabalStatement,cabalMaintainer
\ nextgroup=cabalStatementRegion
\ oneline
\ /^\c\s*maintainer\s*:.*$/
" license region
@@ -222,7 +221,6 @@ syn match cabalLicense contained /:\@<=.*/
syn match cabalLicenseRegion
\ contains=cabalStatementRegion,cabalStatement,cabalLicense
\ nextgroup=cabalStatementRegion
\ oneline
\ /^\c\s*license\s*:.*$/
" license-file region
@@ -230,7 +228,6 @@ syn match cabalLicenseFile contained /:\@<=.*/
syn match cabalLicenseFileRegion
\ contains=cabalStatementRegion,cabalStatement,cabalLicenseFile
\ nextgroup=cabalStatementRegion
\ oneline
\ /^\c\s*license-file\s*:.*$/
" tested-with region with compilers and versions
@@ -238,7 +235,6 @@ syn keyword cabalCompiler contained ghc nhc yhc hugs hbc helium jhc lhc
syn match cabalTestedWithRegion
\ contains=cabalStatementRegion,cabalStatement,cabalCompiler,cabalVersionRegionA
\ nextgroup=cabalStatementRegion
\ oneline
\ /^\c\s*tested-with\s*:.*$/
" build type keywords

View File

@@ -3,6 +3,7 @@
" Maintainer: Dave Hodder <dmh@dmh.org.uk>
" Last Change: 2021 Nov 29
" 2026 Feb 12 by Vim Project add partial support #19386
" 2026 Apr 17 by Vim Project Update to Django 5.2 version #19994
" quit when a syntax file was already loaded
if exists("b:current_syntax")
@@ -22,24 +23,23 @@ syn keyword djangoStatement contained autoescape csrf_token empty
syn keyword djangoStatement contained and as block endblock by cycle debug else elif
syn keyword djangoStatement contained extends filter endfilter firstof for
syn keyword djangoStatement contained endfor if endif ifchanged endifchanged
syn keyword djangoStatement contained ifequal endifequal ifnotequal
syn keyword djangoStatement contained endifnotequal in include load not now or
syn keyword djangoStatement contained parsed regroup reversed spaceless
syn keyword djangoStatement contained endspaceless ssi templatetag openblock
syn keyword djangoStatement contained in include load not now
syn keyword djangoStatement contained regroup reversed spaceless
syn keyword djangoStatement contained endspaceless templatetag openblock
syn keyword djangoStatement contained closeblock openvariable closevariable
syn keyword djangoStatement contained openbrace closebrace opencomment
syn keyword djangoStatement contained openbrace closebrace opencomment or
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 get_current_language noop get_available_languages
syn keyword djangoStatement contained get_current_language_bidi get_language_info plural
syn keyword djangoStatement contained translate blocktranslate endblocktranslate
syn keyword djangoStatement contained partialdef endpartialdef partial
syn keyword djangoStatement contained querystring lorem verbatim
" Django templete built-in filters
syn keyword djangoFilter contained add addslashes capfirst center cut date
syn keyword djangoFilter contained default default_if_none dictsort
syn keyword djangoFilter contained dictsortreversed divisibleby escape escapejs
syn keyword djangoFilter contained filesizeformat first fix_ampersands
syn keyword djangoFilter contained filesizeformat first
syn keyword djangoFilter contained floatformat get_digit join last length length_is
syn keyword djangoFilter contained linebreaks linebreaksbr linenumbers ljust
syn keyword djangoFilter contained lower make_list phone2numeric pluralize
@@ -48,6 +48,7 @@ syn keyword djangoFilter contained safe safeseq stringformat striptags
syn keyword djangoFilter contained time timesince timeuntil title truncatechars
syn keyword djangoFilter contained truncatewords truncatewords_html unordered_list upper urlencode
syn keyword djangoFilter contained urlize urlizetrunc wordcount wordwrap yesno
syn keyword djangoFilter contained force_escape iriencode json_script truncatechars_html
" Keywords to highlight within comments
syn keyword djangoTodo contained TODO FIXME XXX

View File

@@ -1,6 +1,7 @@
" dockerfile.vim - Syntax highlighting for Dockerfiles
" Maintainer: Honza Pokorny <https://honza.ca>
" Last Change: 2024 Dec 20
" 2026 Mar 26 by Vim Project: dockerfileShell comments (#19829)
" License: BSD
" https://docs.docker.com/engine/reference/builder/
@@ -31,7 +32,7 @@ syntax match dockerfileInstruction contained /\v<(SHELL|VOLUME)>/
syntax region dockerfileString contained start=/\v"/ skip=/\v\\./ end=/\v"/
syntax region dockerfileJSON contained keepend start=/\v\[/ skip=/\v\\\_./ end=/\v$/ contains=@JSON
syntax region dockerfileShell contained keepend start=/\v/ skip=/\v\\\_./ end=/\v$/ contains=@Shell
syntax region dockerfileShell contained keepend start=/\v/ skip=/\v\\\_.|^\s*#.*/ end=/\v$/ contains=@Shell
syntax region dockerfileValue contained keepend start=/\v/ skip=/\v\\\_./ end=/\v$/ contains=dockerfileString
syntax region dockerfileComment start=/\v^\s*#/ end=/\v$/ contains=@Spell

View File

@@ -1860,10 +1860,11 @@ syn keyword vimSynType contained include skipwhite nextgroup=vimSynIncludeClust
syn match vimSynIncludeCluster contained "@[_a-zA-Z0-9]\+\>"
" Syntax: keyword {{{2
syn cluster vimSynKeyGroup contains=@vimContinue,vimSynCchar,vimSynNextgroup,vimSynKeyOpt,vimSynContainedin
syn cluster vimSynKeyGroup contains=@vimContinue,vimSynCchar,vimSynNextgroup,vimSynKeyOpt,vimSynContainedin,vimSynKeyError
syn keyword vimSynType contained keyword skipwhite nextgroup=vimSynKeyRegion
syn region vimSynKeyRegion contained keepend matchgroup=vimGroupName start="\h\w*\>" skip=+\\\\\|\\|\|\n\s*\%(\\\|"\\ \)+ matchgroup=vimCmdSep end="|\|$" contains=@vimSynKeyGroup
syn match vimSynKeyOpt contained "\%#=1\<\%(conceal\|contained\|transparent\|skipempty\|skipwhite\|skipnl\)\>"
syn match vimSynKeyError contained "\<oneline\>"
" Syntax: match {{{2
syn cluster vimSynMtchGroup contains=@vimContinue,vimSynCchar,vimSynContains,vimSynContainedin,vimSynError,vimSynMtchOpt,vimSynNextgroup,vimSynRegPat,vimNotation,vimMtchComment
@@ -2431,6 +2432,7 @@ if !exists("skip_vim_syntax_inits")
hi def link vimSyncError vimError
hi def link vimSynConcealError vimError
hi def link vimSynError vimError
hi def link vimSynKeyError vimError
hi def link vimSynFoldlevelError vimError
hi def link vimSynIskeywordError vimError
hi def link vimSynSpellError vimError

View File

@@ -4,7 +4,7 @@
" Filenames: *.graphql *.graphqls *.gql
" URL: https://github.com/jparise/vim-graphql
" License: MIT <https://opensource.org/license/mit>
" Last Change: 2024 Dec 21
" Last Change: 2026 Apr 21
if !exists('main_syntax')
if exists('b:current_syntax')
@@ -26,8 +26,13 @@ syn match graphqlOperator "\M..." display
syn keyword graphqlBoolean true false
syn keyword graphqlNull null
syn match graphqlNumber "-\=\<\%(0\|[1-9]\d*\)\%(\.\d\+\)\=\%([eE][-+]\=\d\+\)\=\>" display
syn region graphqlString start=+"+ skip=+\\\\\|\\"+ end=+"\|$+
syn region graphqlString start=+"""+ skip=+\\"""+ end=+"""+
syn region graphqlString start=+"+ skip=+\\\\\|\\"+ end=+"\|$+ contains=graphqlEscape
syn region graphqlString start=+"""+ skip=+\\"""+ end=+"""+ contains=graphqlEscape
syn match graphqlEscape +\\["\\/bfnrt]+ contained display
syn match graphqlEscape +\\u\x\{4}+ contained display
syn match graphqlEscape +\\u{\x\+}+ contained display
syn match graphqlEscape +\\""\"+ contained display
syn keyword graphqlKeyword repeatable nextgroup=graphqlKeyword skipwhite
syn keyword graphqlKeyword on nextgroup=graphqlType,graphqlDirectiveLocation skipwhite
@@ -45,11 +50,11 @@ syn match graphqlVariable "\<\$\h\w*\>" display
syn match graphqlName "\<\h\w*\>" display
syn match graphqlType "\<_*\u\w*\>" display
" https://spec.graphql.org/October2021/#ExecutableDirectiveLocation
" https://spec.graphql.org/September2025/#ExecutableDirectiveLocation
syn keyword graphqlDirectiveLocation QUERY MUTATION SUBSCRIPTION FIELD
syn keyword graphqlDirectiveLocation FRAGMENT_DEFINITION FRAGMENT_SPREAD
syn keyword graphqlDirectiveLocation INLINE_FRAGMENT VARIABLE_DEFINITION
" https://spec.graphql.org/October2021/#TypeSystemDirectiveLocation
" https://spec.graphql.org/September2025/#TypeSystemDirectiveLocation
syn keyword graphqlDirectiveLocation SCHEMA SCALAR OBJECT FIELD_DEFINITION
syn keyword graphqlDirectiveLocation ARGUMENT_DEFINITION INTERFACE UNION
syn keyword graphqlDirectiveLocation ENUM ENUM_VALUE INPUT_OBJECT
@@ -73,6 +78,7 @@ hi def link graphqlBoolean Boolean
hi def link graphqlNull Keyword
hi def link graphqlNumber Number
hi def link graphqlString String
hi def link graphqlEscape Special
hi def link graphqlDirective PreProc
hi def link graphqlDirectiveLocation Special

View File

@@ -1,8 +1,9 @@
" Vim syntax file
" Language: Vim help file
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2025 Nov 13
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2025 Nov 13
" 2026 Apr 09 by Vim project: improve pattern for translated syntaxt.txt #19942
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@@ -306,7 +307,7 @@ hi def link helpDiffAdded Added
hi def link helpDiffChanged Changed
hi def link helpDiffRemoved Removed
if has('textprop') && expand('%:p') =~ '[/\\]doc[/\\]syntax.txt'
if has('textprop') && expand('%:p') =~? '[/\\]doc[/\\]syntax.\(txt\|\a\ax\)$'
" highlight groups with their respective color
import 'dist/vimhelp.vim'
call vimhelp.HighlightGroups()

View File

@@ -3,7 +3,7 @@
" Maintainer: Aliaksei Budavei <0x000c70 AT gmail DOT com>
" Former Maintainer: Claudio Fleiner <claudio@fleiner.com>
" Repository: https://github.com/zzzyxwvut/java-vim.git
" Last Change: 2026 Feb 06
" Last Change: 2026 Mar 22
" Please check ":help java.vim" for comments on some of the options
" available.
@@ -381,7 +381,7 @@ endif
exec 'syn match javaUserLabel "^\s*\<\K\k*\>\%(\<default\>\)\@' . s:ff.Peek('7', '') . '<!\s*::\@!"he=e-1'
if s:ff.IsAnyRequestedPreviewFeatureOf([455, 488, 507])
if s:ff.IsAnyRequestedPreviewFeatureOf([455, 488, 507, 530])
syn region javaLabelRegion transparent matchgroup=javaLabel start="\<case\>" matchgroup=NONE end=":\|->" contains=javaBoolean,javaNumber,javaCharacter,javaString,javaConstant,@javaClasses,javaGenerics,javaType,javaLabelDefault,javaLabelVarType,javaLabelWhenClause
else
syn region javaLabelRegion transparent matchgroup=javaLabel start="\<case\>" matchgroup=NONE end=":\|->" contains=javaLabelCastType,javaLabelNumber,javaCharacter,javaString,javaConstant,@javaClasses,javaGenerics,javaLabelDefault,javaLabelVarType,javaLabelWhenClause

View File

@@ -1,18 +1,12 @@
" Vim syntax file
" Language: JavaScript
" Maintainer: Claudio Fleiner <claudio@fleiner.com>
" Updaters: Scott Shattuck (ss) <ss@technicalpursuit.com>
" URL: http://www.fleiner.com/vim/syntax/javascript.vim
" Changes: (ss) added keywords, reserved words, and other identifiers
" (ss) repaired several quoting and grouping glitches
" (ss) fixed regex parsing issue with multiple qualifiers [gi]
" (ss) additional factoring of keywords, globals, and members
" Last Change: 2022 Jun 09
" 2013 Jun 12: adjusted javaScriptRegexpString (Kevin Locke)
" 2018 Apr 14: adjusted javaScriptRegexpString (LongJohnCoder)
" 2024 Aug 14: fix a few stylistic issues (#15480)
" 2025 Aug 07: as is a reserved keyword (#17912)
" 2025 Sep 24: using is a reserved keyword (Devin Weaver)
" Language: JavaScript
" Maintainer: This runtime file is looking for a maintainer.
" Previous Maintainer: Claudio Fleiner <claudio@fleiner.com>
" Contributors: Scott Shattuck <ss@technicalpursuit.com>
" Kevin Locke
" LongJohnCoder
" Devin Weaver
" Last Change: 2026 Apr 26
" tuning parameters:
" unlet javaScript_fold
@@ -52,7 +46,14 @@ syn match javaScriptNumber "\<\d\+\(_\d\+\)*[eE][+-]\?\d\+\>"
syn match javaScriptNumber "\<[1-9]\d*\(_\d\+\)*\(\.\(\d\+\(_\d\+\)*\([eE][+-]\?\d\+\)\?\)\?\)\?\>"
syn match javaScriptNumber "\<\(\d\+\(_\d\+\)*\)\?\.\d\+\(_\d\+\)*\([eE][+-]\?\d\+\)\?\>"
syn match javaScriptNumber "\<\d\+\(_\d\+\)*\.\(\d\+\(_\d\+\)*\([eE][+-]\?\d\+\)\?\)\?\>"
syn region javaScriptRegexpString start=+[,(=+]\s*/[^/*]+ms=e-1,me=e-1 skip=+\\\\\|\\/+ end=+/[gimuys]\{0,2\}\s*$+ end=+/[gimuys]\{0,2\}\s*[+;.,)\]}]+me=e-1 end=+/[gimuys]\{0,2\}\s\+\/+me=e-1 contains=@htmlPreproc,javaScriptComment oneline
syn region javaScriptRegexpString
\ start=+\%([,(=+]\s*\)\@8<=/[^/*]+
\ skip=+\\\\\|\\/+
\ end=+/[dgimsuvy]\{0,7\}\ze\s*$+
\ end=+/[dgimsuvy]\{0,7\}\ze\s*[+;.,)\]}]+
\ end=+/[dgimsuvy]\{0,7\}\ze\s\+\/+
\ contains=@htmlPreproc,javaScriptComment
\ oneline
syn keyword javaScriptConditional if else switch
syn keyword javaScriptRepeat while for do in of

View File

@@ -3,16 +3,19 @@
" Maintainer: Gregory Anders <greg@gpanders.com>
" Last Change: 2024 May 8
" 2025 Apr 17 by Vim Project (don't require space to start comments, #17130)
" 2026 Apr 09 by Vim Project (anchor status regex to beginning of line, #19879)
" 2026 Apr 09 by Vim Project (detect renames of files, #19879)
if exists('b:current_syntax')
finish
endif
syn match jjAdded "A .*" contained
syn match jjRemoved "D .*" contained
syn match jjChanged "M .*" contained
syn match jjAdded "^JJ:\s\+\zsA\s.*" contained
syn match jjRemoved "^JJ:\s\+\zsD\s.*" contained
syn match jjChanged "^JJ:\s\+\zsM\s.*" contained
syn match jjRenamed "^JJ:\s\+\zsR\s.*" contained
syn region jjComment start="^JJ:" end="$" contains=jjAdded,jjRemoved,jjChanged
syn region jjComment start="^JJ:" end="$" contains=jjAdded,jjRemoved,jjChanged,jjRenamed
syn include @jjCommitDiff syntax/diff.vim
syn region jjCommitDiff start=/\%(^diff --\%(git\|cc\|combined\) \)\@=/ end=/^\%(diff --\|$\|@@\@!\|[^[:alnum:]\ +-]\S\@!\)\@=/ fold contains=@jjCommitDiff
@@ -21,5 +24,6 @@ hi def link jjComment Comment
hi def link jjAdded Added
hi def link jjRemoved Removed
hi def link jjChanged Changed
hi def link jjRenamed Changed
let b:current_syntax = 'jjdescription'

View File

@@ -1,6 +1,6 @@
" Vim syntax file
" Language: Generic log file
" Maintainer: Mao-Yining <https://github.com/mao-yining>
" Maintainer: Mao-Yining <mao.yining@outlook.com>
" Former Maintainer: MTDL9 <https://github.com/MTDL9>
" Latest Revision: 2025-10-31
@@ -10,10 +10,9 @@ endif
syntax case ignore
" Operators
" Symbols / special characters
"---------------------------------------------------------------------------
syn match logOperator display '[;,\?\:\.\<=\>\~\/\@\!$\%&\+\-\|\^(){}\*#]'
syn match logBrackets display '[][]'
syn match logSymbol display '[!@#$%^&*;:?]'
" For Visual Separator and Apache CLF
"---------------------------------------------------------------------------
@@ -22,10 +21,10 @@ syn match logSeparator display '- - '
" Strings
" ------------------------------
syn region LogString start=/"/ end=/"/ end=/$/ skip=/\\./ contains=logJavaError
syn region LogString start=/`/ end=/`/ end=/$/ skip=/\\./ contains=logJavaError
syn region logString start=/"/ end=/"/ end=/$/ skip=/\\./ contains=logJavaError
syn region logString start=/`/ end=/`/ end=/$/ skip=/\\./ contains=logJavaError
" Quoted strings, but no match on quotes like `don't`, possessive `s'` and `'s`
syn region LogString start=/\(s\)\@<!'\(s \|t \)\@!/ end=/'/ end=/$/ skip=/\\./ contains=logJavaError
syn region logString start=/\(s\)\@<!'\(s \|t \)\@!/ end=/'/ end=/$/ skip=/\\./ contains=logJavaError
" Numbers
"---------------------------------------------------------------------------
@@ -40,7 +39,7 @@ syn match logNumberHex display '\<0[xX]\x\+\>'
syn match logNumberHex display '\<\x\{4,}\>'
" Numbers in Hardware Description Languages e.g. Verilog
" These must be placed after LogString to ensure they take precedence
" These must be placed after logString to ensure they take precedence
syn match logNumber display '\'d\d\+\>'
syn match logNumberBin display '\'b[01]\+\>'
syn match logNumberOct display '\'o\o\+\>'
@@ -68,9 +67,9 @@ syn match logDate display '\<\d\{1,2}[- ]\a\{3}[- ]\d\{4}\>'
" Weekday string
syn keyword logDate Mon Tue Wed Thu Fri Sat Sun
" Matches 12:09:38 or 00:03:38.129Z or 01:32:12.102938 +0700 or 01:32:12.1234567890 or 21:14:18+11:00
syn match logTime display '\d\{2}:\d\{2}:\d\{2}\(\.\d\{2,9}\)\?\(\s\?[-+]\(\d\{1,2\}:\d\{2\}\|\d\{2,4}\)\|Z\)\?\>' nextgroup=logTimeZone,logSysColumns skipwhite
syn match logTime display '\d\{2}:\d\{2}:\d\{2}\(\.\d\{2,9}\)\?\(\s\?[-+]\(\d\{1,2\}:\d\{2\}\|\d\{2,4}\)\|Z\)\?\>' nextgroup=logTimeZone,logSysColumn skipwhite
" Time zone e.g. Z, +08:00, PST
syn match logTimeZone display 'Z\|[+-]\d\{2}:\d\{2}\|\a\{3}\>' contained skipwhite nextgroup=logSysColumns
syn match logTimeZone display 'Z\|[+-]\d\{2}:\d\{2}\|\a\{3}\>' contained skipwhite nextgroup=logSysColumn
" Matches time durations like 1ms or 1y 2d 23ns 3.14s 1.2e4s 3E+20h
syn match logDuration display '\(\(\(\d\+d\)\?\d\+h\)\?\d\+m\)\?\d\+\(\.\d\+\)\?[mun]\?s\>'
@@ -95,13 +94,13 @@ syn match logFilePath display '\(^\|\s\|=\)\zs\\\\\f\+\ze'
" Java Errors
"---------------------------------------------------------------------------
syn match logJavaError '\%(\%(Error\|Exception\):\s*\)\zs\w.\{-}\ze\(\\n\|$\)' contained
syn match logJavaError '\%(\%(Error\|Exception\):\s*\)\zs\w.\{-}\ze\(\\n\|$\)' contained
" Syslog Columns
"---------------------------------------------------------------------------
" Syslog hostname, program and process number columns
syn match logSysColumns '\w\(\w\|\.\|-\)\+ \(\w\|\.\|-\)\+\(\[\d\+\]\)\?:' contains=logOperator,@logLvs,LogSysProcess contained
syn match logSysProcess '\(\w\|\.\|-\)\+\(\[\d\+\]\)\?:' contains=logOperator,logNumber,logBrackets contained
syn match logSysColumn '\w\(\w\|\.\|-\)\+ \(\w\|\.\|-\)\+\(\[\d\+\]\)\?:' contained contains=@logLvs,logSysProcess
syn match logSysProcess '\(\w\|\.\|-\)\+\(\[\d\+\]\)\?:' contained contains=logNumber
" XML Tags
"---------------------------------------------------------------------------
@@ -109,47 +108,47 @@ syn match logSysProcess '\(\w\|\.\|-\)\+\(\[\d\+\]\)\?:' contains=logOperator,
syn match logXmlHeader /<?\(\w\|-\)\+\(\s\+\w\+\(="[^"]*"\|='[^']*'\)\?\)*?>/ contains=logString,logXmlAttribute,logXmlNamespace
syn match logXmlDoctype /<!DOCTYPE[^>]*>/ contains=logString,logXmlAttribute,logXmlNamespace
syn match logXmlTag /<\/\?\(\(\w\|-\)\+:\)\?\(\w\|-\)\+\(\(\n\|\s\)\+\(\(\w\|-\)\+:\)\?\(\w\|-\)\+\(="[^"]*"\|='[^']*'\)\?\)*\s*\/\?>/ contains=logString,logXmlAttribute,logXmlNamespace
syn match logXmlAttribute contained "\w\+=" contains=logOperator
syn match logXmlAttribute contained "\(\n\|\s\)\(\(\w\|-\)\+:\)\?\(\w\|-\)\+\(=\)\?" contains=logXmlNamespace,logOperator
syn match logXmlNamespace contained "\(\w\|-\)\+:" contains=logOperator
syn match logXmlAttribute contained "\w\+="
syn match logXmlAttribute contained "\(\n\|\s\)\(\(\w\|-\)\+:\)\?\(\w\|-\)\+\(=\)\?" contains=logXmlNamespace
syn match logXmlNamespace contained "\(\w\|-\)\+:"
syn region logXmlComment start=/<!--/ end=/-->/
syn match logXmlCData /<!\[CDATA\[.*\]\]>/
syn match logXmlEntity /&#\?\w\+;/
" Levels
"---------------------------------------------------------------------------
syn keyword logLvFatal FATAL Fatal fatal
syn keyword logLvEmergency EMERG[ENCY] Emerg[ency] emerg[ency]
syn keyword logLvAlert ALERT Alert alert
syn keyword logLvCritical CRIT[ICAL] Crit[ical] crit[ical]
syn keyword logLvError E ERR[ORS] Err[ors] err[ors]
syn keyword logLvFail F FAIL[ED] Fail[ed] fail[ed] FAILURE Failure failure
syn keyword logLvFault FAULT Fault fault
syn keyword logLvNack NACK Nack nack NAK Nak nak
syn keyword logLvWarning W WARN[ING] Warn[ing] warn[ing]
syn keyword logLvBad BAD Bad bad
syn keyword logLvNotice NOTICE Notice notice
syn keyword logLvInfo I INFO Info info
syn keyword logLvDebug D DEBUG Debug debug DBG Dbg dbg
syn keyword logLvTrace TRACE Trace trace
syn keyword logLvVerbose V VERBOSE Verbose verbose
syn keyword logLvPass PASS[ED] Pass[ed] pass[ed]
syn keyword logLvSuccess SUCCEED[ED] Succeed[ed] succeed[ed] SUCCESS Success success
syn keyword logLvFatal FATAL
syn keyword logLvEmergency EMERG[ENCY]
syn keyword logLvAlert ALERT
syn keyword logLvCritical CRIT[ICAL]
syn keyword logLvError E ERR[ORS]
syn keyword logLvFail F FAIL[ED] FAILURE
syn keyword logLvFault FAULT
syn keyword logLvNack NACK NAK
syn keyword logLvWarning W WARN[ING]
syn keyword logLvBad BAD
syn keyword logLvNotice NOTICE
syn keyword logLvInfo I INFO
syn keyword logLvDebug D DEBUG
syn keyword logLvTrace TRACE Trace
syn keyword logLvVerbose V VERBOSE
syn keyword logLvPass PASS[ED]
syn keyword logLvSuccess SUCCEED[ED] SUCCESS
" Composite log levels e.g. *_INFO
syn match logLvFatal display '\<\u\+_FATAL\>'
syn match logLvEmergency display '\<\u\+_EMERG\(ENCY\)\?\>'
syn match logLvAlert display '\<\u\+_ALERT\>'
syn match logLvCritical display '\<\u\+_CRIT\(ICAL\)\?\>'
syn match logLvError display '\<\u\+_ERR\(OR\)\?\>'
syn match logLvFail display '\<\u\+_FAIL\(URE\)\?\>'
syn match logLvWarning display '\<\u\+_WARN\(ING\)\?\>'
syn match logLvNotice display '\<\u\+_NOTICE\>'
syn match logLvInfo display '\<\u\+_INFO\>'
syn match logLvDebug display '\<\u\+_DEBUG\>'
syn match logLvTrace display '\<\u\+_TRACE\>'
syn match logLvFatal display '\<\u\+_FATAL\>'
syn match logLvEmergency display '\<\u\+_EMERG\(ENCY\)\?\>'
syn match logLvAlert display '\<\u\+_ALERT\>'
syn match logLvCritical display '\<\u\+_CRIT\(ICAL\)\?\>'
syn match logLvError display '\<\u\+_ERR\(OR\)\?\>'
syn match logLvFail display '\<\u\+_FAIL\(URE\)\?\>'
syn match logLvWarning display '\<\u\+_WARN\(ING\)\?\>'
syn match logLvNotice display '\<\u\+_NOTICE\>'
syn match logLvInfo display '\<\u\+_INFO\>'
syn match logLvDebug display '\<\u\+_DEBUG\>'
syn match logLvTrace display '\<\u\+_TRACE\>'
syn cluster logLvs contains=LogLvFatal,LogLvEmergency,LogLvAlert,LogLvCritical,LogLvError,LogLvFail,LogLvFault,LogLvNack,LogLvWarning,LogLvBad,LogLvNotice,LogLvInfo,LogLvDebug,LogLvTrace,LogLvVerbose,LogLvPass,LogLvSuccess
syn cluster logLvs contains=logLvFatal,logLvEmergency,logLvAlert,logLvCritical,logLvError,logLvFail,logLvFault,logLvNack,logLvWarning,logLvBad,logLvNotice,logLvInfo,logLvDebug,logLvTrace,logLvVerbose,logLvPass,logLvSuccess
" Highlight links
"---------------------------------------------------------------------------
@@ -179,7 +178,7 @@ hi def link logFilePath Structure
hi def link logJavaError ErrorMsg
hi def link logSysColumns Statement
hi def link logSysColumn Statement
hi def link logSysProcess Function
hi def link logXmlHeader Function
@@ -191,32 +190,31 @@ hi def link logXmlComment Comment
hi def link logXmlCData String
hi def link logXmlEntity Special
hi def link logOperator Special
hi def link logBrackets Special
hi def link logSymbol Delimiter
hi def link logSeparator Comment
hi def link LogLvFatal ErrorMsg
hi def link LogLvEmergency ErrorMsg
hi def link LogLvAlert ErrorMsg
hi def link LogLvCritical ErrorMsg
hi def link LogLvError ErrorMsg
hi def link LogLvFail ErrorMsg
hi def link LogLvFault ErrorMsg
hi def link LogLvNack ErrorMsg
hi def link LogLvWarning WarningMsg
hi def link LogLvBad WarningMsg
hi def link LogLvNotice Exception
hi def link LogLvInfo LogBlue
hi def link LogLvDebug Debug
hi def link LogLvTrace Special
hi def link LogLvVerbose Special
hi def link LogLvPass LogGreen
hi def link LogLvSuccess LogGreen
hi def link logLvFatal ErrorMsg
hi def link logLvEmergency ErrorMsg
hi def link logLvAlert ErrorMsg
hi def link logLvCritical ErrorMsg
hi def link logLvError ErrorMsg
hi def link logLvFail ErrorMsg
hi def link logLvFault ErrorMsg
hi def link logLvNack ErrorMsg
hi def link logLvWarning WarningMsg
hi def link logLvBad WarningMsg
hi def link logLvNotice Exception
hi def link logLvInfo logBlue
hi def link logLvDebug Debug
hi def link logLvTrace Special
hi def link logLvVerbose Special
hi def link logLvPass logGreen
hi def link logLvSuccess logGreen
" Custom highlight group
" ------------------------------
hi logGreen ctermfg=lightgreen guifg=#a4c672
hi logBlue ctermfg=lightblue guifg=#92bcfc
hi logGreen ctermfg=LightGreen guifg=LightGreen
hi logBlue ctermfg=LightBlue guifg=LightBlue
let b:current_syntax = 'log'

View File

@@ -9,6 +9,7 @@
" 2025 Oct 25 by Vim project: update makeTargetinDefine highlighting (#18570)
" 2025 Dec 23 by Vim project: fix too greedy match (#18938)
" 2025 Dec 23 by Vim project: wrong highlight with paranthesis inside quotes (#18818)
" 2026 Apr 17 by Vim project: wrong highlight $ inside quotes (#19986)
" quit when a syntax file was already loaded
if exists("b:current_syntax")
@@ -41,7 +42,7 @@ endif
syn match makeIdent "\$\$\w*"
syn match makeIdent "\$\$\$\$\w*" containedin=makeDefine
syn match makeIdent "\$[^({]"
syn match makeIdent "\$\$[^({]" containedin=makeDefine
syn match makeIdent "\$\$[^({\"']" containedin=makeDefine
if get(b:, 'make_flavor', s:make_flavor) == 'microsoft'
syn region makeIdent start="\$(" end=")" contains=makeStatement,makeIdent,makeDString,makeSString
syn region makeIdent start="\${" end="}" contains=makeStatement,makeIdent,makeDString,makeSString

View File

@@ -2,6 +2,7 @@
" Language: Monk (See-Beyond Technologies)
" Maintainer: Mike Litherland <litherm@ccf.org>
" Last Change: 2012 Feb 03 by Thilo Six
" 2026 Apr 20 by Vim project: remove wrong oneline keyword #20018
" This syntax file is good enough for my needs, but others
" may desire more features. Suggestions and bug reports
@@ -33,8 +34,8 @@ syn case ignore
" Fascist highlighting: everything that doesn't fit the rules is an error...
syn match monkError oneline ![^ \t()";]*!
syn match monkError oneline ")"
syn match monkError ![^ \t()";]*!
syn match monkError ")"
" Quoted and backquoted stuff
@@ -131,51 +132,51 @@ syn keyword monkFunc valid-integer? verify-type
" using variables is a day's work for a trained secretary...
" This is a useful lax approximation:
syn match monkNumber oneline "[-#+0-9.][-#+/0-9a-f@i.boxesfdl]*"
syn match monkError oneline ![-#+0-9.][-#+/0-9a-f@i.boxesfdl]*[^-#+/0-9a-f@i.boxesfdl \t()";][^ \t()";]*!
syn match monkNumber "[-#+0-9.][-#+/0-9a-f@i.boxesfdl]*"
syn match monkError ![-#+0-9.][-#+/0-9a-f@i.boxesfdl]*[^-#+/0-9a-f@i.boxesfdl \t()";][^ \t()";]*!
syn match monkOther oneline ![+-][ \t()";]!me=e-1
syn match monkOther oneline ![+-]$!
syn match monkOther ![+-][ \t()";]!me=e-1
syn match monkOther ![+-]$!
" ... so that a single + or -, inside a quoted context, would not be
" interpreted as a number (outside such contexts, it's a monkFunc)
syn match monkDelimiter oneline !\.[ \t()";]!me=e-1
syn match monkDelimiter oneline !\.$!
syn match monkDelimiter !\.[ \t()";]!me=e-1
syn match monkDelimiter !\.$!
" ... and a single dot is not a number but a delimiter
" Simple literals:
syn match monkBoolean oneline "#[tf]"
syn match monkError oneline !#[tf][^ \t()";]\+!
syn match monkBoolean "#[tf]"
syn match monkError !#[tf][^ \t()";]\+!
syn match monkChar oneline "#\\"
syn match monkChar oneline "#\\."
syn match monkError oneline !#\\.[^ \t()";]\+!
syn match monkChar oneline "#\\space"
syn match monkError oneline !#\\space[^ \t()";]\+!
syn match monkChar oneline "#\\newline"
syn match monkError oneline !#\\newline[^ \t()";]\+!
syn match monkChar "#\\"
syn match monkChar "#\\."
syn match monkError !#\\.[^ \t()";]\+!
syn match monkChar "#\\space"
syn match monkError !#\\space[^ \t()";]\+!
syn match monkChar "#\\newline"
syn match monkError !#\\newline[^ \t()";]\+!
" This keeps all other stuff unhighlighted, except *stuff* and <stuff>:
syn match monkOther oneline ,[a-z!$%&*/:<=>?^_~][-a-z!$%&*/:<=>?^_~0-9+.@]*,
syn match monkError oneline ,[a-z!$%&*/:<=>?^_~][-a-z!$%&*/:<=>?^_~0-9+.@]*[^-a-z!$%&*/:<=>?^_~0-9+.@ \t()";]\+[^ \t()";]*,
syn match monkOther ,[a-z!$%&*/:<=>?^_~][-a-z!$%&*/:<=>?^_~0-9+.@]*,
syn match monkError ,[a-z!$%&*/:<=>?^_~][-a-z!$%&*/:<=>?^_~0-9+.@]*[^-a-z!$%&*/:<=>?^_~0-9+.@ \t()";]\+[^ \t()";]*,
syn match monkOther oneline "\.\.\."
syn match monkError oneline !\.\.\.[^ \t()";]\+!
syn match monkOther "\.\.\."
syn match monkError !\.\.\.[^ \t()";]\+!
" ... a special identifier
syn match monkConstant oneline ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*[ \t()";],me=e-1
syn match monkConstant oneline ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*$,
syn match monkError oneline ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*[^-a-z!$%&*/:<=>?^_~0-9+.@ \t()";]\+[^ \t()";]*,
syn match monkConstant ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*[ \t()";],me=e-1
syn match monkConstant ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*$,
syn match monkError ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*[^-a-z!$%&*/:<=>?^_~0-9+.@ \t()";]\+[^ \t()";]*,
syn match monkConstant oneline ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>[ \t()";],me=e-1
syn match monkConstant oneline ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>$,
syn match monkError oneline ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>[^-a-z!$%&*/:<=>?^_~0-9+.@ \t()";]\+[^ \t()";]*,
syn match monkConstant ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>[ \t()";],me=e-1
syn match monkConstant ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>$,
syn match monkError ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>[^-a-z!$%&*/:<=>?^_~0-9+.@ \t()";]\+[^ \t()";]*,
" Monk input and output structures
syn match monkSyntax oneline "\(\~input\|\[I\]->\)[^ \t]*"
syn match monkFunc oneline "\(\~output\|\[O\]->\)[^ \t]*"
syn match monkSyntax "\(\~input\|\[I\]->\)[^ \t]*"
syn match monkFunc "\(\~output\|\[O\]->\)[^ \t]*"
" Non-quoted lists, and strings:

View File

@@ -3,6 +3,7 @@
" Previous Maintainer: Luca Saccarola <github.e41mv@aleeas.com>
" Maintainer: This runtime file is looking for a new maintainer.
" Last Change: 2025 Aug 05
" 2026 Apr 09: Link to generic Bold/Italic groups
"
" Reference Specification: Org mode manual
" GNU Info: `$ info Org`
@@ -18,17 +19,17 @@ syn case ignore
" Bold
syn region orgBold matchgroup=orgBoldDelimiter start="\(^\|[- '"({\]]\)\@<=\*\ze[^ ]" end="^\@!\*\([^\k\*]\|$\)\@=" keepend
hi def link orgBold markdownBold
hi def link orgBold Bold
hi def link orgBoldDelimiter orgBold
" Italic
syn region orgItalic matchgroup=orgItalicDelimiter start="\(^\|[- '"({\]]\)\@<=\/\ze[^ ]" end="^\@!\/\([^\k\/]\|$\)\@=" keepend
hi def link orgItalic markdownItalic
hi def link orgItalic Italic
hi def link orgItalicDelimiter orgItalic
" Strikethrogh
syn region orgStrikethrough matchgroup=orgStrikethroughDelimiter start="\(^\|[ '"({\]]\)\@<=+\ze[^ ]" end="^\@!+\([^\k+]\|$\)\@=" keepend
hi def link orgStrikethrough markdownStrike
hi def orgStrikethrough term=strikethrough cterm=strikethrough gui=strikethrough
hi def link orgStrikethroughDelimiter orgStrikethrough
" Underline

View File

@@ -5,6 +5,7 @@
" 2025 Sep 25 by Vim Project: fix wrong type highlighting #18394
" 2025 Dec 03 by Vim Project: highlight t-strings #18679
" 2026 Jan 26 by Vim Project: highlight constants #18922
" 2026 Mar 11 by Vim Project: fix number performance #19630
" Credits: Neil Schemenauer <nas@python.ca>
" Dmitry Vasiliev
" Rob B
@@ -270,16 +271,21 @@ syn match pythonEscape "\\$"
" https://docs.python.org/reference/lexical_analysis.html#numeric-literals
if !exists("python_no_number_highlight")
" numbers (including complex)
syn match pythonNumber "\<0[oO]\%(_\=\o\)\+\>"
syn match pythonNumber "\<0[xX]\%(_\=\x\)\+\>"
syn match pythonNumber "\<0[bB]\%(_\=[01]\)\+\>"
syn match pythonNumber "\<\%([1-9]\%(_\=\d\)*\|0\+\%(_\=0\)*\)\>"
syn match pythonNumber "\<\d\%(_\=\d\)*[jJ]\>"
syn match pythonNumber "\<\d\%(_\=\d\)*[eE][+-]\=\d\%(_\=\d\)*[jJ]\=\>"
syn match pythonNumber "\<0[oO]_\=\o\+\%(_\o\+\)*\>"
syn match pythonNumber "\<0[xX]_\=\x\+\%(_\x\+\)*\>"
syn match pythonNumber "\<0[bB]_\=[01]\+\%(_[01]\+\)*\>"
syn match pythonNumber "\<\%([1-9]\d*\%(_\d\+\)*\|0\+\%(_0\+\)*\)\>"
syn match pythonNumber "\<\d\+\%(_\d\+\)*[jJ]\>"
syn match pythonNumber "\<\d\+\%(_\d\+\)*[eE][+-]\=\d\+\%(_\d\+\)*[jJ]\=\>"
" \d\.
syn match pythonNumber
\ "\<\d\%(_\=\d\)*\.\%([eE][+-]\=\d\%(_\=\d\)*\)\=[jJ]\=\%(\W\|$\)\@="
\ "\<\d\+\%(_\d\+\)*\.\%([eE][+-]\=\d\+\%(_\d\+\)*\)\=[jJ]\=\%(\W\|$\)\@="
" \d\.\d
syn match pythonNumber
\ "\%(^\|\W\)\@1<=\%(\d\%(_\=\d\)*\)\=\.\d\%(_\=\d\)*\%([eE][+-]\=\d\%(_\=\d\)*\)\=[jJ]\=\>"
\ "\<\d\+\%(_\d\+\)*\.\d\+\%(_\d\+\)*\%([eE][+-]\=\d\+\%(_\d\+\)*\)\=[jJ]\=\>"
" \.\d
syn match pythonNumber
\ "\%(^\|\W\)\@1<=\.\d\+\%(_\d\+\)*\%([eE][+-]\=\d\+\%(_\d\+\)*\)\=[jJ]\=\>"
endif
" Group the built-ins in the order in the 'Python Library Reference' for

View File

@@ -22,6 +22,9 @@
" 2026 Jan 15 highlight command switches that contain a digit
" 2026 Feb 11 improve support for KornShell function names and variables
" 2026 Feb 15 improve comment handling #19414
" 2026 Mar 23 improve matching of function definitions #19638
" 2026 Apr 02 improve matching of function definitions #19849
" 2026 Apr 19 improve detection of special variables #20016
" }}}
" Version: 208
" Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
@@ -261,7 +264,7 @@ syn cluster shErrorList contains=shDoError,shIfError,shInError,shCaseError,shEsa
if exists("b:is_kornshell") || exists("b:is_bash")
syn cluster ErrorList add=shDTestError
endif
syn cluster shArithParenList contains=shArithmetic,shArithParen,shCaseEsac,shComment,shDeref,shDerefVarArray,shDo,shDerefSimple,shEcho,shEscape,shExpr,shNumber,shOperator,shPosnParm,shExSingleQuote,shExDoubleQuote,shHereString,shRedir,shSingleQuote,shDoubleQuote,shStatement,shVariable,shAlias,shTest,shCtrlSeq,shSpecial,shParen,bashSpecialVariables,bashStatement,shIf,shFor,shFunctionKey,shFunctionOne,shFunctionTwo,shNamespaceOne
syn cluster shArithParenList contains=shArithmetic,shArithParen,shCaseEsac,shComment,shDeref,shDerefVarArray,shDo,shDerefSimple,shEcho,shEscape,shExpr,shNumber,shOperator,shPosnParm,shExSingleQuote,shExDoubleQuote,shHereString,shRedir,shSingleQuote,shDoubleQuote,shStatement,shVariable,shAlias,shTest,shCtrlSeq,shSpecial,shParen,bashSpecialVariables,bashStatement,shIf,shFor
syn cluster shArithList contains=@shArithParenList,shParenError
syn cluster shBracketExprList contains=shCharClassOther,shCharClass,shCollSymb,shEqClass
syn cluster shCaseEsacList contains=shCaseStart,shCaseLabel,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq,@shErrorList,shStringSpecial,shCaseRange
@@ -278,7 +281,16 @@ syn cluster shDerefVarList contains=shDerefOffset,shDerefOp,shDerefVarArray,shDe
syn cluster shEchoList contains=shArithmetic,shBracketExpr,shCommandSub,shCommandSubBQ,shDerefVarArray,shSubshare,shValsub,shDeref,shDerefSimple,shEscape,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq,shEchoQuote
syn cluster shExprList1 contains=shBracketExpr,shNumber,shOperator,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shDblBrace,shDeref,shDerefSimple,shCtrlSeq
syn cluster shExprList2 contains=@shExprList1,@shCaseList,shTest
syn cluster shFunctionList contains=shBracketExpr,@shCommandSubList,shCaseEsac,shColon,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shOption,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shOperator,shCtrlSeq
syn cluster shFunctionCmds contains=shFor,shCaseEsac,shIf,shRepeat,shDblBrace,shDblParen
if exists("b:is_ksh88") || exists("b:is_mksh")
" Offer "shFunctionCmds" as is.
elseif exists("b:is_kornshell") || exists("b:is_bash")
syn cluster shFunctionCmds add=shForPP
else
syn cluster shFunctionCmds remove=shDblBrace,shDblParen
endif
syn cluster shFunctionDefList contains=shDoError,shIfError,shFunctionKey,shFunctionOne,shFunctionThree,shFunctionCmdOne
syn cluster shFunctionList contains=shBracketExpr,@shCommandSubList,shCaseEsac,shColon,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shOption,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shOperator,shCtrlSeq,@shFunctionDefList
if exists("b:is_kornshell") || exists("b:is_bash")
syn cluster shFunctionList add=shRepeat,shDblBrace,shDblParen,shForPP
syn cluster shDerefList add=shCommandSubList,shEchoDeref
@@ -287,7 +299,7 @@ syn cluster shHereBeginList contains=@shCommandSubList
syn cluster shHereList contains=shBeginHere,shHerePayload
syn cluster shHereListDQ contains=shBeginHere,@shDblQuoteList,shHerePayload
syn cluster shIdList contains=shArithmetic,shCommandSub,shCommandSubBQ,shDerefVarArray,shSubshare,shValsub,shWrapLineOperator,shSetOption,shComment,shDeref,shDerefSimple,shHereString,shNumber,shOperator,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial,shAtExpr
syn cluster shIfList contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo,shNamespaceOne
syn cluster shIfList contains=@shLoopList,shDblBrace,shDblParen,@shFunctionDefList
syn cluster shLoopList contains=@shCaseList,@shErrorList,shCaseEsac,shConditional,shDblBrace,shExpr,shFor,shIf,shOption,shSet,shTest,shTestOpr,shTouch
if exists("b:is_kornshell") || exists("b:is_bash")
syn cluster shLoopList add=shForPP,shDblParen
@@ -647,39 +659,52 @@ endif
" Functions: {{{1
if !exists("b:is_posix")
syn keyword shFunctionKey function skipwhite skipnl nextgroup=shFunctionTwo
syn keyword shFunctionKey function skipwhite skipnl nextgroup=shDoError,shIfError,shFunctionTwo,shFunctionFour,shFunctionCmdTwo
endif
ShFoldFunctions syn region shFunctionExpr matchgroup=shFunctionExprRegion start="{" end="}" contains=@shFunctionList contained skipwhite skipnl nextgroup=shQuickComment
ShFoldFunctions syn region shFunctionSubSh matchgroup=shFunctionSubShRegion start="(" end=")" contains=@shFunctionList contained skipwhite skipnl nextgroup=shQuickComment
if exists("b:is_bash")
syn keyword shFunctionKey coproc
ShFoldFunctions syn region shFunctionOne matchgroup=shFunction start="^\s*[A-Za-z_0-9:][-a-zA-Z_0-9:]*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
ShFoldFunctions syn region shFunctionTwo matchgroup=shFunction start="\%(do\)\@!\&\<[A-Za-z_0-9:][-a-zA-Z_0-9:]*\>\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
ShFoldFunctions syn region shFunctionThree matchgroup=shFunction start="^\s*[A-Za-z_0-9:][-a-zA-Z_0-9:]*\s*()\_s*(" end=")" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
ShFoldFunctions syn region shFunctionFour matchgroup=shFunction start="\%(do\)\@!\&\<[A-Za-z_0-9:][-a-zA-Z_0-9:]*\>\s*\%(()\)\=\_s*)" end=")" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
syn match shFunctionCmdOne "\%#=1^\s*\zs\%(\%(\<\k\+\|[^()<>|&$;\t ]\+\)\+\)\@>\s*()\ze\_s*\%(\%(for\|case\|select\|if\|while\|until\)\>\|\[\[\s\|((\)" skipwhite skipnl nextgroup=@shFunctionCmds
syn match shFunctionCmdTwo "\%#=1\%(\%(\<\k\+\>\|[^()<>|&$;\t ]\+\)\+\)\@>\ze\s*\%(()\ze\)\=\_s*\%(\<\%(for\|case\|select\|if\|while\|until\)\>\|\[\[\s\|((\)" contained skipwhite skipnl nextgroup=@shFunctionCmds
syn match shFunctionOne "\%#=1^\s*\zs\%(\%(\<\k\+\|[^()<>|&$;\t ]\+\)\+\)\@>\s*()\ze\_s*{" skipwhite skipnl nextgroup=shFunctionExpr
syn match shFunctionTwo "\%#=1\%(\%(\<\k\+\|[^()<>|&$;\t ]\+\)\+\)\@>\ze\s*\%(()\ze\)\=\_s*{" contained skipwhite skipnl nextgroup=shFunctionExpr
syn match shFunctionThree "\%#=1^\s*\zs\%(\%(\<\k\+\|[^()<>|&$;\t ]\+\)\+\)\@>\s*()\ze\_s*((\@!" skipwhite skipnl nextgroup=shFunctionSubSh
syn match shFunctionFour "\%#=1\%(\%(\<\k\+\|[^()<>|&$;\t ]\+\)\+\)\@>\ze\s*\%(\%(()\ze\)\=\)\@>\_s*((\@!" contained skipwhite skipnl nextgroup=shFunctionSubSh
elseif exists("b:is_ksh88")
" AT&T ksh88
ShFoldFunctions syn region shFunctionOne matchgroup=shFunction start="^\s*[A-Za-z_][A-Za-z_0-9]*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
ShFoldFunctions syn region shFunctionTwo matchgroup=shFunction start="\%(do\)\@!\&\<[A-Za-z_][A-Za-z_0-9]*\>\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
ShFoldFunctions syn region shFunctionThree matchgroup=shFunction start="^\s*[A-Za-z_][A-Za-z_0-9]*\s*()\_s*(" end=")" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
ShFoldFunctions syn region shFunctionFour matchgroup=shFunction start="\%(do\)\@!\&\<[A-Za-z_][A-Za-z_0-9]*\>\_s*(" end=")" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
syn match shFunctionCmdOne "^\s*\zs\h\w*\s*()\ze\_s*\%(\%(for\|case\|select\|if\|while\|until\)\>\|\[\[\s\|((\)" skipwhite skipnl nextgroup=@shFunctionCmds
syn match shFunctionOne "^\s*\zs\h\w*\s*()\ze\_s*{" skipwhite skipnl nextgroup=shFunctionExpr
syn match shFunctionTwo "\<\h\w*\>\ze\_s*{" contained skipwhite skipnl nextgroup=shFunctionExpr
syn match shFunctionThree "^\s*\zs\h\w*\s*()\ze\_s*((\@!" skipwhite skipnl nextgroup=shFunctionSubSh
elseif exists("b:is_mksh")
" MirBSD ksh is the wild west of absurd and abstruse function names...
ShFoldFunctions syn region shFunctionOne matchgroup=shFunction start="^\s*[-A-Za-z_@!+.%,0-9:]*[-A-Za-z_.%,0-9:]\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
ShFoldFunctions syn region shFunctionTwo matchgroup=shFunction start="\%(do\)\@!\&\<[-A-Za-z_@!+.%,0-9:]*[-A-Za-z_.%,0-9:]\>\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
ShFoldFunctions syn region shFunctionThree matchgroup=shFunction start="^\s*[-A-Za-z_@!+.%,0-9:]*[-A-Za-z_.%,0-9:]\s*()\_s*(" end=")" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
ShFoldFunctions syn region shFunctionFour matchgroup=shFunction start="\%(do\)\@!\&\<[-A-Za-z_@!+.%,0-9:]*[-A-Za-z_.%,0-9:]\>\s*\%(()\)\=\_s*(" end=")" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
syn match shFunctionCmdOne "^\s*\zs[-A-Za-z_@!+.%,0-9:]*[-A-Za-z_.%,0-9:]\s*()\ze\_s*\%(\%(for\|case\|select\|if\|while\|until\)\>\|\[\[\s\|((\)" skipwhite skipnl nextgroup=@shFunctionCmds
syn match shFunctionOne "^\s*\zs[-A-Za-z_@!+.%,0-9:]*[-A-Za-z_.%,0-9:]\s*()\ze\_s*{" skipwhite skipnl nextgroup=shFunctionExpr
syn match shFunctionTwo "\%#=1\%(\%(\<\w\+\|[@!+.%,:-]\+\)*[-A-Za-z_.%,0-9:]\)\@>\ze\s*\%(()\ze\)\=\_s*{" contained skipwhite skipnl nextgroup=shFunctionExpr
syn match shFunctionThree "^\s*\zs[-A-Za-z_@!+.%,0-9:]*[-A-Za-z_.%,0-9:]\s*()\ze\_s*((\@!" skipwhite skipnl nextgroup=shFunctionSubSh
elseif exists("b:is_kornshell")
" ksh93
ShFoldFunctions syn region shFunctionOne matchgroup=shFunction start="^\s*[A-Za-z_.][A-Za-z_.0-9]*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
ShFoldFunctions syn region shFunctionTwo matchgroup=shFunction start="\%(do\)\@!\&\<[A-Za-z_.][A-Za-z_.0-9]*\>\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
ShFoldFunctions syn region shFunctionThree matchgroup=shFunction start="^\s*[A-Za-z_.][A-Za-z_.0-9]*\s*()\_s*(" end=")" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
ShFoldFunctions syn region shFunctionFour matchgroup=shFunction start="\%(do\)\@!\&\<[A-Za-z_.][A-Za-z_.0-9]*\>\_s*(" end=")" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
ShFoldFunctions syn region shNamespaceOne matchgroup=shFunction start="\%(do\)\@!\&\<\h\w*\>\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
syn match shFunctionCmdOne "^\s*\zs[A-Za-z_.][A-Za-z_.0-9]*\s*()\ze\_s*\%(\%(for\|case\|select\|if\|while\|until\)\>\|\[\[\s\|((\)" skipwhite skipnl nextgroup=@shFunctionCmds
syn match shFunctionOne "^\s*\zs[A-Za-z_.][A-Za-z_.0-9]*\s*()\ze\_s*{" skipwhite skipnl nextgroup=shFunctionExpr
syn match shFunctionTwo "\%(\<\h\+\|\.\)[A-Za-z_.0-9]*\ze\_s*{" contained skipwhite skipnl nextgroup=shFunctionExpr
syn match shFunctionThree "^\s*\zs[A-Za-z_.][A-Za-z_.0-9]*\s*()\ze\_s*((\@!" skipwhite skipnl nextgroup=shFunctionSubSh
syn match shNamespaceOne "\<\h\w*\>\ze\_s*{" contained skipwhite skipnl nextgroup=shFunctionExpr
else
ShFoldFunctions syn region shFunctionOne matchgroup=shFunction start="^\s*\h\w*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
ShFoldFunctions syn region shFunctionTwo matchgroup=shFunction start="\%(do\)\@!\&\<\h\w*\>\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
ShFoldFunctions syn region shFunctionThree matchgroup=shFunction start="^\s*\h\w*\s*()\_s*(" end=")" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
ShFoldFunctions syn region shFunctionFour matchgroup=shFunction start="\%(do\)\@!\&\<\h\w*\>\s*\%(()\)\=\_s*(" end=")" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
syn match shFunctionCmdOne "^\s*\zs\h\w*\s*()\ze\_s*\%(for\|case\|if\|while\|until\)\>" skipwhite skipnl nextgroup=@shFunctionCmds
syn match shFunctionCmdTwo "\<\h\w*\s*()\ze\_s*\%(for\|case\|if\|while\|until\)\>" contained skipwhite skipnl nextgroup=@shFunctionCmds
syn match shFunctionOne "^\s*\zs\h\w*\s*()\ze\_s*{" skipwhite skipnl nextgroup=shFunctionExpr
syn match shFunctionTwo "\<\h\w*\>\s*()\ze\_s*{" contained skipwhite skipnl nextgroup=shFunctionExpr
syn match shFunctionThree "^\s*\zs\h\w*\s*()\ze\_s*(" skipwhite skipnl nextgroup=shFunctionSubSh
syn match shFunctionFour "\<\h\w*\>\s*()\ze\_s*(" contained skipwhite skipnl nextgroup=shFunctionSubSh
endif
if !exists("g:sh_no_error")
syn match shDoError "\<do\%(ne\)\=\s*()"
syn match shIfError "\<then\s*()"
syn match shIfError "\<else\s*()"
endif
" Parameter Dereferencing: {{{1
@@ -727,13 +752,15 @@ endif
if exists("b:is_bash")
syn region shDeref matchgroup=PreProc start="\${!" end="\*\=}" contains=@shDerefList,shDerefOffset
syn match shDerefVar contained "{\@<=!\h\w*" nextgroup=@shDerefVarList
syn match shDerefSpecial contained "\({!\)\@<=[[:alnum:]*#@_]\+" nextgroup=@shDerefVarList,shDerefOp
endif
if (exists("b:is_kornshell") && !exists("b:is_ksh88"))
syn match shDerefVar contained "{\@<=!\h\w*[[:alnum:]_.]*" nextgroup=@shDerefVarList
syn match shDerefSpecial contained "\({!\)\@<=[[:alnum:]*#@_]\+" nextgroup=@shDerefVarList,shDerefOp
endif
syn match shDerefSpecial contained "{\@<=[-*@?0]" nextgroup=shDerefOp,shDerefOffset,shDerefOpError
syn match shDerefSpecial contained "\({[#!]\)\@<=[[:alnum:]*@_]\+" nextgroup=@shDerefVarList,shDerefOp
syn match shDerefSpecial contained "\({[#]\)\@<=[[:alnum:]*@_]\+" nextgroup=@shDerefVarList,shDerefOp
syn match shDerefVar contained "{\@<=\h\w*" nextgroup=@shDerefVarList
syn match shDerefVar contained '\d' nextgroup=@shDerefVarList
if exists("b:is_kornshell") || exists("b:is_posix")
@@ -882,7 +909,6 @@ if !exists("skip_sh_syntax_inits")
hi def link shEchoDelim shOperator
hi def link shEchoQuote shString
hi def link shForPP shLoop
hi def link shFunction Function
hi def link shEmbeddedEcho shString
hi def link shEscape shCommandSub
hi def link shExDoubleQuote shDoubleQuote
@@ -960,8 +986,16 @@ if !exists("skip_sh_syntax_inits")
hi def link shConditional Conditional
hi def link shCtrlSeq Special
hi def link shExprRegion Delimiter
hi def link shFunctionKey Function
hi def link shFunctionName Function
hi def link shFunctionKey Keyword
hi def link shFunctionOne Function
hi def link shFunctionTwo shFunctionOne
hi def link shFunctionThree shFunctionOne
hi def link shFunctionFour shFunctionOne
hi def link shFunctionCmdOne shFunctionOne
hi def link shFunctionCmdTwo shFunctionOne
hi def link shFunctionExprRegion shExprRegion
hi def link shFunctionSubShRegion shSubShRegion
hi def link shNamespaceOne Function
hi def link shNumber Number
hi def link shOperator Operator
hi def link shRepeat Repeat

View File

@@ -306,13 +306,13 @@ syntax keyword typescriptRepeat do while for nextgroup=typescript
syntax keyword typescriptRepeat for nextgroup=typescriptLoopParen,typescriptAsyncFor skipwhite skipempty
syntax keyword typescriptBranch break continue containedin=typescriptBlock
syntax keyword typescriptCase case nextgroup=@typescriptPrimitive skipwhite containedin=typescriptBlock
syntax keyword typescriptDefault default containedin=typescriptBlock nextgroup=@typescriptValue,typescriptClassKeyword,typescriptInterfaceKeyword skipwhite oneline
syntax keyword typescriptDefault default containedin=typescriptBlock nextgroup=@typescriptValue,typescriptClassKeyword,typescriptInterfaceKeyword skipwhite
syntax keyword typescriptStatementKeyword with
syntax keyword typescriptStatementKeyword yield skipwhite nextgroup=@typescriptValue containedin=typescriptBlock
syntax keyword typescriptTry try
syntax keyword typescriptExceptions throw finally
syntax keyword typescriptExceptions catch nextgroup=typescriptCall skipwhite skipempty oneline
syntax keyword typescriptExceptions catch nextgroup=typescriptCall skipwhite skipempty
syntax keyword typescriptDebugger debugger
syntax keyword typescriptAsyncFor await nextgroup=typescriptLoopParen skipwhite skipempty contained
@@ -1766,9 +1766,9 @@ endif
" patch
" patch for generated code
syntax keyword typescriptGlobal Promise
\ nextgroup=typescriptGlobalPromiseDot,typescriptFuncCallArg,typescriptTypeArguments oneline
\ nextgroup=typescriptGlobalPromiseDot,typescriptFuncCallArg,typescriptTypeArguments
syntax keyword typescriptGlobal Map WeakMap
\ nextgroup=typescriptGlobalPromiseDot,typescriptFuncCallArg,typescriptTypeArguments oneline
\ nextgroup=typescriptGlobalPromiseDot,typescriptFuncCallArg,typescriptTypeArguments
syntax keyword typescriptConstructor contained constructor
\ nextgroup=@typescriptCallSignature

View File

@@ -6,13 +6,8 @@
" Contributor: Leonard Ehrenfried <leonard.ehrenfried@web.de>
" Karsten Hopp <karsten@redhat.com>
" Dean, Adam Kenneth <adam.ken.dean@hpe.com>
" Last Change: 2022 Nov 10
" Last Update: 2026 Feb 24
" Added RemoteCommand from pull request #4809
" Included additional keywords from Martin.
" Included PR #5753
" Update missing keywords #19488
" SSH Version: 8.5p1
" Last Change: 2026 Mar 31
" SSH Version: 10.1p1
"
" Setup
@@ -110,7 +105,8 @@ syn keyword sshconfigAddressFamily inet inet6
syn match sshconfigIPQoS "\<af[1-4][1-3]\>"
syn match sshconfigIPQoS "\<cs[0-7]\>"
syn keyword sshconfigIPQoS ef le lowdelay throughput reliability
syn keyword sshconfigIPQoS ef le
syn keyword sshconfigIPQoSDeprecated lowdelay throughput reliability
syn keyword sshconfigKbdInteractive bsdauth pam skey
syn keyword sshconfigKexAlgo diffie-hellman-group1-sha1
@@ -125,6 +121,8 @@ syn keyword sshconfigKexAlgo ecdh-sha2-nistp384
syn keyword sshconfigKexAlgo ecdh-sha2-nistp521
syn match sshconfigKexAlgo "\<curve25519-sha256\%(@libssh\.org\)\?\>"
syn match sshconfigKexAlgo "\<sntrup761x25519-sha512@openssh\.com\>"
syn keyword sshconfigKexAlgo sntrup761x25519-sha512
syn keyword sshconfigKexAlgo mlkem768x25519-sha256
syn keyword sshconfigTunnel point-to-point ethernet
@@ -288,6 +286,7 @@ hi def link sshconfigLogLevel sshconfigEnum
hi def link sshconfigSysLogFacility sshconfigEnum
hi def link sshconfigAddressFamily sshconfigEnum
hi def link sshconfigIPQoS sshconfigEnum
hi def link sshconfigIPQoSDeprecated sshconfigDeprecated
hi def link sshconfigKbdInteractive sshconfigEnum
hi def link sshconfigKexAlgo sshconfigEnum
hi def link sshconfigTunnel sshconfigEnum

View File

@@ -8,8 +8,8 @@
" Contributor: Karsten Hopp <karsten@redhat.com>
" Contributor: Fionn Fitzmaurice (github.com/fionn)
" Originally: 2009-07-09
" Last Change: 2026-02-11
" SSH Version: 10.2p1
" Last Change: 2026-03-11
" SSH Version: 10.1p1
"
" Setup
@@ -112,7 +112,8 @@ syn keyword sshdconfigCompression delayed
syn match sshdconfigIPQoS "\<af[1-4][1-3]\>"
syn match sshdconfigIPQoS "\<cs[0-7]\>"
syn keyword sshdconfigIPQoS ef le lowdelay throughput reliability
syn keyword sshdconfigIPQoS ef le
syn keyword sshdconfigIPQoSDeprecated lowdelay throughput reliability
syn keyword sshdconfigKexAlgo diffie-hellman-group1-sha1
syn keyword sshdconfigKexAlgo diffie-hellman-group14-sha1
@@ -293,6 +294,7 @@ hi def link sshdconfigSysLogFacility sshdconfigEnum
hi def link sshdconfigVar sshdconfigEnum
hi def link sshdconfigCompression sshdconfigEnum
hi def link sshdconfigIPQoS sshdconfigEnum
hi def link sshdconfigIPQoSDeprecated sshdconfigDeprecated
hi def link sshdconfigKexAlgo sshdconfigEnum
hi def link sshdconfigTunnel sshdconfigEnum
hi def link sshdconfigSubsystem sshdconfigEnum
@@ -301,6 +303,7 @@ hi def link sshdconfigEnum Function
hi def link sshdconfigSpecial Special
hi def link sshdconfigKeyword Keyword
hi def link sshdconfigMatch Type
hi def link sshdconfigDeprecated Error
let b:current_syntax = "sshdconfig"

View File

@@ -2,11 +2,7 @@
" Language: sudoers(5) configuration files
" Maintainer: Eisuke Kawashima ( e.kawaschima+vim AT gmail.com )
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2024 Sep 02
" Recent Changes: Support for #include and #includedir.
" 2018 Aug 28 by Vim project Added many new options (Samuel D. Leslie)
" 2024 Sep 09 by Vim project Update allowed Tag_Spec Runas_Spec syntax items
" 2026 Feb 13 by Vim project update regex for matching usernames #19396
" Latest Change: 2026 Mar 11
if exists("b:current_syntax")
finish
@@ -24,60 +20,77 @@ syn match sudoersUserSpec '^' nextgroup=@sudoersUserInSpec skipwhite
syn match sudoersSpecEquals contained '=' nextgroup=@sudoersCmndSpecList skipwhite
syn cluster sudoersCmndSpecList contains=sudoersUserRunasBegin,sudoersTagSpec,@sudoersCmndInSpec
syn cluster sudoersCmndSpecList contains=sudoersUserRunasBegin,sudoersOptionSpec,sudoersTagSpec,@sudoersCmndInSpec
syn keyword sudoersTodo contained TODO FIXME XXX NOTE
syn region sudoersComment display oneline start='#' end='$' contains=sudoersTodo
syn region sudoersInclude display oneline start='[#@]\%(include\|includedir\)\>' end='$'
syn region sudoersInclude display oneline start='[#@]\%(include\|includedir\)\s\+\S\+' end='$'
syn keyword sudoersAlias User_Alias Runas_Alias nextgroup=sudoersUserAlias skipwhite skipnl
syn keyword sudoersAlias Host_Alias nextgroup=sudoersHostAlias skipwhite skipnl
syn keyword sudoersAlias Cmnd_Alias nextgroup=sudoersCmndAlias skipwhite skipnl
syn match sudoersUserAlias contained '\<\u[A-Z0-9_]*\>' nextgroup=sudoersUserAliasEquals skipwhite skipnl
syn match sudoersUserNameInList contained '\<\l[-a-z0-9_]*\>' nextgroup=@sudoersUserList skipwhite skipnl
syn match sudoersUserNameInList contained '\<\l[-a-z0-9_]*\>' nextgroup=@sudoersUserList skipwhite skipnl
syn match sudoersUIDInList contained '#\d\+\>' nextgroup=@sudoersUserList skipwhite skipnl
syn match sudoersGroupInList contained '%\l[-a-z0-9_]*\>' nextgroup=@sudoersUserList skipwhite skipnl
syn match sudoersGIDInList contained '%#\d\+\>' nextgroup=@sudoersUserList skipwhite skipnl
syn match sudoersUserNetgroupInList contained '+\l[-a-z0-9_]*\>' nextgroup=@sudoersUserList skipwhite skipnl
syn match sudoersUserAliasInList contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersUserList skipwhite skipnl
syn keyword sudoersUserAllInList contained ALL nextgroup=@sudoersUserList skipwhite skipnl
syn match sudoersUserName contained '\<\l[-a-z0-9_]*\>' nextgroup=@sudoersParameter skipwhite skipnl
syn match sudoersUID contained '#\d\+\>' nextgroup=@sudoersParameter skipwhite skipnl
syn match sudoersGroup contained '%\l[-a-z0-9_]*\>' nextgroup=@sudoersParameter skipwhite skipnl
syn match sudoersUserNetgroup contained '+\l[-a-z0-9_]*\>' nextgroup=@sudoersParameter skipwhite skipnl
syn match sudoersUserAliasRef contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersParameter skipwhite skipnl
syn match sudoersUserName contained '\<\l[-a-z0-9_]*\>' nextgroup=sudoersUserComma,@sudoersParameter skipwhite skipnl
syn match sudoersUID contained '#\d\+\>' nextgroup=sudoersUserComma,@sudoersParameter skipwhite skipnl
syn match sudoersGroup contained '%\l[-a-z0-9_]*\>' nextgroup=sudoersUserComma,@sudoersParameter skipwhite skipnl
syn match sudoersGID contained '%#\d\+\>' nextgroup=sudoersUserComma,@sudoersParameter skipwhite skipnl
syn match sudoersUserNetgroup contained '+\l[-a-z0-9_]*\>' nextgroup=sudoersUserComma,@sudoersParameter skipwhite skipnl
syn match sudoersUserAliasRef contained '\<\u[A-Z0-9_]*\>' nextgroup=sudoersUserComma,@sudoersParameter skipwhite skipnl
syn keyword sudoersUserAll contained ALL nextgroup=sudoersUserComma,@sudoersParameter skipwhite skipnl
syn match sudoersUserComma contained ',' nextgroup=sudoersUserNegation,sudoersUserName,sudoersUID,sudoersGroup,sudoersGID,sudoersUserNetgroup,sudoersUserAliasRef,sudoersUserAll skipwhite skipnl
syn match sudoersUserNameInSpec contained '\<\l[-a-z0-9_]*\>' nextgroup=@sudoersUserSpec skipwhite skipnl
syn match sudoersUIDInSpec contained '#\d\+\>' nextgroup=@sudoersUserSpec skipwhite skipnl
syn match sudoersUserNameInSpec contained '\<\l[-a-z0-9_]*\>' nextgroup=@sudoersUserSpec skipwhite skipnl
syn region sudoersUIDInSpec display oneline start='#\d\+\>' end='' nextgroup=@sudoersUserSpec skipwhite skipnl
syn match sudoersGroupInSpec contained '%\l[-a-z0-9_]*\>' nextgroup=@sudoersUserSpec skipwhite skipnl
syn match sudoersGIDInSpec contained '%#\d\+\>' nextgroup=@sudoersUserSpec skipwhite skipnl
syn match sudoersUserNetgroupInSpec contained '+\l[-a-z0-9_]*\>' nextgroup=@sudoersUserSpec skipwhite skipnl
syn match sudoersUserAliasInSpec contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersUserSpec skipwhite skipnl
syn keyword sudoersUserAllInSpec contained ALL nextgroup=@sudoersUserSpec skipwhite skipnl
syn match sudoersUserNameInRunas contained '\<\l[-a-z0-9_]*\>' nextgroup=@sudoersUserRunas skipwhite skipnl
syn match sudoersUserNameInRunas contained '\<\l[-a-z0-9_]*\>' nextgroup=@sudoersUserRunas skipwhite skipnl
syn match sudoersUIDInRunas contained '#\d\+\>' nextgroup=@sudoersUserRunas skipwhite skipnl
syn match sudoersGroupInRunas contained '%\l[-a-z0-9_]*\>' nextgroup=@sudoersUserRunas skipwhite skipnl
syn match sudoersGIDInRunas contained '%#\d\+\>' nextgroup=@sudoersUserRunas skipwhite skipnl
syn match sudoersUserNetgroupInRunas contained '+\l[-a-z0-9_]*\>' nextgroup=@sudoersUserRunas skipwhite skipnl
syn match sudoersUserAliasInRunas contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersUserRunas skipwhite skipnl
syn keyword sudoersUserAllInRunas contained ALL nextgroup=@sudoersUserRunas skipwhite skipnl
syn match sudoersHostAlias contained '\<\u[A-Z0-9_]*\>' nextgroup=sudoersHostAliasEquals skipwhite skipnl
syn match sudoersHostNameInList contained '\<\l\+\>' nextgroup=@sudoersHostList skipwhite skipnl
syn match sudoersIPAddrInList contained '\%(\d\{1,3}\.\)\{3}\d\{1,3}' nextgroup=@sudoersHostList skipwhite skipnl
syn match sudoersNetworkInList contained '\%(\d\{1,3}\.\)\{3}\d\{1,3}\%(/\%(\%(\d\{1,3}\.\)\{3}\d\{1,3}\|\d\+\)\)\=' nextgroup=@sudoersHostList skipwhite skipnl
syn match sudoersHostNameInList contained '\<\l[a-z0-9_-]*\>' nextgroup=@sudoersHostList skipwhite skipnl
syn match sudoersIPAddrInList contained '\<\%(\d\{1,3}\.\)\{3}\d\{1,3}\>' nextgroup=@sudoersHostList skipwhite skipnl
syn match sudoersNetworkInList contained '\<\%(\d\{1,3}\.\)\{3}\d\{1,3}\%(/\%(\%(\d\{1,3}\.\)\{3}\d\{1,3}\|\d\+\)\)\=\>' nextgroup=@sudoersHostList skipwhite skipnl
syn match sudoersHostNetgroupInList contained '+\l\+\>' nextgroup=@sudoersHostList skipwhite skipnl
syn match sudoersHostAliasInList contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersHostList skipwhite skipnl
syn match sudoersHostName contained '\<\l\+\>' nextgroup=@sudoersParameter skipwhite skipnl
syn match sudoersIPAddr contained '\%(\d\{1,3}\.\)\{3}\d\{1,3}' nextgroup=@sudoersParameter skipwhite skipnl
syn match sudoersNetwork contained '\%(\d\{1,3}\.\)\{3}\d\{1,3}\%(/\%(\%(\d\{1,3}\.\)\{3}\d\{1,3}\|\d\+\)\)\=' nextgroup=@sudoersParameter skipwhite skipnl
syn match sudoersHostNetgroup contained '+\l\+\>' nextgroup=@sudoersParameter skipwhite skipnl
syn match sudoersHostAliasRef contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersParameter skipwhite skipnl
syn match sudoersHostName contained '\<\l[a-z0-9_-]*\>' nextgroup=sudoersHostComma,@sudoersParameter skipwhite skipnl
syn match sudoersIPAddr contained '\<\%(\d\{1,3}\.\)\{3}\d\{1,3}\>' nextgroup=sudoersHostComma,@sudoersParameter skipwhite skipnl
syn match sudoersNetwork contained '\<\%(\d\{1,3}\.\)\{3}\d\{1,3}/\%(\%(\d\{1,3}\.\)\{3}\d\{1,3}\|\d\+\)\>' nextgroup=sudoersHostComma,@sudoersParameter skipwhite skipnl
syn match sudoersHostNetgroup contained '+\l\+\>' nextgroup=sudoersHostComma,@sudoersParameter skipwhite skipnl
syn match sudoersHostAliasRef contained '\<\u[A-Z0-9_]*\>' nextgroup=sudoersHostComma,@sudoersParameter skipwhite skipnl
syn keyword sudoersHostAll contained ALL nextgroup=sudoersHostComma,@sudoersParameter skipwhite skipnl
syn match sudoersHostComma contained ',' nextgroup=sudoersHostNegation,sudoersHostName,sudoersIPAddr,sudoersNetwork,sudoersHostNetgroup,sudoersHostAliasRef,sudoersHostAll skipwhite skipnl
syn match sudoersHostNameInSpec contained '\<\l\+\>' nextgroup=@sudoersHostSpec skipwhite skipnl
syn match sudoersIPAddrInSpec contained '\%(\d\{1,3}\.\)\{3}\d\{1,3}' nextgroup=@sudoersHostSpec skipwhite skipnl
syn match sudoersNetworkInSpec contained '\%(\d\{1,3}\.\)\{3}\d\{1,3}\%(/\%(\%(\d\{1,3}\.\)\{3}\d\{1,3}\|\d\+\)\)\=' nextgroup=@sudoersHostSpec skipwhite skipnl
syn match sudoersCmndName contained '/[/A-Za-z0-9._-]\+' nextgroup=sudoersCmndComma,@sudoersParameter skipwhite skipnl
syn keyword sudoersCmndSpecial contained list sudoedit ALL nextgroup=sudoersCmndComma,@sudoersParameter skipwhite skipnl
syn match sudoersCmndAliasRef contained '\<\u[A-Z0-9_]*\>' nextgroup=sudoersCmndComma,@sudoersParameter skipwhite skipnl
syn match sudoersCmndComma contained ',' nextgroup=sudoersCmndNegation,sudoersCmndName,sudoersCmndSpecial,sudoersCmndAliasRef skipwhite skipnl
syn match sudoersHostNameInSpec contained '\<\l[a-z0-9_-]*\>' nextgroup=@sudoersHostSpec skipwhite skipnl
syn match sudoersIPAddrInSpec contained '\<\%(\d\{1,3}\.\)\{3}\d\{1,3}\>' nextgroup=@sudoersHostSpec skipwhite skipnl
syn match sudoersNetworkInSpec contained '\<\%(\d\{1,3}\.\)\{3}\d\{1,3}/\%(\%(\d\{1,3}\.\)\{3}\d\{1,3}\|\d\+\)\>' nextgroup=@sudoersHostSpec skipwhite skipnl
syn match sudoersHostNetgroupInSpec contained '+\l\+\>' nextgroup=@sudoersHostSpec skipwhite skipnl
syn match sudoersHostAliasInSpec contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersHostSpec skipwhite skipnl
syn keyword sudoersHostAllInSpec contained ALL nextgroup=@sudoersHostSpec skipwhite skipnl
syn match sudoersCmndAlias contained '\<\u[A-Z0-9_]*\>' nextgroup=sudoersCmndAliasEquals skipwhite skipnl
syn match sudoersCmndNameInList contained '[^[:space:],:=\\]\+\%(\\[[:space:],:=\\][^[:space:],:=\\]*\)*' nextgroup=@sudoersCmndList,sudoersCommandEmpty,sudoersCommandArgs skipwhite
@@ -85,6 +98,13 @@ syn match sudoersCmndAliasInList contained '\<\u[A-Z0-9_]*\>' nextgroup=@s
syn match sudoersCmndNameInSpec contained '[^[:space:],:=\\]\+\%(\\[[:space:],:=\\][^[:space:],:=\\]*\)*' nextgroup=@sudoersCmndSpec,sudoersCommandEmptyInSpec,sudoersCommandArgsInSpec skipwhite
syn match sudoersCmndAliasInSpec contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersCmndSpec skipwhite skipnl
syn keyword sudoersCmndSpecialInSpec contained list sudoedit ALL nextgroup=@sudoersCmndSpec skipwhite skipnl
syn keyword sudoersCmndDigestInList contained sha224 sha256 sha384 sha512 nextgroup=sudoersCmndDigestColon skipwhite skipnl
syn match sudoersCmndDigestColon contained ':' nextgroup=sudoersDigestHex,sudoersDigestBase64 skipwhite skipnl
syn match sudoersDigestHex contained '\<\x\+\>' nextgroup=sudoersCmndDigestComma,sudoersCmndNegationInList,sudoersCmndNameInList,sudoersCmndAliasInList skipwhite skipnl
syn match sudoersDigestBase64 contained '\<[A-Za-z0-9+/]\+=*' nextgroup=sudoersCmndDigestComma,sudoersCmndNegationInList,sudoersCmndNameInList,sudoersCmndAliasInList skipwhite skipnl
syn match sudoersCmndDigestComma contained ',' nextgroup=sudoersCmndDigestInList skipwhite skipnl
syn match sudoersUserAliasEquals contained '=' nextgroup=@sudoersUserInList skipwhite skipnl
syn match sudoersUserListComma contained ',' nextgroup=@sudoersUserInList skipwhite skipnl
@@ -94,10 +114,10 @@ syn cluster sudoersUserList contains=sudoersUserListComma,sudoersUserLis
syn match sudoersUserSpecComma contained ',' nextgroup=@sudoersUserInSpec skipwhite skipnl
syn cluster sudoersUserSpec contains=sudoersUserSpecComma,@sudoersHostInSpec
syn match sudoersUserRunasBegin contained '(' nextgroup=@sudoersUserInRunas,sudoersUserRunasColon skipwhite skipnl
syn match sudoersUserRunasBegin contained '(' nextgroup=@sudoersUserInRunas,sudoersUserRunasColon,sudoersUserRunasEnd skipwhite skipnl
syn match sudoersUserRunasComma contained ',' nextgroup=@sudoersUserInRunas skipwhite skipnl
syn match sudoersUserRunasColon contained ':' nextgroup=@sudoersUserInRunas skipwhite skipnl
syn match sudoersUserRunasEnd contained ')' nextgroup=sudoersTagSpec,@sudoersCmndInSpec skipwhite skipnl
syn match sudoersUserRunasColon contained ':' nextgroup=@sudoersUserInRunas,sudoersUserRunasEnd skipwhite skipnl
syn match sudoersUserRunasEnd contained ')' nextgroup=sudoersOptionSpec,sudoersTagSpec,@sudoersCmndInSpec skipwhite skipnl
syn cluster sudoersUserRunas contains=sudoersUserRunasComma,sudoersUserRunasColon,@sudoersUserInRunas,sudoersUserRunasEnd
@@ -116,20 +136,21 @@ syn match sudoersCmndListColon contained ':' nextgroup=sudoersCmndAlias
syn cluster sudoersCmndList contains=sudoersCmndListComma,sudoersCmndListColon
syn match sudoersCmndSpecComma contained ',' nextgroup=@sudoersCmndSpecList skipwhite skipnl
syn match sudoersCmndSpecColon contained ':' nextgroup=@sudoersUserInSpec skipwhite skipnl
syn match sudoersCmndSpecColon contained ':' nextgroup=@sudoersHostInSpec skipwhite skipnl
syn cluster sudoersCmndSpec contains=sudoersCmndSpecComma,sudoersCmndSpecColon
syn cluster sudoersUserInList contains=sudoersUserNegationInList,sudoersUserNameInList,sudoersUIDInList,sudoersGroupInList,sudoersUserNetgroupInList,sudoersUserAliasInList
syn cluster sudoersUserInList contains=sudoersUserNegationInList,sudoersUserNameInList,sudoersUIDInList,sudoersGroupInList,sudoersGIDInList,sudoersUserNetgroupInList,sudoersUserAliasInList,sudoersUserAllInList
syn cluster sudoersHostInList contains=sudoersHostNegationInList,sudoersHostNameInList,sudoersIPAddrInList,sudoersNetworkInList,sudoersHostNetgroupInList,sudoersHostAliasInList
syn cluster sudoersCmndInList contains=sudoersCmndNegationInList,sudoersCmndNameInList,sudoersCmndAliasInList
syn cluster sudoersCmndInList contains=sudoersCmndDigestInList,sudoersCmndNegationInList,sudoersCmndNameInList,sudoersCmndAliasInList
syn cluster sudoersUser contains=sudoersUserNegation,sudoersUserName,sudoersUID,sudoersGroup,sudoersUserNetgroup,sudoersUserAliasRef
syn cluster sudoersHost contains=sudoersHostNegation,sudoersHostName,sudoersIPAddr,sudoersNetwork,sudoersHostNetgroup,sudoersHostAliasRef
syn cluster sudoersUser contains=sudoersUserNegation,sudoersUserName,sudoersUID,sudoersGroup,sudoersGID,sudoersUserNetgroup,sudoersUserAliasRef,sudoersUserAll
syn cluster sudoersHost contains=sudoersHostNegation,sudoersHostName,sudoersIPAddr,sudoersNetwork,sudoersHostNetgroup,sudoersHostAll,sudoersHostAliasRef
syn cluster sudoersCmnd contains=sudoersCmndNegation,sudoersCmndName,sudoersCmndSpecial,sudoersCmndAliasRef
syn cluster sudoersUserInSpec contains=sudoersUserNegationInSpec,sudoersUserNameInSpec,sudoersUIDInSpec,sudoersGroupInSpec,sudoersUserNetgroupInSpec,sudoersUserAliasInSpec
syn cluster sudoersHostInSpec contains=sudoersHostNegationInSpec,sudoersHostNameInSpec,sudoersIPAddrInSpec,sudoersNetworkInSpec,sudoersHostNetgroupInSpec,sudoersHostAliasInSpec
syn cluster sudoersUserInRunas contains=sudoersUserNegationInRunas,sudoersUserNameInRunas,sudoersUIDInRunas,sudoersGroupInRunas,sudoersUserNetgroupInRunas,sudoersUserAliasInRunas
syn cluster sudoersCmndInSpec contains=sudoersCmndNegationInSpec,sudoersCmndNameInSpec,sudoersCmndAliasInSpec
syn cluster sudoersUserInSpec contains=sudoersUserNegationInSpec,sudoersUserNameInSpec,sudoersUIDInSpec,sudoersGroupInSpec,sudoersGIDInSpec,sudoersUserNetgroupInSpec,sudoersUserAliasInSpec,sudoersUserAllInSpec
syn cluster sudoersHostInSpec contains=sudoersHostNegationInSpec,sudoersHostNameInSpec,sudoersIPAddrInSpec,sudoersNetworkInSpec,sudoersHostNetgroupInSpec,sudoersHostAliasInSpec,sudoersHostAllInSpec
syn cluster sudoersUserInRunas contains=sudoersUserNegationInRunas,sudoersUserNameInRunas,sudoersUIDInRunas,sudoersGroupInRunas,sudoersGIDInRunas,sudoersUserNetgroupInRunas,sudoersUserAliasInRunas,sudoersUserAllInRunas
syn cluster sudoersCmndInSpec contains=sudoersCmndNegationInSpec,sudoersCmndNameInSpec,sudoersCmndAliasInSpec,sudoersCmndSpecialInSpec
syn match sudoersUserNegationInList contained '!\+' nextgroup=@sudoersUserInList skipwhite skipnl
syn match sudoersHostNegationInList contained '!\+' nextgroup=@sudoersHostInList skipwhite skipnl
@@ -137,6 +158,7 @@ syn match sudoersCmndNegationInList contained '!\+' nextgroup=@sudoersCmndInLi
syn match sudoersUserNegation contained '!\+' nextgroup=@sudoersUser skipwhite skipnl
syn match sudoersHostNegation contained '!\+' nextgroup=@sudoersHost skipwhite skipnl
syn match sudoersCmndNegation contained '!\+' nextgroup=@sudoersCmnd skipwhite skipnl
syn match sudoersUserNegationInSpec contained '!\+' nextgroup=@sudoersUserInSpec skipwhite skipnl
syn match sudoersHostNegationInSpec contained '!\+' nextgroup=@sudoersHostInSpec skipwhite skipnl
@@ -149,17 +171,22 @@ syn match sudoersCommandEmpty contained '""' nextgroup=@sudoersCmndList sk
syn match sudoersCommandArgsInSpec contained '[^[:space:],:=\\]\+\%(\\[[:space:],:=\\][^[:space:],:=\\]*\)*' nextgroup=sudoersCommandArgsInSpec,@sudoersCmndSpec skipwhite
syn match sudoersCommandEmptyInSpec contained '""' nextgroup=@sudoersCmndSpec skipwhite skipnl
syn keyword sudoersDefaultEntry Defaults nextgroup=sudoersDefaultTypeAt,sudoersDefaultTypeColon,sudoersDefaultTypeGreaterThan,@sudoersParameter skipwhite skipnl
syn keyword sudoersDefaultEntry Defaults nextgroup=sudoersDefaultTypeAt,sudoersDefaultTypeColon,sudoersDefaultTypeGreaterThan,sudoersDefaultTypeBang,sudoersDefaultTypeAny
syn match sudoersDefaultTypeAt contained '@' nextgroup=@sudoersHost skipwhite skipnl
syn match sudoersDefaultTypeColon contained ':' nextgroup=@sudoersUser skipwhite skipnl
syn match sudoersDefaultTypeGreaterThan contained '>' nextgroup=@sudoersUser skipwhite skipnl
syn match sudoersDefaultTypeBang contained '!' nextgroup=@sudoersCmnd skipwhite skipnl
syn match sudoersDefaultTypeAny contained '\s' nextgroup=@sudoersParameter skipwhite skipnl
" TODO: could also deal with special characters here
syn match sudoersBooleanParameter contained '!' nextgroup=sudoersBooleanParameter skipwhite skipnl
syn match sudoersParameterNegation contained '!\+' nextgroup=sudoersBooleanParameter,sudoersIntegerOrBooleanParameter,sudoersModeOrBooleanParameter,sudoersFloatOrBooleanParameter,sudoersTimeoutOrBooleanParameter,sudoersStringOrBooleanParameter,sudoersListParameter skipwhite skipnl
syn keyword sudoersBooleanParameter contained skipwhite skipnl
\ nextgroup=sudoersParameterListComma
\ always_query_group_plugin
\ always_set_home
\ authenticate
\ case_insensitive_group
\ case_insensitive_user
\ closefrom_override
\ compress_io
\ env_editor
@@ -174,9 +201,26 @@ syn keyword sudoersBooleanParameter contained skipwhite skipnl
\ ignore_logfile_errors
\ ignore_unknown_defaults
\ insults
\ intercept
\ intercept_allow_setid
\ intercept_authenticate
\ intercept_verify
\ iolog_flush
\ log_allowed
\ log_denied
\ log_exit_status
\ log_host
\ log_input
\ log_output
\ log_passwords
\ log_server_keepalive
\ log_server_verify
\ log_stderr
\ log_stdin
\ log_stdout
\ log_subcmds
\ log_ttyin
\ log_ttyout
\ log_year
\ long_otp_prompt
\ mail_all_cmnds
@@ -188,8 +232,13 @@ syn keyword sudoersBooleanParameter contained skipwhite skipnl
\ match_group_by_gid
\ netgroup_tuple
\ noexec
\ noninteractive_auth
\ pam_acct_mgmt
\ pam_rhost
\ pam_ruser
\ pam_session
\ pam_setcred
\ pam_silent
\ passprompt_override
\ path_info
\ preserve_groups
@@ -197,7 +246,10 @@ syn keyword sudoersBooleanParameter contained skipwhite skipnl
\ requiretty
\ root_sudo
\ rootpw
\ runas_allow_unknown_id
\ runas_check_shell
\ runaspw
\ selinux
\ set_home
\ set_logname
\ set_utmp
@@ -210,6 +262,7 @@ syn keyword sudoersBooleanParameter contained skipwhite skipnl
\ targetpw
\ tty_tickets
\ umask_override
\ use_loginclass
\ use_netgroups
\ use_pty
\ user_command_timeouts
@@ -220,81 +273,161 @@ syn keyword sudoersIntegerParameter contained
\ nextgroup=sudoersIntegerParameterEquals
\ skipwhite skipnl
\ closefrom
\ command_timeout
\ loglinelen
\ maxseq
\ passwd_timeout
\ passwd_tries
\ syslog_maxlen
syn keyword sudoersIntegerOrBooleanParameter contained
\ nextgroup=sudoersIntegerParameterEquals,sudoersParameterListComma
\ skipwhite skipnl
\ loglinelen
syn keyword sudoersFloatOrBooleanParameter contained
\ nextgroup=sudoersFloatParameterEquals,sudoersParameterListComma
\ skipwhite skipnl
\ passwd_timeout
\ timestamp_timeout
syn keyword sudoersModeParameter contained
\ nextgroup=sudoersModeParameterEquals
\ skipwhite skipnl
\ iolog_mode
syn keyword sudoersModeOrBooleanParameter contained
\ nextgroup=sudoersModeParameterEquals,sudoersParameterListComma
\ skipwhite skipnl
\ umask
syn keyword sudoersTimeoutOrBooleanParameter contained
\ nextgroup=sudoersTimeoutParameterEquals,sudoersParameterListComma
\ skipwhite skipnl
\ command_timeout
\ log_server_timeout
syn keyword sudoersStringParameter contained
\ nextgroup=sudoersStringParameterEquals
\ skipwhite skipnl
\ apparmor_profile
\ askpass
\ authfail_message
\ badpass_message
\ cmddenial_message
\ group_plugin
\ intercept_type
\ iolog_file
\ limitprivs
\ log_format
\ mailsub
\ noexec_file
\ pam_askpass_service
\ pam_login_service
\ pam_service
\ passprompt
\ privs
\ role
\ runas_default
\ sudoers_locale
\ timestamp_type
\ timestampowner
\ type
syn keyword sudoersStringOrBooleanParameter contained
\ nextgroup=sudoersStringParameterEquals,sudoersParameterListComma
\ skipwhite skipnl
\ admin_flag
\ editor
\ env_file
\ exempt_group
\ fdexec
\ group_plugin
\ iolog_dir
\ iolog_file
\ iolog_flush
\ iolog_group
\ iolog_mode
\ iolog_user
\ lecture
\ lecture_file
\ lecture_status_dir
\ listpw
\ log_server_cabundle
\ log_server_peer_cert
\ log_server_peer_key
\ logfile
\ mailerflags
\ mailerpath
\ mailfrom
\ mailsub
\ mailto
\ noexec_file
\ pam_login_service
\ pam_service
\ passprompt
\ restricted_env_file
\ role
\ runas_default
\ rlimit_as
\ rlimit_core
\ rlimit_cpu
\ rlimit_data
\ rlimit_fsize
\ rlimit_locks
\ rlimit_memlock
\ rlimit_nofile
\ rlimit_nproc
\ rlimit_rss
\ rlimit_stack
\ runcwd
\ secure_path
\ sudoers_locale
\ syslog
\ syslog_badpri
\ syslog_goodpri
\ timestamp_type
\ timestampdir
\ timestampowner
\ type
\ verifypw
syn keyword sudoersListParameter contained
\ nextgroup=sudoersListParameterEquals
\ nextgroup=sudoersListParameterEquals,sudoersParameterListComma
\ skipwhite skipnl
\ env_check
\ env_delete
\ env_keep
\ log_servers
\ passprompt_regex
syn match sudoersParameterListComma contained ',' nextgroup=@sudoersParameter skipwhite skipnl
syn cluster sudoersParameter contains=sudoersBooleanParameter,sudoersIntegerParameter,sudoersStringParameter,sudoersListParameter
syn cluster sudoersParameter contains=sudoersParameterNegation,sudoersBooleanParameter,sudoersIntegerParameter,sudoersIntegerOrBooleanParameter,sudoersModeParameter,sudoersModeOrBooleanParameter,sudoersFloatOrBooleanParameter,sudoersTimeoutOrBooleanParameter,sudoersStringParameter,sudoersStringOrBooleanParameter,sudoersListParameter
syn match sudoersIntegerParameterEquals contained '[+-]\==' nextgroup=sudoersIntegerValue skipwhite skipnl
syn match sudoersStringParameterEquals contained '[+-]\==' nextgroup=sudoersStringValue skipwhite skipnl
syn match sudoersIntegerParameterEquals contained '=' nextgroup=sudoersIntegerValue skipwhite skipnl
syn match sudoersModeParameterEquals contained '=' nextgroup=sudoersModeValue skipwhite skipnl
syn match sudoersFloatParameterEquals contained '=' nextgroup=sudoersFloatValue skipwhite skipnl
syn match sudoersTimeoutParameterEquals contained '=' nextgroup=sudoersTimeoutValue skipwhite skipnl
syn match sudoersStringParameterEquals contained '=' nextgroup=sudoersStringValue skipwhite skipnl
syn match sudoersListParameterEquals contained '[+-]\==' nextgroup=sudoersListValue skipwhite skipnl
syn match sudoersIntegerValue contained '\d\+' nextgroup=sudoersParameterListComma skipwhite skipnl
syn match sudoersStringValue contained '[^[:space:],:=\\]*\%(\\[[:space:],:=\\][^[:space:],:=\\]*\)*' nextgroup=sudoersParameterListComma skipwhite skipnl
syn region sudoersStringValue contained start=+"+ skip=+\\"+ end=+"+ nextgroup=sudoersParameterListComma skipwhite skipnl
syn match sudoersListValue contained '[^[:space:],:=\\]*\%(\\[[:space:],:=\\][^[:space:],:=\\]*\)*' nextgroup=sudoersParameterListComma skipwhite skipnl
syn region sudoersListValue contained start=+"+ skip=+\\"+ end=+"+ nextgroup=sudoersParameterListComma skipwhite skipnl
syn match sudoersIntegerValue contained '\<\d\+\>' nextgroup=sudoersParameterListComma skipwhite skipnl
syn match sudoersModeValue contained '\<\o\+\>' nextgroup=sudoersParameterListComma skipwhite skipnl
syn match sudoersFloatValue contained '-\?\%(\<\d\+\>\|\<\d\+\%(\.\%(\d\+\>\)\?\)\?\|\.\d\+\>\)' nextgroup=sudoersParameterListComma skipwhite skipnl
syn match sudoersTimeoutValue contained '\<\d\+\>' nextgroup=sudoersParameterListComma skipwhite skipnl
syn match sudoersTimeoutValue contained '\<\%(\d\+[dDhHmMsS]\)\+\>' nextgroup=sudoersParameterListComma skipwhite skipnl
syn match sudoersStringValue contained '\s*\zs[^[:space:],:=\\]*\%(\\[[:space:],:=\\][^[:space:],:=\\]*\)*' nextgroup=sudoersParameterListComma skipwhite skipnl
syn region sudoersStringValue contained start=+\s*\zs"+ skip=+\\"+ end=+"+ nextgroup=sudoersParameterListComma skipwhite skipnl
syn match sudoersListValue contained '\s*\zs[^[:space:],:=\\]*\%(\\[[:space:],:=\\][^[:space:],:=\\]*\)*' nextgroup=sudoersParameterListComma skipwhite skipnl
syn region sudoersListValue contained start=+\s*\zs"+ skip=+\\"+ end=+"+ nextgroup=sudoersParameterListComma skipwhite skipnl
syn match sudoersTagSpec contained '\%(NO\)\=\%(EXEC\|FOLLOW\|LOG_\%(INPUT\|OUTPUT\)\|MAIL\|INTERCEPT\|PASSWD\|SETENV\):' nextgroup=sudoersTagSpec,@sudoersCmndInSpec skipwhite
syn keyword sudoersOptionSpec contained ROLE TYPE nextgroup=sudoersSELinuxSpecEquals skipwhite
syn keyword sudoersOptionSpec contained APPARMOR_PROFILE nextgroup=sudoersAppArmorSpecEquals skipwhite
syn keyword sudoersOptionSpec contained PRIVS LIMITPRIVS nextgroup=sudoersSolarisPrivSpecEquals skipwhite
syn keyword sudoersOptionSpec contained NOTBEFORE NOTAFTER nextgroup=sudoersDateSpecEquals skipwhite
syn keyword sudoersOptionSpec contained TIMEOUT nextgroup=sudoersTimeoutSpecEquals skipwhite
syn keyword sudoersOptionSpec contained CWD CHROOT nextgroup=sudoersDirectorySpecEquals skipwhite
syn match sudoersSELinuxSpecEquals contained '=' nextgroup=sudoersSELinuxSpecParam skipwhite skipnl
syn match sudoersAppArmorSpecEquals contained '=' nextgroup=sudoersAppArmorSpecParam skipwhite skipnl
syn match sudoersSolarisPrivSpecEquals contained '=' nextgroup=sudoersSolarisPrivSpecParam skipwhite skipnl
syn match sudoersDateSpecEquals contained '=' nextgroup=sudoersDateSpecParam skipwhite skipnl
syn match sudoersTimeoutSpecEquals contained '=' nextgroup=sudoersTimeoutSpecParam skipwhite skipnl
syn match sudoersDirectorySpecEquals contained '=' nextgroup=sudoersDirectorySpecParam,sudoersDirectorySpecParamError skipwhite skipnl
syn match sudoersSELinuxSpecParam contained /\<[A-Za-z0-9_]\+\>/ nextgroup=sudoersOptionSpec,sudoersTagSpec,@sudoersCmndInSpec skipwhite skipnl
syn match sudoersAppArmorSpecParam contained /\S\+/ nextgroup=sudoersOptionSpec,sudoersTagSpec,@sudoersCmndInSpec skipwhite skipnl
syn match sudoersSolarisPrivSpecParam contained /\S\+/ nextgroup=sudoersOptionSpec,sudoersTagSpec,@sudoersCmndInSpec skipwhite skipnl
syn match sudoersDateSpecParam contained /\<\d\{10\}\%(\d\d\)\{0,2\}\%(Z\|[+-]\d\{4\}\)\?\>/ nextgroup=sudoersOptionSpec,sudoersTagSpec,@sudoersCmndInSpec skipwhite skipnl
syn match sudoersTimeoutSpecParam contained /\<\d\+\>\|\<\%(\d\+[dDhHmMsS]\)\+\>/ nextgroup=sudoersOptionSpec,sudoersTagSpec,@sudoersCmndInSpec skipwhite skipnl
syn match sudoersDirectorySpecParam contained '[/~]\f*\|\*' nextgroup=sudoersOptionSpec,sudoersTagSpec,@sudoersCmndInSpec skipwhite skipnl
syn match sudoersDirectorySpecParam contained '"\%([/~]\f\{-}\|\*\)"' nextgroup=sudoersOptionSpec,sudoersTagSpec,@sudoersCmndInSpec skipwhite skipnl
syn keyword sudoersTagSpec contained EXEC NOEXEC FOLLOW NOFOLLOW LOG_INPUT NOLOG_INPUT LOG_OUTPUT NOLOG_OUTPUT MAIL NOMAIL INTERCEPT NOINTERCEPT PASSWD NOPASSWD SETENV NOSETENV nextgroup=sudoersTagSpecColon skipwhite
syn match sudoersTagSpecColon contained /:/ nextgroup=sudoersTagSpec,@sudoersCmndInSpec skipwhite
hi def link sudoersSpecEquals Operator
hi def link sudoersTodo Todo
@@ -304,23 +437,32 @@ hi def link sudoersUserAlias Identifier
hi def link sudoersUserNameInList String
hi def link sudoersUIDInList Number
hi def link sudoersGroupInList PreProc
hi def link sudoersGIDInList Number
hi def link sudoersUserNetgroupInList PreProc
hi def link sudoersUserAliasInList PreProc
hi def link sudoersUserAllInList Special
hi def link sudoersUserName String
hi def link sudoersUID Number
hi def link sudoersGroup PreProc
hi def link sudoersGID Number
hi def link sudoersUserNetgroup PreProc
hi def link sudoersUserAliasRef PreProc
hi def link sudoersUserAll Special
hi def link sudoersUserComma Delimiter
hi def link sudoersUserNameInSpec String
hi def link sudoersUIDInSpec Number
hi def link sudoersGroupInSpec PreProc
hi def link sudoersGIDInSpec Number
hi def link sudoersUserNetgroupInSpec PreProc
hi def link sudoersUserAliasInSpec PreProc
hi def link sudoersUserAllInSpec Special
hi def link sudoersUserNameInRunas String
hi def link sudoersUIDInRunas Number
hi def link sudoersGroupInRunas PreProc
hi def link sudoersGIDInRunas Number
hi def link sudoersUserNetgroupInRunas PreProc
hi def link sudoersUserAliasInRunas PreProc
hi def link sudoersUserAllInRunas Special
hi def link sudoersHostAlias Identifier
hi def link sudoersHostNameInList String
hi def link sudoersIPAddrInList Number
@@ -331,17 +473,30 @@ hi def link sudoersHostName String
hi def link sudoersIPAddr Number
hi def link sudoersNetwork Number
hi def link sudoersHostNetgroup PreProc
hi def link sudoersHostAll Special
hi def link sudoersHostComma Delimiter
hi def link sudoersHostAliasRef PreProc
hi def link sudoersCmndName String
hi def link sudoersCmndSpecial Special
hi def link sudoersCmndAliasRef PreProc
hi def link sudoersCmndComma Delimiter
hi def link sudoersHostNameInSpec String
hi def link sudoersIPAddrInSpec Number
hi def link sudoersNetworkInSpec Number
hi def link sudoersHostNetgroupInSpec PreProc
hi def link sudoersHostAliasInSpec PreProc
hi def link sudoersHostAllInSpec Special
hi def link sudoersCmndAlias Identifier
hi def link sudoersCmndNameInList String
hi def link sudoersCmndAliasInList PreProc
hi def link sudoersCmndNameInSpec String
hi def link sudoersCmndAliasInSpec PreProc
hi def link sudoersCmndSpecialInSpec Special
hi def link sudoersCmndDigestInList Type
hi def link sudoersCmndDigestColon Operator
hi def link sudoersDigestHex Number
hi def link sudoersDigestBase64 Number
hi def link sudoersCmndDigestComma Delimiter
hi def link sudoersUserAliasEquals Operator
hi def link sudoersUserListComma Delimiter
hi def link sudoersUserListColon Delimiter
@@ -364,6 +519,7 @@ hi def link sudoersHostNegationInList Operator
hi def link sudoersCmndNegationInList Operator
hi def link sudoersUserNegation Operator
hi def link sudoersHostNegation Operator
hi def link sudoersCmndNegation Operator
hi def link sudoersUserNegationInSpec Operator
hi def link sudoersHostNegationInSpec Operator
hi def link sudoersUserNegationInRunas Operator
@@ -374,18 +530,46 @@ hi def link sudoersDefaultEntry Keyword
hi def link sudoersDefaultTypeAt Special
hi def link sudoersDefaultTypeColon Special
hi def link sudoersDefaultTypeGreaterThan Special
hi def link sudoersDefaultTypeBang Special
hi def link sudoersParameterNegation Operator
hi def link sudoersBooleanParameter Identifier
hi def link sudoersIntegerParameter Identifier
hi def link sudoersIntegerOrBooleanParameter Identifier
hi def link sudoersModeParameter Identifier
hi def link sudoersModeOrBooleanParameter Identifier
hi def link sudoersFloatOrBooleanParameter Identifier
hi def link sudoersTimeoutOrBooleanParameter Identifier
hi def link sudoersStringParameter Identifier
hi def link sudoersStringOrBooleanParameter Identifier
hi def link sudoersListParameter Identifier
hi def link sudoersParameterListComma Delimiter
hi def link sudoersIntegerParameterEquals Operator
hi def link sudoersModeParameterEquals Operator
hi def link sudoersFloatParameterEquals Operator
hi def link sudoersTimeoutParameterEquals Operator
hi def link sudoersStringParameterEquals Operator
hi def link sudoersListParameterEquals Operator
hi def link sudoersIntegerValue Number
hi def link sudoersModeValue Number
hi def link sudoersFloatValue Float
hi def link sudoersTimeoutValue Number
hi def link sudoersStringValue String
hi def link sudoersListValue String
hi def link sudoersOptionSpec Special
hi def link sudoersSELinuxSpecEquals Operator
hi def link sudoersAppArmorSpecEquals Operator
hi def link sudoersSolarisPrivSpecEquals Operator
hi def link sudoersDateSpecEquals Operator
hi def link sudoersTimeoutSpecEquals Operator
hi def link sudoersDirectorySpecEquals Operator
hi def link sudoersSELinuxSpecParam String
hi def link sudoersAppArmorSpecParam String
hi def link sudoersSolarisPrivSpecParam String
hi def link sudoersDateSpecParam Number
hi def link sudoersTimeoutSpecParam Number
hi def link sudoersDirectorySpecParam String
hi def link sudoersTagSpec Special
hi def link sudoersTagSpecColon Delimiter
hi def link sudoersInclude Statement
let b:current_syntax = "sudoers"

Some files were not shown because too many files have changed in this diff Show More