Compare commits

...

233 Commits

Author SHA1 Message Date
Foxe Chen
c920d93443 patch 9.2.0498: potential heap buffer overflow in if_xcmdsrv.c
Problem:  potential heap buffer overflow in if_xcmdsrv.c
          server_parse_message() (Michael Bommarito)
Solution: Add strlen() call (Foxe Chen)

fixes:  #20235
closes: #20236

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-17 20:42:20 +00:00
Miguel Barro
4a99175e39 patch 9.2.0497: Cannot jump to remote tags
Problem:  Cannot jump to remote tags
          (after v9.2.0405)
Solution: Add the 'tagsecure' option (Miguel Barro)

closes: #20162

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Miguel Barro <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-17 20:11:52 +00:00
Christian Brabandt
a65a52d684 patch 9.2.0496: [security]: Code Injection in cucumber filetype plugin
Problem:  [security]: Code Injection in cucumber filetype plugin
          (Christopher Lusk)
Solution: Use rubys Regexp.new() with the untrusted pattern

Github Security Advisory:
https://github.com/vim/vim/security/advisories/GHSA-4473-94jm-w5x9

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-17 19:39:24 +00:00
Christian Brabandt
f08ab2f4d7 patch 9.2.0495: [security]: runtime(netrw): code injection via NetrwBookHistSave()
Problem:  [security]: runtime(netrw): code injection via
          NetrwBookHistSave()
Solution: Properly quote the directory name using string() function
          (Srinivas Piskala Ganesh Babu)

Github Security Advisory:
https://github.com/vim/vim/security/advisories/GHSA-crm5-rh6j-2c7c

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-17 18:53:48 +00:00
mathmil
2a01e59671 runtime(just): add 'suffixesadd' to ftplugin
closes: #20197

Signed-off-by: mathmil <82173590+mathmil@users.noreply.github.com>
Signed-off-by: Peter Benjamin <petermbenjamin@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-17 18:08:46 +00:00
Aliaksei Budavei
23c77d8ec8 runtime(sh): Do not conflate empty array and function declarations in Bash
Although the "=" character is permitted in function names,
a construct that parses as a variable assignment is
preferred to it parsing as a function declaration.  See the
updated test file "sh_functions_bash.sh" for details.

fixes:  #20183
closes: #20205

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-05-17 18:06:22 +00:00
Maxim Kim
f0e874a129 patch 9.2.0494: User commands cannot handle single args with spaces
Problem:  User commands cannot handle single args with spaces
Solution: Add the -nargs=_ attribute (Maxim Kim)

-nargs=_ allow user commands to have a single argument with spaces.

For example given the following Test command and TestComplete function:

```
vim9script
def TestComplete(A: string, _: string, _: number): list<string>
    var all = ["qqqq", "aaaa", "qq aa"]
    return all->matchfuzzy(A)
enddef
command! -nargs=_ -complete=customlist,TestComplete Test echo <q-args>
```

`:Test q a<tab>` should successfully complete `qq aa`

fixes:  #20102
closes: #20189

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-17 17:58:15 +00:00
Yasuhiro Matsumoto
abecad5af0 patch 9.2.0493: popup: missing Popup, PopupBorder and PopupTitle hi groups
Problem:  popup: missing Popup, PopupBorder and PopupTitle highlight groups
Solution: add Popup, PopupBorder and PopupTitle highlight groups and
          fall back to Pmenu related highlighting groups (Yasuhiro Matsumoto).

fixes:  #20110
closes: #20208

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-17 17:49:42 +00:00
Yasuhiro Matsumoto
3db4c3a20b patch 9.2.0492: popup: decoration wrongly drawn with clipping on border
Problem:  popup: clipwindow popups with border and padding could still
          spill into the surrounding chrome of the host window
Solution: Consume the border first, then the padding, per edge; spill
          any leftover clip into the opposite edge's decoration; derive
          the bottom padding row from total_height; skip the scrollbar
          branch for clipwindow popups (Yasuhiro Matsumoto).

closes: #20227

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-17 09:27:04 +00:00
Philip H.
ab24858cf5 CI: Update clang to v22
closes: #20228

Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-17 08:48:14 +00:00
tecis
f03155aa2a runtime(htmldjango): Add syntax highlighting of comparison operators
The presence `djangoOperators` in the file `syntax/django.vim` and
having the highlight function with a `match` statement leads to a
highlight spill-over with other elements defined in `syntax/html.vim`.
To avoid the highlight spill-over declare a region called
`djangoTagBlockNaive` to limit `djangoOperator` to only be matched
within.

related: #20225
closes:  #20232

Signed-off-by: tecis <67809811+tecis@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-17 08:44:39 +00:00
tecis
8b25d90b08 runtime(django): Resolve FIXME of comparrison operators + localization tags
Summary: Add highlight of comparison operators resolving FIXME left by maintainer.

How it works: By creating a the variable ‘djangoOperator’ with the regex
and defining to only highlight when enclosed within ‘djangoTag’ and
‘djangoVarBlock’ the highlight works as expected.

Note: Note even though the maintainer had left the note “FIXME ==, !=,
      <, >, <=, and >= should be djangoStatements” the results do work
as I think he intended even though the variable ‘djangoOperator’ had to
be created to achieve the result. By doing it this way the highlight
process does not get confused depending on the spacing of the comparison
operator. Example: {{ x>=10 }} and {{ x >= 10 }} work as expected.

Add tags related to localization.

Documentation source:

- https://docs.djangoproject.com/en/5.2/topics/i18n/formatting/#controlling-localization-in-templates

closes: #20225

Signed-off-by: tecis <67809811+tecis@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-17 08:32:15 +00:00
orbisai0security
403ba303b9 ccfilter: uses unbounded strcat()/strcpy()
Problem:  ccfilter.c copies compiler output into fixed-size buffers
          with strcat() and strcpy(), so very long diagnostics can
          overflow.
Solution: replace with snprintf() bounded by LINELENGTH.

Automated security fix generated by Orbis Security AI

closes: #20233

Signed-off-by: orbisai0security <mediratta01.pally@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-17 08:22:08 +00:00
K.Takata
8ae45e4202 NSIS: Don't install 32-bit dll on ARM64
closes: #20234

Signed-off-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-16 15:51:03 +00:00
Zoltan Arpadffy
d8c4774273 patch 9.2.0491: VMS: various build issues
Problem:  VMS: various build issues
Solution: Fix issues for VMS (Zoltan Arpadffy)

closes: #20131

Signed-off-by: Zoltan Arpadffy <zoltan.arpadffy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-16 08:42:47 +00:00
glepnir
88b00d1c57 patch 9.2.0490: matchfuzzy() can crash on long multi-word patterns
Problem:  matchfuzzy() can crash on long multi-word patterns.
Solution: Clamp pat_chars to maxMatches and stop before calling
          match_positions() when the buffer is full (glepnir).

closes: #20209

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-16 08:36:39 +00:00
Phạm Bình An
591db923ba runtime(zip,tar): Add support for compressed .cbz and .cbt files
*.cbz and *.cbt files are just zip and tar files for comic books.
https://en.wikipedia.org/wiki/Comic_book_archive

closes: #20206

Signed-off-by: Phạm Bình An <phambinhanctb2004@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-16 08:02:13 +00:00
Doug Kearns
f7e239bd0e runtime(sh): Update syntax, don't include parens in function name highlighting
Parentheses are not part of the function name so highlight them
differently.

closes: #20219

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-16 07:57:10 +00:00
Keith Smiley
bc7f736a39 patch 9.2.0489: filetype: some Objective-C files are not recognized
Problem:  filetype: some Objective-C files are not recognized
Solution: Add g:filetype_mm override variable, improve the objective c
          pattern detection (Keith Smiley).

closes: #20221

Signed-off-by: Keith Smiley <keithbsmiley@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-16 07:46:25 +00:00
dependabot[bot]
7cb86f46cb CI: Bump the github-actions group across 1 directory with 2 updates
Bumps the github-actions group with 2 updates in the / directory: [github/codeql-action](https://github.com/github/codeql-action) and [actions/labeler](https://github.com/actions/labeler).

Updates `github/codeql-action` from 4.35.3 to 4.35.4
- [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.3...v4.35.4)

Updates `actions/labeler` from 6.0.1 to 6.1.0
- [Release notes](https://github.com/actions/labeler/releases)
- [Commits](https://github.com/actions/labeler/compare/v6.0.1...v6.1.0)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.35.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: actions/labeler
  dependency-version: 6.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
...

closes: #20226

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-16 07:40:21 +00:00
Hirohito Higashi
b467b56ef0 patch 9.2.0488: statusline: status line highlight blends into adjacent vsep cells
Problem:  When two windows are placed side by side with vsplit and
          their status lines are connected (the cell between them
          is drawn with the 'stl' / 'stlnc' fillchar, not the
          'vert' character), that connecting cell still uses the
          VertSplit highlight.  The status line bar therefore
          looks broken at the separator column, and any custom
          edge highlight set in 'statusline' (%#XX# / %N*) is cut
          off there.
Solution: Make that connecting cell take the highlight from the
          neighbouring status line edge instead of VertSplit:
            - Next to the current window, use the current
              window's edge highlight, so the StatusLine bar (and
              any %#... at the edge) extends into the column
              without a seam.
            - Between two non-current windows whose status
              fillchar is a space, use the left window's
              right-edge highlight, so the StatusLineNC bar is
              continuous across the column too.
          Cells drawn with the 'vert' character (the two windows
          do not share a status line) keep the VertSplit
          highlight as before.

          Add Test_statusline_vsep_borrow_hl with two layouts
          (NC | cur | NC | NC and NC | NC | cur | NC) so all
          three cases above are covered.

closes: #20182

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-05-15 16:52:29 +00:00
Yasuhiro Matsumoto
ee49669e8f patch 9.2.0487: viminfo: possible signed int overflow in register array
Problem:  viminfo: possible signed int overflow in register array growth
Solution: Cast to size_t (Yasuhiro Matsumoto)

The expression `limit * 2 * sizeof(string_T)` in read_viminfo_register()
multiplies in int and overflows once limit exceeds INT_MAX/2. Cast to
size_t first so the size computation stays unsigned. Defensive only;
reaching this path requires registers consuming many gigabytes.

closes: #20207

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-15 16:44:46 +00:00
Christian Brabandt
de7a5b5425 patch 9.2.0486: out-of-bound read when recovering swap files
Problem:  out-of-bound read when recovering corrupted swap files
          (Rahul Hoysala)
Solution: Validate the db_txt_start field when recovering a swap
          file.

Supported by AI

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-15 16:34:53 +00:00
Foxe Chen
e85e3e5d85 patch 9.2.0485: clipboard provider callback can be called recursively
Problem:  clipboard provider callback can be called recursively, leading
          to E132: Function call depth is higher than 'maxfuncdepth'
Solution: Prevent recursive calls of
          clip_provider_copy()/clip_provider_paste() (Foxe Chen).

closes: #20213

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-15 16:00:04 +00:00
Foxe Chen
bec23ef65c patch 9.2.0484: TextPutPre triggers clipboard provider callback twice
Problem:  TextPutPre triggers clipboard provider callback twice
          when do_put() runs autocommands that themselves request
          the clipboard.
Solution: Guard do_put() and put_do_autocmd() with
          inc_clip_provider()/dec_clip_provider() so the provider
          is queried at most once per put operation (Foxe Chen).

closes: #20215

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-15 15:45:11 +00:00
Jonathan Demme
77b8a12f82 runtime(doc): Update 'softtabstop' documentation
closes: #20218

Signed-off-by: Jonathan Demme <j.b.demme@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-15 15:37:31 +00:00
Hirohito Higashi
f281493c49 patch 9.2.0483: popup: terminal embedded in an opacity popup freezes Vim on input
Problem:  When a terminal buffer is shown inside a popup with 'opacity'
          set to a value other than 100, typing into it freezes Vim.
          Only the first keystroke is drawn; afterwards no input is
          processed and the screen stops updating.
Solution: When marking background lines for redraw to keep opacity
          blend cells fresh, do not raise must_redraw.  This marking
          happens from inside update_screen() (via
          may_update_popup_mask()), so raising must_redraw makes
          terminal_loop()'s "while (must_redraw != 0) update_screen()"
          loop never terminate.  Add redraw_win_range_now() that
          updates only the per-window state and use it from
          redraw_win_under_opacity_popup() (Hirohito Higashi)

fixes:  #20214
closes: #20220

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-05-15 15:02:48 +00:00
Foxe Chen
37d61dae72 runtime(doc): update doc for clipboard provider
closes: #20217

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-15 09:46:47 +00:00
Foxe Chen
29fa934344 patch 9.2.0482: runtime(osc52): triggered twice with TextPutPoste autocmd
Problem:  runtime(osc52): triggered twice with TextPutPoste autocmd
Solution: Detect recursive trigger and return null (Foxe Chen)

closes: #20216

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-15 02:09:24 +00:00
Christian Brabandt
8e41c34aba patch 9.2.0481: runtime(netrw): command injection possible via maps
Problem:  runtime(netrw): command injection possible via crafted
          directory names in NetrwMaps() (Christopher Lusk)
Solution: Temporarily remove B flag in NetrwMaps() to prevent command
          injection

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-14 18:52:08 +00:00
Christian Brabandt
8af0f098c3 patch 9.2.0480: [security]: runtime(netrw): code injection via mf command
Problem:  [security]: runtime(netrw): code injection via mf command
          (Christopher Lusk, Zdenek Dohnal)
Solution: Do not use string concatenation inside the filter() commands
          (Zdenek Dohnal)

Github Security Advisory:
https://github.com/vim/vim/security/advisories/GHSA-66hr-7p6x-x5j3

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-14 16:43:15 +00:00
Christian Brabandt
3fb5e58fbc patch 9.2.0479: [security]: runtime(tar): command injection in tar plugin
Problem:  [security]: runtime(tar): command injection in tar plugin
          (Christopher Lusk)
Solution: Use the correct shellescape(args, 1) form for a :! command

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-2fpv-9ff7-xg5w

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-14 15:43:44 +00:00
K.Takata
950f501a18 runtime(doc): Fix file mode for the Italian manpage
closes: #20210

Signed-off-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-14 08:39:03 +00:00
yilisharcs
702d32e161 runtime(compiler): set zig errorformat
includes a new zig_cc file to catch warnings

closes: #20198

Signed-off-by: yilisharcs <yilisharcs@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-12 18:11:55 +00:00
John Marriott
8aecd377f0 patch 9.2.0478: channel: redundant str/length assignments in channel_part_info()
Problem:  channel: redundant str/length assignments in channel_part_info
Solution: Use the STR_LITERAL_SET() macro (John Marriott)

closes: #20199

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-12 17:58:21 +00:00
Yasuhiro Matsumoto
3a9e1bb7e2 patch 9.2.0477: popup: leftover content after popup_free under layout change
Problem:  popup_mask still marks the freed popup's cells as covered
          until may_update_popup_mask() runs inside the next
          update_screen.  Any screen_fill / screen_puts called in
          between (for example msg_clr_eos triggered by a status message
          from :copen) hits skip_for_popup() and silently drops writes
          to those cells, so the popup's chars survive on screen until
          those cells happen to be redrawn for another reason.
Solution: Add popup_clear_mask_for() and call it from popup_hide() and
          popup_free() when the popup was visible, so the upcoming
          writes take effect immediately (Yasuhiro Matsumoto)

Note: The test is limited to MS-Windows because the original report
      (#20178) was reproduced there and the redraw timing required to
      surface the bug differs on other platforms.

fixes:  #20178
closes: #20188

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-12 17:47:41 +00:00
glepnir
38237411e4 patch 9.2.0476: pattern completion leaks memory on alloc failures
Problem:  copy_substring_from_pos() leaked on ga_grow() failures,
          expand_pattern_in_buf() leaked "match" on ga_grow() failure,
          fuzzy_match_str_with_pos() ignored ga_grow() failures
Solution: Route failures through cleanup paths, check ga_grow before
          writing to ga_data (glepnir)

closes: #20203

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-12 17:40:19 +00:00
Antonio Giovanni Colombo
78302b7b4a translation(it): Update Italian manpage
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-12 17:30:26 +00:00
Foxe Chen
f45ed6465d runtime(hlyamk): Allow to highlight put regions using TextPutPost
closes: #20196

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-11 17:23:01 +00:00
J. Paulo Seibt
74019bea8c patch 9.2.0475: runtime(netrw): bookmark paths not normalized
Problem:  the bookmarks list can have duplicate entries, more often
          in win32 (due to mixed slashes and capitalization) and when
          g:netrw_keepdir=0 (which could introduce relative paths).
          Duplicate entries could be: C:\foo\BAR\baz.file
                                     c:\foo\bar\baz.file
                                     c:/foo\BAR/baz.file
                                     BAR/baz.file
Solution: Normalize the paths and make sure they are always absolute
          (J. Paulo Seibt).

closes: #20194

Signed-off-by: J. Paulo Seibt <jpseibt@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-11 17:10:55 +00:00
K.Takata
7784fac15f patch 9.2.0474: MS-Windows: hard to tell which Visual Studio version was selected with MSVC
Problem:  When running msvc*.bat there is no indication of which
          Visual Studio version and target architecture got
          selected.
Solution: After vcvarsall.bat returns, echo the VS version, VC
          tools version and target architecture, and set the
          Command Prompt title accordingly (Ken Takata).

closes: #20193

Signed-off-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-11 16:58:24 +00:00
zeertzjq
a70b7a85af patch 9.2.0473: Pasting ". register without autocommands breaks TextPut*
Problem:  Pasting ". register without TextPut* autocommands breaks
          subsequent TextPut* autocommands (after 9.2.0470).
Solution: Only decrement add_last_insert if it has been incremented
          (zeertzjq).

closes: #20192

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-11 16:49:19 +00:00
Yasuhiro Matsumoto
51f1447d2a patch 9.2.0472: popup: column jitters when scrolled outside viewport
Problem:  popup: column jitters horizontally when textprop is scrolled
          above the host window's top (after v9.2.0469)
Solution: Compute the virtual column from the prop's actual line via
          getvcol() and translate it through prop_win's win_col_off /
          leftcol / wincol (Yasuhiro Matsumoto).

popup_screenpos_above_top() probed textpos2screenpos() at
prop_win->w_topline using the prop's own tp_col, so the returned
screen_scol picked up topline's tab stops and multi-byte widths instead
of the prop line's own.  Once the textprop scrolled above the host's
top, the popup's wincol jittered left/right every time a wider or
narrower line rotated into the topmost slot.

Compute the virtual column from the prop's actual line via getvcol()
and translate it through prop_win's win_col_off / leftcol / wincol.
Row extrapolation from topline is unchanged.

closes: #20187

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-11 16:29:27 +00:00
John Marriott
1b65cfbac5 patch 9.2.0471: vimvars di_key initialized at runtime
Problem:  evalvars_init() copies each vimvar's name into di_key at
          startup and runtime-checks that the name fits in
          DICTITEM16_KEY_LEN, even though all names are known at
          compile time.
Solution: Embed the name in di_key via the VV_NAME macro so the
          initialization happens at compile time.  Drop the
          runtime length check and the STRCPY loop (John Marriott).

closes: #20185

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-11 16:22:05 +00:00
Matthew Fernandez
852f4f43ca runtime(doc): Fix manpage typo in description of '--ttyfail'
This seems to have been accidentally introduced in
ce6fe84db2.

closes: #20186

Signed-off-by: Matthew Fernandez <matthew.fernandez@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-11 16:19:16 +00:00
Christian Brabandt
bfebd1209b runtime(javacc): Check for existence of javaFuncDef syn group before clearing it
fixes: #20190

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-11 10:15:02 +02:00
Foxe Chen
e0781bd5bf patch 9.2.0470: No way to hook into put commands
Problem:  No way to hook into put commands
          (yochem)
Solution: Introduce TextPutPre and TextPutPost autocommands
          (Foxe Chen).

fixes:  #18701
closes: #20144

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-10 19:17:19 +00:00
Yasuhiro Matsumoto
e3d9929109 patch 9.2.0469: popup: textprop-anchored popups bleed past host window edges
Problem:  A popup anchored to a text property in a split window is
          positioned relative to the screen and may extend into
          adjacent splits or off-screen regions.  There is no way to
          confine the popup to the window that contains the textprop.
Solution: Add the "clipwindow" popup option to allow clipping the text
          property popup to the host window (Yasuhiro Matsumoto).

Adds a "clipwindow" boolean option to popup_create()/popup_setoptions().
When set on a textprop-anchored popup, the popup's drawn extent is
confined to its host (textprop) window's content rectangle so the popup
no longer bleeds across a horizontal split's statusline (top/bottom) or
a vsplit's separator (right) into another window.

The popup keeps its full logical size and position; only the rows or
columns that fall outside the host window's content area are skipped
during drawing, so a popup that scrolls toward the host's edge looks
visually "cut off" without its borders being relocated.  popup_getoptions
and popup_getpos continue to report the unclipped geometry.

Implementation:

  - w_popup_topoff / w_popup_bottomoff record how many rows of the
    popup fall outside the host on each side.  popup_adjust_position()
    computes them from the host rectangle after the logical layout is
    finalised, and update_popups() and the popup-mask builder subtract
    them when emitting cells/borders/scrollbar and when marking
    popup-owned cells.  win_update() is bracketed by transient
    w_height/w_topline/w_winrow adjustments so the buffer's drawn
    content matches the visible row range.

  - w_popup_rightclip is the horizontal counterpart for the host's
    right edge: the right border, padding and content columns past
    the host are not drawn.  win_update() is bracketed by a transient
    w_width reduction so the buffer text is not written past the
    host's right edge either.

  - When the textprop scrolls just above the host window's top, the
    popup is kept visible by extending the prop search above topline
    (new helper find_prop_in_lines) and synthesising a negative
    screen_row so the top-clip path can roll the popup off the top.
    When the textprop has scrolled far enough that even the bottom
    border would overlap the host edge -- or when the popup would
    overflow the host's left edge at all -- the popup is hidden, and
    unhidden again once it comes back within range.

  - The "reduce-height" / "clamp winrow to 0" fallbacks in
    popup_adjust_position are bypassed for host-clipped popups so the
    popup keeps its natural anchored position instead of being
    snapped to the screen edge.

    Left-edge partial clipping is intentionally not supported: it
    would require shrinking the buffer width during win_update, which
    reflows wrapped lines and corrupts the displayed content; the
    popup is hidden instead.

closes: #20166

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-10 19:02:38 +00:00
Yasuhiro Matsumoto
ef1ecc3b61 patch 9.2.0468: popups: not correctly updated from a CmdlineChanged autocommand
Problem:  popup_show() from a CmdlineChanged autocommand doesn't update
          the screen (Mao-Yining)
Solution: Refresh the screen when popups need redraw
          (Yasuhiro Matsumoto).

popup_settext()/popup_show() called from a CmdlineChanged autocommand
did not refresh the screen because cmdline mode normally skips
update_screen(), so async info-popup updates only became visible after
a manual :redraw.  Refresh the screen when popups need redrawing right
after the autocommand.

fixes:  #20175
closes: #20179

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-10 18:20:01 +00:00
Hirohito Higashi
5ef1eec5c5 patch 9.2.0467: multi-line statusline loses highlighting attributes
Problem:  In a multi-line statusline (and 'tabpanel'), %#XX# / %N*
          set on one row do not persist on subsequent rows.
          build_stl_str_hl_local() rebuilds stl_items[] from scratch
          on every line break ("%@" or "\n"), so the highlight is
          reset at each row boundary even though within a row it
          stays until %* (or another %# / %*).
Solution: Carry the last Highlight item's stl_minwid across line
          breaks via a new in/out int* parameter "carry_hl".  At the
          start of each row, pre-insert a Highlight item from the
          carried value so the row begins under the same highlight;
          before returning, update the carried value with the row's
          final Highlight item.  Apply the same carry to the
          tabpanel rendering loop (Hirohito Higashi).

related: #19123
closes:  #20180

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-05-10 18:14:01 +00:00
Yasuhiro Matsumoto
3a8b9e09b2 patch 9.2.0466: popup: redraw can use stale blended cells
Problem:  popup: redraw can use stale blended cells
Solution: Save the old popup area and redraw the newly exposed region so
          opacity popups don't show stale blended cells when another
          popup moves or closes. Consolidate redraw helpers so the
          saved-area and exposed-area logic is shared across
          move/hide/close/settext/setoptions. Refactor popup redrawing
          code, add a regressions tests (Yasuhiro Matsumoto).

closes: #20172

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-10 17:23:12 +00:00
Christian Brabandt
2020e0bade patch 9.2.0465: modeline: foldmarker cannot be set with modelinestrict
Problem:  modeline: foldmarker cannot be set with modelinestrict
          (Lyderic Landry, after v9.2.0350)
Solution: Add foldmarker option to the whitelist

fixes:  #20028
closes: #20174

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-10 17:00:59 +00:00
J. Paulo Seibt
ec76ac620b patch 9.2.0464: runtime(netrw): bookmarking directory uses current dir
Problem:  runtime(netrw): bookmarking directory uses current dir
Solution: Correctly handle netrw actual directory (J. Paulo Seibt)

fixes:  #10481
closes: #20169

Signed-off-by: J. Paulo Seibt <jpseibt@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-10 16:55:18 +00:00
Yegappan Lakshmanan
6b8d2262d3 patch 9.2.0463: Not able to use legacy expression evaluation in a vim9script maps
Problem:  Not able to use legacy expression evaluation in a vim9script
          maps
Solution: Explicitly set script version to 1 when the :legacy modifier has been
          used (Yegappan Lakshmanan).

fixe:   #20176
closes: #20177

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-10 16:41:35 +00:00
K.Takata
3a1ac7ced2 patch 9.2.0462: MS-Windows: workaround for assert error on GUI
Problem:  When Vim is built with debug mode, gvim causes an assertion
          error and stops working when running on Visual Studio
          Debugger.
Solution: Stop calling _set_fmode() if not needed (Ken Takata).

closes: #20181

Signed-off-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-10 16:34:01 +00:00
Christian Brabandt
4f610f07b7 patch 9.2.0461: Corrupted undofile causes use-after-free
Problem:  The four pointer-resolution loops in u_read_undo() lack
          an i != j guard, so a header whose uh_next.seq equals
          its own uh_seq resolves uh_next.ptr to itself.  On
          buffer close, u_freeheader() sees uhp->uh_next.ptr !=
          NULL and skips updating b_u_oldhead, so u_blockfree()
          dereferences the freed header on the next iteration.
          The same pattern applies to uh_prev, uh_alt_next and
          uh_alt_prev.  A crafted .un~ file in the same directory
          as a text file can trigger the use-after-free and
          subsequent double-free when the buffer is closed.
          (Daniel Cervera)
Solution: Add an i != j guard to each of the four resolution
          loops, matching the guard already present in the
          duplicate-detection loop above.

closes: #20168

Supported by AI

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-09 14:41:37 +00:00
zeertzjq
abd74fa122 patch 9.2.0460: did_set_shellpipe_redir() in wrong file
Problem:  did_set_shellpipe_redir() is a callback for a string option,
          but is not in optionstr.c (after 9.2.0458).
Solution: Move it to optionstr.c. Also add missing change from patch
          9.2.0455 (zeertzjq).

related: #20159
related: #20164
closes:  #20170

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-09 14:22:47 +00:00
Christian Brabandt
124f8becec patch 9.2.0459: tests: test_termcodes fails (after v9.2.0456)
Problem:  tests: test_termcodes fails, because it disabled DECRQM, but
          did not adjust the expected values in the test (after v9.2.0456)
Solution: Update the test

related: #20161
closes:  #20173

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-09 14:13:52 +00:00
dependabot[bot]
fbec828c7e CI: Bump the github-actions group across 1 directory with 2 updates
Bumps the github-actions group with 2 updates in the / directory: [github/codeql-action](https://github.com/github/codeql-action) and [actions/labeler](https://github.com/actions/labeler).

Updates `github/codeql-action` from 4.35.2 to 4.35.3
- [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.2...v4.35.3)

Updates `actions/labeler` from 6 to 6.0.1
- [Release notes](https://github.com/actions/labeler/releases)
- [Commits](https://github.com/actions/labeler/compare/v6...v6.0.1)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.35.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: actions/labeler
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

closes: #20171

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-09 13:49:57 +00:00
Christian Brabandt
84ae09dd79 patch 9.2.0458: Crash with invalid shellredir/shellpipe value
Problem:  Crash with invalid shellredir/shellpipe value
          (bfredl)
Solution: Validate the option and allow only a single "%s".

fixes:  #20157
closes: #20159

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-08 21:32:21 +00:00
Christian Brabandt
2f00656b34 patch 9.2.0457: Compile warning about unused variable
Problem:  Compile warning about unused variable
          (Tony Mechelynck, after v9.2.0452)
Solution: Initialize the variable

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-08 21:22:28 +00:00
Foxe Chen
7644d9d611 patch 9.2.0456: stray p character displayed on some terms
Problem:  stray p character displayed on some terms
Solution: Make sending DECRQM more strict and disable it for a few more
          terminals (Foxe Chen)

fixes:  #20156
fixes:  #20140
closes: #20161

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-08 21:14:52 +00:00
zeertzjq
9694ff58fe patch 9.2.0455: 'findfunc' only allows extra info for cmdline completion
Problem:  'findfunc' only allows extra info for cmdline completion, not
          for actually finding files (Maxim Kim, after 9.2.0451).
Solution: Handle returning a list of dicts when actually finding files.
          Also fix crash on NULL string (zeertzjq).

fixes:  #20163
closes: #20164

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-08 21:09:48 +00:00
zeertzjq
b207b5a2a3 patch 9.2.0454: tests: no test that "abbr" in customlist completion is shown
Problem:  No test that "abbr" in customlist completion is shown in pum.
Solution: Add some "abbr" fields to the existing test (zeertzjq).

closes: #20165

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-08 21:06:08 +00:00
Hirohito Higashi
c895390e58 patch 9.2.0453: vertical separator of statusline blend into active statusline
Problem:  Since v9.2.0349, the vertical separator cell at status line
	  rows is drawn as a space with StatusLine highlight, hiding the
	  user's 'fillchars' "vert" or "stl"/"stlnc" character at that
	  cell (after v9.2.0349)
Solution: Drop the status line blend.  At status line rows the separator
	  cell goes back to using the status fillchar when adjacent
	  status lines are connected, or the vsep character otherwise.
	  (Same as before v9.2.0348)

Keep the VertSplitNC highlight group introduced in v9.2.0349.  The
highlight (VertSplit vs VertSplitNC) is selected based on whether the
current window is adjacent to the separator at the row.

Vertical separators are redrawn on current-window changes and on
:redrawstatus[!] so the VertSplit/VertSplitNC highlight is updated
immediately.

fixes:   #20089
related: #19951
closes:  #20167

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-05-08 21:03:12 +00:00
Yasuhiro Matsumoto
b9871cef10 patch 9.2.0452: screen.c popup opacity blend logic is duplicated
Problem:  screen_line() has four near-identical blocks computing
          the popup_attr, the combined attr, the blend value and
          the underlying base attr in sequence when handling popups
          with opacity.  The duplication makes the function long
          and hard to follow, and changes have to be applied to all
          four sites.
Solution: Extract the shared computation into popup_blend_with_base()
          and popup_base_attr_or() helpers, and cache per-popup
          attrs once via popup_opacity_T.  No behavior change
          (Yasuhiro Matsumoto).

closes: #20154

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-07 19:40:16 +00:00
zeertzjq
58124789aa patch 9.2.0451: 'findfunc' can't return extra info for cmdline completion
Problem:  'findfunc' can't return extra info for cmdline completion
          (Maxim Kim).
Solution: Handle 'findfunc' return value in cmdline completion like that
          of "customlist" functions (zeertzjq).

fixes:  #20155
closes: #20158

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-07 19:32:23 +00:00
Christian Brabandt
9299332917 patch 9.2.0450: [security]: heap buffer overflow in spellfile.c read_compound()
Problem:  read_compound() in spellfile.c computes the size of the regex
          pattern buffer using signed-int arithmetic on the attacker
          controlled SN_COMPOUND sectionlen.  With sectionlen=0x40000008
          and UTF-8 encoding active the multiplication wraps to 27 while
          the per-byte loop writes up to ~1B bytes, overflowing the heap.
          Reachable when loading a crafted .spl file (e.g. via 'set spell'
          after a modeline sets 'spelllang').  The cp/ap/crp allocations
          have the same int + 1 overflow class (Daniel Cervera)
Solution: Use type size_t as buffer size and reject values larger than
          COMPOUND_MAX_LEN (100000).  Apply the same size_t treatment to
          the cp/ap/crp allocations.

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-q4jv-r9gj-6cwv

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-07 18:49:53 +00:00
Yasuhiro Matsumoto
4cbdef8e30 runtime(vim9): Check cmd.exe on WSL is executable
closes: #20150

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-06 18:24:51 +00:00
Christian Brabandt
0ab4316fce patch 9.2.0449: Make proto fails in non GTK builds
Problem:  Make proto fails when not building the GTK gui
Solution: Test for $GLIB_COMPILE_RESOURCES as done elsewhere

closes: #20145

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-06 18:17:00 +00:00
Yasuhiro Matsumoto
4bcc8ba93d patch 9.2.0448: Vim9: dangling cmdline pointer after skip_expr_cctx()
Problem:  Vim9: dangling cmdline pointer after skip_expr_cctx()
          (Foxe Chen)
Solution: Extract the cmdline restoration logic from compile_lambda into
          a helper restore_cmdline_arg() and call it from
          skip_expr_cctx() too, so a skipped lambda inside an "else"
          branch does not leave "*arg" pointing into freed evalarg
          memory (Yasuhiro Matsumoto).

fixes:  #20147
closes: #20148

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-06 18:02:09 +00:00
magnus-rattlehead
c06002f3cb patch 9.2.0447: cindent does not ignore comments
Problem:  When find_start_brace() scans backwards for the enclosing
          block, '{' and '}' inside // and /* */ comments are counted,
          producing wrong indent for code following such comments
          (rendcrx).
Solution: Implement FM_SKIPCOMM in findmatchlimit() to track block-
          comment state and skip matches inside comments. Pass
          FM_SKIPCOMM from cindent's call sites
          (find_start_brace, find_match_char, cin_iswhileofdo,
          get_c_indent).

fixes:  #4
fixes:  #648
fixes:  #19578
closes: #19581
closes: #20111

Signed-off-by: magnus-rattlehead <guranjakustivi@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-05 21:14:33 +00:00
J. Paulo Seibt
7ccc273a4c patch 9.2.0446: runtime(netrw): off-by-one bug in s:NetrwUnMarkFile()
Problem:  off-by-one bug in s:NetrwUnMarkFile()
Solution: Correctly loop through all buffers to unlet all variables
          (J. Paulo Seibt)

When the function loops through buffers to clear s:netrwmarkfilelist_#
and s:netrwmarkfilemtch_#, it skips the last one at bufnr('$'), messing
up mark highlights and causing other functions that operate on those
arrays (like delete or rename) to target stale marked files.

The bufnr() help page says that bufnr("$") returns the highest buffer
number of existing buffers, so while ibuf < bufnr("$") does not clear
the last buffer-local arrays.

To reproduce:

Just opening a fresh Vim and running :Ex opens a netrw buffer at the
highest number. Then, typing mu after marking some files triggers the
mark highlight bug, and finally typing D would act like calling the
delete function against the previous marked files, as the buffer-local
arrays where not touched by s:NetrwUnMarkFile.

closes: #20129

Signed-off-by: J. Paulo Seibt <jpseibt@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-05 20:09:58 +00:00
Jesse Rosenstock
40fc78f0a1 patch 9.2.0445: win_fix_scroll() called before win_comp_pos() in command_height()
Problem:  win_fix_scroll(true) is called before win_comp_pos() in
          command_height().
Solution: Move win_fix_scroll(true) after win_comp_pos(), matching the
          ordering used in win_drag_status_line() (Jesse Rosenstock).

Patch 9.2.0413 added win_fix_scroll(true) to command_height() to handle
splitkeep when cmdheight changes, but placed the call before win_comp_pos().
win_fix_scroll() reads w_winrow to detect window movement
(620557bd48/src/window.c (L7266)),
but w_winrow is not recomputed until win_comp_pos() runs
(620557bd48/src/window.c (L6516)).
This causes incorrect scroll adjustments and was breaking
Test_smoothscroll_incsearch on macOS CI.

closes: #20138

Co-authored-by: Gemini
Signed-off-by: Jesse Rosenstock <jmr@google.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-05 19:50:46 +00:00
Christian Brabandt
88fb739918 patch 9.2.0444: Cannot set 'path' option via modeline
Problem:  Cannot set 'path' option via modeline (zeertzjq, after v9.2.0435)
Solution: Revert the part that disallows setting 'path' via modeline.

closes: #20137

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-05 19:47:19 +00:00
Hirohito Higashi
cf947e7ef0 patch 9.2.0443: GUI: cancelling save dialog overwrites or discards unnamed buffer
Problem:  When closing gvim with an unsaved unnamed buffer, choosing
          "Yes" in the "Save changes?" dialog and then "Cancel" in the
          file selection dialog either silently writes the buffer to a
          file named "Untitled" (overwriting any existing file with
          that name) or discards the buffer altogether
          (vibs29, after v9.1.0265).
Solution: In dialog_changed(), if browse_save_fname() leaves the buffer
          without a file name, treat it as a cancel and return without
          saving.  Also stop clearing the modified flag in the restore
          path on write failure, so the unsaved changes are kept and
          the caller (e.g. gui_shell_closed()) can also cancel the
          close.  Pre-fill the file dialog with "Untitled" to match
          the preceding "Save changes to ..." prompt.  Add a test for
          the write-failure path (Hirohito Higashi).

fixes:  #20132
closes: #20143

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-05 19:02:59 +00:00
zeertzjq
2bfddbea47 patch 9.2.0442: completion: i_CTRL-X_CTRL-V doesn't use dict from customlist
Problem:  Completion with i_CTRL-X_CTRL-V doesn't use dict from cmdline
          "customlist" completion.
Solution: Include abbr/kind/menu/info in the completion items
          (zeertzjq).

closes: #20139

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-05 18:56:56 +00:00
Arnaud Rebillout
1903020b82 runtime(autopkgtest): update syntax script
Fix some typos, and move a deprecated keyword where it belongs

closes: #20141

Signed-off-by: Arnaud Rebillout <arnaudr@debian.org>
Signed-off-by: James McCoy <jamessan@jamessan.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-05 18:53:33 +00:00
mityu
b10159bcc2 Fix wrong comment in getchar.c
The comment for `do_key_input_pre()` function says that it handles the
InsertCharPre autocommand, but what the function actually handles is the
KeyInputPre autocommand.

closes: #20142

Signed-off-by: mityu <mityu.mail@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-04 20:24:07 +00:00
Hirohito Higashi
8c7d824b73 patch 9.2.0441: statusline: click handler not called on multi-line statusline
Problem:  With a multi-line statusline clicking on a "%[FuncName]...%[]"
          or "%@FuncName@..." region defined on a row other than the
          last drawn row does not invoke the handler (Christian
          Robinson, after v9.2.0338)
Solution: In win_redr_custom() the click region table reflects only the
          last iteration of the per-row draw loop, so click regions are
          recorded only for the last row.  Move the click-region
          resolution inside the loop and append regions for each row
          using vim_realloc().  This also fixes a leak of
          clicktab[].funcname for non-last rows (Hirohito Higashi).

fixes:  #20116
closes: #20120

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-05-04 20:03:46 +00:00
Yasuhiro Matsumoto
0c998003bc patch 9.2.0440: MS-Windows: cursor flicker during update_screen()
Problem:  MS-Windows: cursor flicker during update_screen()
Solution: Hide the cursor during update_screen() to avoid Windows ConPTY
          flicker (Yasuhiro Matsumoto).

On terminals that do not honor synchronized output mode (e.g. Windows
ConPTY), update_screen() emits cell positioning and content as multiple
Win32 console writes through mch_write(), which the terminal renders as
separate frames.  This shows up as the cursor briefly jumping to column
1 of rows being redrawn, especially during async redraws around the
popup completion menu.

Disable the cursor with cursor_off() at the start of update_screen()
and restore it with cursor_on() at the end, but only when synchronized
output mode is not active.  When it is, the redraw is already atomic
from the terminal's view and hiding the cursor would only add visible
blink with no benefit.

closes: #20121

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-04 19:58:27 +00:00
zeertzjq
3bfffcc290 patch 9.2.0439: completion: info popup not removed in cmdline mode
Problem:  Info popup isn't removed when selecting an item that doesn't
          have "info" in cmdline completion, which is inconsistent with
          Insert mode behavior.
Solution: Set pum_call_update_screen in cmdline mode (zeertzjq).

closes: #20128

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-04 19:53:10 +00:00
Jesse Rosenstock
20a124a6e0 patch 9.2.0438: tests: test_plugin_termdebug is flaky
Problem:  Test_termdebug_tbreak(), Test_termdebug_basic(), and
          Test_termdebug_toggle_break() use synchronous assert_equal()
          to check breakpoint signs immediately after sending commands
          to gdb.  On slow CI (ASAN, ARM64, macOS) gdb may not have
          processed the response yet, causing the sign to be missing.
Solution: Wrap the three assertions in WaitForAssert() to poll until
          the signs are placed, matching the pattern already used by
          the other assertions in the same tests (Jesse Rosenstock).

closes: #20133

Co-authored-by: Gemini
Signed-off-by: Jesse Rosenstock <jmr@google.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-04 19:22:25 +00:00
Hirohito Higashi
bb807ebc8a runtime(doc): Tweak documentation style
closes: #20134

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-04 19:17:52 +00:00
Felipe Matarazzo
cb0b4cf45c Fix a few more typos
closes: #20135

Signed-off-by: Felipe Matarazzo <felipemps@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-04 19:10:37 +00:00
Yasuhiro Matsumoto
9d3019104c patch 9.2.0437: MS-Windows: cursor flicker in vtp mode
Problem:  MS-Windows: cursor flicker in vtp mode
Solution: Skip mch_update_cursor() in cursor_visible() when vtp is
          active (Yasuhiro Matsumoto).

In vtp (ConPTY) mode the cursor visibility is controlled by DECTCEM
(\033[?25h / \033[?25l).  The follow-up call to mch_update_cursor() then
re-emits DECSCUSR (\033[0 q etc.) on every visibility toggle even though
the cursor shape did not change.  Some terminals briefly redisplay the
cursor when DECSCUSR arrives, so this can cause a visible flash at the
position the cursor will be moved to next (e.g. column 0 ahead of a line
redraw).

In non-vtp mode the call is still required because SetConsoleCursorInfo()
inside mch_set_cursor_shape() reads s_cursor_visible to apply the
visibility change, so keep that path unchanged.

closes: #20122

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-03 18:37:05 +00:00
Christian Brabandt
77677c33de patch 9.2.0436: Buffer overflow when parsing overlong errorformat lines
Problem:  When an error line in a file passed to :cfile / :cgetfile is
          longer than IOSIZE, qf_parse_file_pfx() copies the tail
          into the fixed-size IObuff with STRMOVE(), overflowing the heap buffer.
          The same code path can also loop indefinitely because
          qf_parse_file_pfx() always returns QF_MULTISCAN when a
          tail is present, and qf_init_ext() unconditionally goes
          to "restofline" without bounding the tail length (Nabih).
Solution: Remove the STRMOVE() into IObuff.  In the QF_MULTISCAN
          branch, alias linebuf into the tail directly and update
          linelen, requiring strict progress (new length less than
          the previous length) before retrying; otherwise ignore
          the line.

closes: #20126

Supported by AI

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-03 18:33:39 +00:00
Christian Brabandt
190cb3c2b9 patch 9.2.0435: [security]: backticks in 'path' may cause shell execution on completion
Problem:  [security]: Backticks enclosed shell commands in the 'path'
          option value are executed during completion (q1uf3ng).
Solution: Skip path entries containing backticks, add P_SECURE to 'path'
          option, so that it cannot be set from a modeline (for symmetry with
          the 'cdpath' option)

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-hwg5-3cxw-wvvg

Supported by AI.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-03 18:17:02 +00:00
Christian Brabandt
fde5a56ecb patch 9.2.0434: cscope: filename interpreted by /bin/sh
Problem:  cs_create_connection() builds the cscope command by
          interpolating csinfo[i].fname (and ppath, flags) into a
          string and lets the shell parse it.  Shell metacharacters
          in a database filename are therefore evaluated by /bin/sh
          before cscope is exec'd, rather than being passed through as a
          literal path (q1uf3ng)
Solution: Build argv directly and execvp() the cscope binary
          without an intervening shell.

closes: #20119

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-03 17:47:50 +00:00
Yasuhiro Matsumoto
5c700152ae patch 9.2.0433: customlist completion cannot supply pum metadata
Problem:  customlist completion cannot supply pum metadata
Solution: Allow each item returned by a customlist function to be
          either a string or a Dict with keys "word", "abbr", "kind",
          "menu" and "info" (Yasuhiro Matsumoto).

closes: #20100

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-02 16:11:01 +00:00
Yasuhiro Matsumoto
3bd25c63b4 patch 9.2.0432: blob to string conversion can be improved
Problem:  blob to string conversion can be improved
Solution: Compute the output size up front and use a single alloc plus
          mch_memmove() (Yasuhiro Matsumoto).

Replace per-byte ga_append/snprintf loops with bulk allocation and
mch_memmove in three hot paths: blob2string() (used by string()),
string_from_blob(), and the UTF-16/UCS path of f_blob2str(). For a
16 MiB blob, string(blob) is ~28x faster and blob2str() is ~2x faster.

Benchmark (16 MiB blob, 5 iterations, total seconds):

| | Before | After | Speedup |
|---|---:|---:|---:|
| `string(blob)` | 6.422 | 0.225 | 28.5x |
| `blob2str(b)` | 0.504 | 0.265 | 1.90x |
| `blob2str(b, {encoding: 'utf-8'})` | 0.507 | 0.282 | 1.80x |
| `blob2str(b, {encoding: 'utf-16le'})` | 0.407 | 0.202 | 2.01x |

closes: #20112

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-02 15:49:17 +00:00
Yasuhiro Matsumoto
e1e92fea92 patch 9.2.0431: blob encoding can be improved
Problem:  blob encoding can be improved
Solution: Speed up blob encoding by avoiding per-byte ga_append()
          (Yasuhiro Matsumoto)

Replace the per-byte ga_append loop in the VAR_BLOB branch of
json_encode_item() with a single ga_grow for the worst case
(2 + 4 * blen) and direct writes through a local pointer. Also
read blob bytes through a local char_u* instead of going through
blob_get() for each byte.

Benchmark (1 MiB blob, 5 iterations, total seconds, median of 3 runs):

| byte distribution | Before | After | Speedup |
|---|---:|---:|---:|
| 1-digit (0–9)     | 0.0254 | 0.0174 | 1.46x |
| 2-digit (10–99)   | 0.0344 | 0.0064 | 5.38x |
| 3-digit (100–255) | 0.0539 | 0.0102 | 5.28x |
| mixed (0–255)     | 0.0335 | 0.0093 | 3.60x |

closes: #20113

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-02 15:39:55 +00:00
Yasuhiro Matsumoto
2219c89013 patch 9.2.0430: tests: Test_shortmess_F3() is flaky on MS-Windows
Problem:  tests: Test_shortmess_F3() is flaky on MS-Windows
Solution: Increase the sleep to 3s (Yasuhiro Matsumoto)

On MS-Windows time_differs() treats mtime as unchanged unless st_mtime
differs by more than 1 second, so a 2-second sleep can fall short when
the two writes straddle a second boundary. Bump the non-nanotime sleep
to 3 seconds.

closes: #20117

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-02 15:20:18 +00:00
Yasuhiro Matsumoto
e25933014c patch 9.2.0429: tests: flaky screendump Test_smoothscroll_incsearch()
Problem:  tests: flaky screendump Test_smoothscroll_incsearch()
Solution: Replace screendump test by WaitForAssert()
          (Yasuhiro Matsumoto)

VerifyScreenDump fails consistently on the macos-15-intel CI runner.
Replace the dump comparisons with assertions that verify the actual
invariant under test: that the visible buffer view stays unchanged
across the four incremental-search keystrokes (i.e. skipcol is not
reset). Drop the now-unused dump files.

closes: #20118

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-02 13:29:01 +00:00
Doug Kearns
e4413c5df7 runtime(algol68): Update syntax file, match symbolic identity relators
closes: #20109

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-01 16:35:57 +00:00
Yasuhiro Matsumoto
59e59a62b4 patch 9.2.0428: popup: no opacity support for completepopup/previewpopup
Problem:  popup: no opacity support for completepopup/previewpopup
Solution: Add support opacity: suboption for the 'completeopt'.

Accepts opacity:0-100 with the same semantics as popup_create()'s
opacity option, allowing the info / preview popup to blend with
the background.

closes: #20099

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-01 16:32:44 +00:00
Yasuhiro Matsumoto
7b218ae98c patch 9.2.0427: popup: opacity blend may leaks white bg color
Problem:  popup: opacity blend may leaks white bg color
Solution: Add cterm color blending for 256 color terminals, use
          COLOR_INVALID() macro to check for invalid color
          (Yasuhiro Matsumoto)

When a textprop highlight only set gui=undercurl/guisp (no fg/bg), the
CTERMCOLOR sentinel was treated by hl_blend_attr() as a real near-white
color, leaking white bg onto textprop-covered cells under an opacity
popup or pum.  Add a cterm color blending path that approximates blends
in the xterm 256-color palette using the gui RGB when available, so
opacity now has a visible effect even without 'termguicolors' (in
256-color terminals).  Below 256 colors the blend is skipped.

Also document the requirement (GUI, 'termguicolors', or 256-color
terminal) and update existing pumopt/popupwin opacity screendumps to
reflect the new blended output.

closes: #20095

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-01 16:22:32 +00:00
Yasuhiro Matsumoto
cf5d7102b9 patch 9.2.0426: tests: still some flaky screendump tests
Problem:  tests: still some flaky screendump tests
          (James McCoy)
Solution: Replace flaky VerifyScreenDump checks with assert_* assertions
          for Test_visual_block_scroll and Test_scrolloffpad_with_folds,
          and remove the now-unused dump files, mark those tests as
          flaky (which happened previously for screendump tests
          automatically) (Yasuhiro Matsumoto).

fixes:   #20096
related: #20095

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-01 16:20:43 +00:00
Shougo Matsushita
d25f8d1b2c patch 9.2.0425: Cannot silence undo/redo messages
Problem:  Cannot silence undo/redo messages
Solution: Add "u" flag to 'shortmess' option
          (Shougo Matsushita).

fixes:  #20049
closes: #20107

Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-01 14:54:56 +00:00
Yasuhiro Matsumoto
ec8b8bd82a patch 9.2.0424: popup: flicker when wildtrigger() refreshes the popup menu
Problem:  popup: flicker when wildtrigger() refreshes the popup menu
Solution: Wrap the pum teardown and cmdline redraw in synchronized
          terminal output (Yasuhiro Matsumoto).

Reduces flicker when wildtrigger() refreshes the popup on every
keystroke and the cmdline is wrapped: the un-scroll inside
update_screen() and the re-scroll inside redrawcmd() are emitted as
one atomic terminal update.

closes: #20081

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-01 13:29:01 +00:00
Yasuhiro Matsumoto
587447ec64 patch 9.2.0423: popup: wrapped cmdline truncated with wildoptions=pum
Problem:  popup: wrapped cmdline truncated with wildoptions=pum
Solution: Call msg_starthere() in redrawcmd() to reset lines_left
          before each redraw (Yasuhiro Matsumoto).

redrawcmd() leaves lines_left at its previous value, which decrements
across successive redraws (e.g. when wildtrigger() refreshes the popup
on every keystroke) until 0, after which msg_no_more aborts drawing
the wrapped cmdline. Call msg_starthere() to reset it.

related: #20081

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-01 13:25:31 +00:00
Yasuhiro Matsumoto
ba85f88fe9 patch 9.2.0422: popup: leave stray char when scrollbar changes
Problem:  popup: leave stray char when scrollbar changes
          (Maxim Kim, after v9.2.0112)
Solution: refresh popup mask when scrollbar visibility changes
          (Yasuhiro Matsumoto)

popup_adjust_position() set popup_mask_refresh only on geometry
changes, missing the case where w_has_scrollbar flips. After
popup_settext() shrinks the buffer enough that the scrollbar
disappears, the cell that held the old border / scrollbar was
never repainted, leaving stray characters.

fixes:  #20092
closes: #20098

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-05-01 13:12:11 +00:00
Ivan Pešić
7f3243e3a8 translation(sr): Update of Serbian translation
closes: #20105

Signed-off-by: Ivan Pešić <27575106+eevan78@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-30 18:06:46 +00:00
Léana 江
7da90de1cb runtime(cabal): add missing haskell language editions
closes: #20097

Signed-off-by: Léana 江 <leana.jiang+git@icloud.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-30 18:01:17 +00:00
Hirohito Higashi
f793e98068 runtime(doc): clarify separator cell on status line rows
- Expand hl-VertSplit / hl-VertSplitNC in syntax.txt to spell out which
  character (space vs 'fillchars' "vert") and which highlight group
  (StatusLine / StatusLineNC / VertSplit / VertSplitNC) are used at the
  separator cell on each kind of screen row.
- Add cross references from hl-StatusLine and hl-StatusLineNC to
  hl-VertSplit / hl-VertSplitNC.

The behavior itself is unchanged — see v9.2.0349 (c72196529) — but the
asymmetry reported in #20089 surprised users, so this aims to make the
spec discoverable from the highlight group docs.

closes: #20101

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-29 21:44:12 +00:00
Christian Brabandt
620557bd48 runtime(doc): Update help tags file
forgotten from Commit e7e35b9e38

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-29 21:22:48 +00:00
Christian Brabandt
e7e35b9e38 runtime(doc): clarify that viminfo file should be trusted
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-29 21:17:11 +00:00
Christian Brabandt
77499e009a patch 9.2.0421: vimball: can smuggle Vimscript into VimballRecord file
Problem:  vimball: can smuggle Vimscript into VimballRecord file
          (Mayank Jangid and Kushal Khemka)
Solution: Disallow strange file names

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-29 20:36:14 +00:00
Yasuhiro Matsumoto
3ac7b97439 patch 9.2.0420: channel: cannot handle binary data via channel callbacks
Problem:  channel: cannot handle binary data via channel callbacks
Solution: Add a blob channel mode that passes callback data as a Blob
          (Yasuhiro Matsumoto).

closes: #20084

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-29 19:49:45 +00:00
Yasuhiro Matsumoto
bd8716178e patch 9.2.0419: popup: rendering issues
Problem:  popup: rendering issues
Solution: Fix popup bottom edge overflow, stabilize popup width across
          scrolling, fix popup right edge overflow
          (Yasuhiro Matsumoto)

closes: #20042

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-29 19:23:47 +00:00
glepnir
20e98ff1cc patch 9.2.0418: wildcards in expanded env vars reinterpreted by glob
Problem:  With $d='[dir]', `:e $d/file.txt` opens the wrong file,
          `:e $d/<Tab>` fails to complete, and `glob('$d/*')` returns
          nothing. Wildcard characters inside expanded environment
          variables get picked up by globbing again.
Solution: Turn the 4th parameter of expand_env_esc() from a bool into a
          string of characters to escape in each expanded value. Callers
          that pass the result to wildcard expansion should include
          PATH_ESC_WILDCARDS in addition to " \t" (glepnir).

closes: #20053

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-29 19:10:43 +00:00
glepnir
af494af5ff patch 9.2.0417: completion: no support for "noinsert" with 'wildmode'
Problem:  completion: no support for "noinsert" with 'wildmode' and
          commandline completion
Solution: Add "noinsert" value to the 'wildmode' option, mirroring
          'completeopt' "noinsert" behaviour (glepnir).

fixes:  #16551
closes: #20080

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-29 18:35:55 +00:00
Maxim Kim
c2bda0add9 patch 9.2.0416: Unix: filename completion splits at space for single-file Ex commands
Problem:  SPACE_IN_FILENAME is defined on most platforms but not on Unix.
	  As a result, set_context_for_wildcard_arg() on Unix always resets the
	  completion pattern at white space for Ex commands that take a
          single file argument.
Solution: Drop the SPACE_IN_FILENAME ifdef (Maxim Kim)

fixes:  #18411
closes: #20090

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-29 17:19:35 +00:00
zeertzjq
6453a7c440 patch 9.2.0415: Wrong behavior when executing register that ends in Insert mode
Problem:  Wrong behavior when executing register that ends in Insert
          mode from Ctrl-O (Emilien Breton)
Solution: Use :startinsert etc. to restore Insert mode after executing
          the register contents (zeertzjq).

fixes:  #20085
closes: #20091

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-29 16:11:56 +00:00
Yasuhiro Matsumoto
458fed4f65 patch 9.2.0414: Flicker when drawing window separator and pum is shown
Problem:  In a vertical split where the pum overlaps the windows vsep column,
          background draws (vsep at cursor row, status line,
          redraw_vseps, idle ins_redraw) can write into cells that are
          covered by the pum, because skip_for_popup() only protects
          those cells while pum_will_redraw is set.
Solution: In skip_for_popup(), also skip cells under a visible pum when
          the current draw is not the pum itself (screen_zindex
          POPUPMENU_ZINDEX).  Exclude the wildmenu pum (MODE_CMDLINE):
          while the cmdline grows, pum_row is briefly stale and
          protecting those cells would blank a cell of the wrapped
          cmdline row (Yasuhiro Matsumoto).

closes: #20093

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-29 15:58:42 +00:00
ii14
c5de8231f4 runtime(qml): Add optional chaining to QML syntax
"obj?.prop" was wrongly parsed as ternary operator.

closes: #19988

Signed-off-by: ii14 <ii14@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-28 21:20:41 +00:00
Luuk van Baal
bd0f3e6da5 patch 9.2.0413: Scrolling wrong with 'splitkeep' when changing 'cmdheight'
Problem:  Cursor is not adjusted when 'cmdheight' is changed to cover
          the cursor with 'splitkeep' ~= "cursor".
Solution: Handle window resize for 'splitkeep' after changing 'cmdheight'.
          Ensure previous window height is set when changing 'splitkeep'
          (Luuk van Baal).

closes: #20043

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-28 21:14:50 +00:00
Hirohito Higashi
41c3379bdf patch 9.2.0412: channel: term_start() out_cb/err_cb no longer deliver raw chunks
Problem:  channel: term_start() out_cb/err_cb no longer deliver raw
          chunks (regression from patch 9.2.0224, breaks callers like
          vim-fugitive that parse multi-line output)
          (D. Ben Knoble, after v9.2.0224)
Solution: Remove the PTY-specific per-line splitting in
          may_invoke_callback() so RAW callbacks again receive the
          raw chunk as returned by read(), preserving embedded NL.
          If per-line handling is desired, the callback must split
          "msg" on NL and strip the trailing CR itself; document
          this behavior in term_start().  Replace
          Test_term_start_cb_per_line() with
          Test_term_start_cb_raw_chunk() to verify the raw-chunk
          contract.

fixes:  #20041
closes: #20045

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-28 21:06:45 +00:00
Yasuhiro Matsumoto
e7745b7cbf patch 9.2.0411: tabpanel: no Vim script functions for the tabpanel
Problem:  tabpanel: no Vim script functions for the tabpanel
Solution: Add tabpanel_getinfo() and tabpanel_scroll()
          (Yasuhiro Matsumoto).

tabpanel_getinfo() returns a dict describing the tabpanel (align,
columns, scrollbar, offset, total, max_offset).

tabpanel_scroll(n) scrolls the tabpanel by n rows (positive for
down, negative for up). With {absolute: 1} the argument is used as
the new absolute offset instead of a delta. The offset is clamped to
the valid range; returns true when it actually changes.

closes: #20056

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-28 20:31:34 +00:00
Jesse Rosenstock
6146f3382f patch 9.2.0410: test suite races when run with parallel make
Problem:  Running "make test" with -jN causes spurious failures because
          the old-style tests share filenames (test.ok, test.out, X*,
          viminfo) in the working directory.
Solution: Add .NOTPARALLEL to the testdir Makefile to prevent parallel
          execution of tests (Jesse Rosenstock).

closes: #20082

Co-authored-by: Gemini
Signed-off-by: Jesse Rosenstock <jmr@google.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-28 19:23:41 +00:00
Hirohito Higashi
30b4240730 runtime(doc): Update docs related to tabpanel
closes: #20083

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-28 19:19:53 +00:00
glepnir
6cb4173294 patch 9.2.0409: memory leaks in copy_substring_from_pos()
Problem:  Memory leak in error path of copy_substring_from_pos().
Solution: Free the garray on OOM in copy_substring_from_pos()
          (glepnir).

closes: #20086

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-28 19:14:22 +00:00
Jaehwang Jung
e47daed442 patch 9.2.0408: Insert-mode <Cmd> edits can corrupt undo
Problem:  A <Cmd> command in Insert mode can edit the current buffer,
          e.g., with setline(). That edit appends to the current undo
          block, but Insert mode does not know that the cursor line may
          need to be saved again before the next typed edit. If the next
          typed edit is a <BS> at the start of a line, it can join away
          the line that was changed by the <Cmd> command before Insert
          mode saves that updated line. The newest undo entry can then
          still refer to the joined-away line, so undo sees a range past
          the end of the buffer and fails with E438.
Solution: If a <Cmd> command in Insert mode changes the buffer, set
          ins_need_undo so stop_arrow() refreshes Insstart. This lets
          the next edit properly decide whether a new undo entry is
          needed (Jaehwang Jung)

closes: #20087
AI-assisted: Codex

Signed-off-by: Jaehwang Jung <tomtomjhj@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-28 19:06:15 +00:00
Hirohito Higashi
2d43240659 patch 9.2.0407: tabpanel: A few issues with the tabpanel
Problem:  Several issues around the tabpanel scrollbar:
          1. :set tabpanelopt= completion did not offer "scroll" and
              "scrollbar".
          2. gt/gT and other tab switches did not update the scrollbar
              thumb; the current tab could move outside the visible
              panel range without the view following.
          3. When tpl_scroll_offset was at its maximum, the thumb's
              bottom did not reach the last screen row due to integer
              truncation in thumb_top (e.g. 31 tabs on 24 rows + :tablast
              left a one-row gap).
          4. For align:right the scrollbar was drawn on the panel's
              left edge (adjacent to the buffer area), which breaks the
              common convention that a vertical scrollbar sits on the
              right.
Solution: - Add "scroll" and "scrollbar" to the 'tabpanelopt' expansion
            list.  Cover the completion in test_options.vim and extend
            util/gen_opt_test.vim with the new valid/invalid values;
            drop the now-redundant acceptance test from
            test_tabpanel.vim.
          - In draw_tabpanel(), remember the last-drawn curtab and,
            when it changes, adjust tpl_scroll_offset so curtab_row
            falls inside [offset, offset + Rows).  Mouse wheel and
            drag leave curtab unchanged, so the user's chosen offset
            is preserved.
          - In draw_tabpanel_scrollbar(), compute thumb_top as
            (Rows - thumb_height) * tpl_scroll_offset
            / (tpl_total_rows - Rows), mirroring the mapping already
            used by tabpanel_drag_scrollbar().  This guarantees the
            thumb's bottom reaches the last row at the maximum offset.
          - In draw_tabpanel(), place the scrollbar at the tabpanel's
            right edge for both align:left and align:right (previously
            align:right put it on the panel's left edge next to the
            vertical separator).  For align:right this means the
            scrollbar now sits at the screen's right edge.
          - Update :h tabpanel-scroll to describe the new, align-
            independent placement.
          - Add Test_tabpanel_scrollbar_follows_curtab() and
            Test_tabpanel_scrollbar_reaches_bottom() to exercise the
            regressions fixed by items 2 and 3.

closes: #20052

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-27 21:16:56 +00:00
Shane Harper
7e76514896 patch 9.2.0406: VisualNOS not used when Wayland selection ownership lost
Problem:  VisualNOS not used when Wayland selection ownership lost
          (lilydjwg)
Solution: Don't require X_DISPLAY != NULL to use VisualNOS
          (Shane Harper).

fixes:   #19914
related: #19812
related: #19659
closes:  #20066

Signed-off-by: Shane Harper <shane@shaneharper.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-27 19:58:46 +00:00
Christian Brabandt
ae196b2d58 patch 9.2.0405: when jumping to tags, will open URLs
Problem:  when jumping to tags, will open URLs
          (Srinivas Piskala Ganesh Babu)
Solution: Disallow trying to open remote files.

closes: #20068

Supported by AI

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-27 18:43:10 +00:00
Christian Brabandt
3958188f6a patch 9.2.0404: redraw_listener_add() does not check secure flag
Problem:  redraw_listener_add() does not check secure flag
Solution: Check for check_secure() in f_redraw_listener_add()

closes: #20070

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-04-27 18:34:01 +00:00
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
693 changed files with 20738 additions and 6609 deletions

2
.github/MAINTAINERS vendored
View File

@@ -133,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
@@ -472,6 +473,7 @@ 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

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) }}
@@ -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

@@ -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.
@@ -22,13 +22,13 @@ jobs:
env:
CC: ${{ matrix.compiler }}
GCC_VER: 14
CLANG_VER: 21
CLANG_VER: 22
TEST: test
SRCDIR: ./src
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
@@ -90,254 +84,26 @@ jobs:
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: 45
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
@@ -410,15 +177,73 @@ jobs:
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 }}
@@ -436,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
@@ -503,7 +328,8 @@ jobs:
run: |
make ${TEST}
- if: ${{ !cancelled() }}
- name: Upload failed test artifacts
if: ${{ !cancelled() }}
uses: ./.github/actions/test_artifacts
windows:
@@ -513,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
@@ -522,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
@@ -609,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
@@ -619,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
@@ -633,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') }}
@@ -833,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

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.4
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.4
# 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.4

View File

@@ -17,6 +17,6 @@ jobs:
pull-requests: write
steps:
- uses: actions/labeler@v6
- uses: actions/labeler@v6.1.0
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

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 \
@@ -1195,6 +1199,7 @@ IGNORE = \
.github/FUNDING.yml \
.github/labeler.yml \
.github/workflows/label.yml \
AGENTS.md \
SECURITY.md \
ci/unlisted.make \
ci/hlgroups.make \

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

@@ -137,7 +137,7 @@ README_vms.txt VMS
ДОПОЛНИТЕЛЬНАЯ ИНФОРМАЦИЯ
Для системе macOS вы може использовать MacVim: https://macvim.org
Для системе macOS вы можете использовать MacVim: https://macvim.org
Последние новости о редакторе Vim можно найти на его домашней странице:
https://www.vim.org/

View File

@@ -90,7 +90,7 @@ Unicode true ; !include defaults to UTF-8 after Unicode True since 3.0 Alpha 2
# ----------- No configurable settings below this line -----------
##########################################################
# Installer Attributes, Including headers, Plugins and etc.
# Installer Attributes, Including headers, Plugins and etc.
CRCCheck force
@@ -638,21 +638,23 @@ SectionGroupEnd
!undef LIBRARY_X64
${EndIf}
# Install DLLs for 32-bit gvimext.dll into the GvimExt32 directory.
SetOutPath $0\GvimExt32
ClearErrors
!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
"${GETTEXT}\gettext32\libintl-8.dll" \
"$0\GvimExt32\libintl-8.dll" "$0\GvimExt32"
!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
"${GETTEXT}\gettext32\libiconv-2.dll" \
"$0\GvimExt32\libiconv-2.dll" "$0\GvimExt32"
# Install libgcc_s_sjlj-1.dll only if it is needed.
!if ${INCLUDE_LIBGCC}
!if /FileExists "${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll"
!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
"${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll" \
"$0\GvimExt32\libgcc_s_sjlj-1.dll" "$0\GvimExt32"
!if !${ARM64}
# Install DLLs for 32-bit gvimext.dll into the GvimExt32 directory.
SetOutPath $0\GvimExt32
ClearErrors
!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
"${GETTEXT}\gettext32\libintl-8.dll" \
"$0\GvimExt32\libintl-8.dll" "$0\GvimExt32"
!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
"${GETTEXT}\gettext32\libiconv-2.dll" \
"$0\GvimExt32\libiconv-2.dll" "$0\GvimExt32"
# Install libgcc_s_sjlj-1.dll only if it is needed.
!if ${INCLUDE_LIBGCC}
!if /FileExists "${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll"
!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
"${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll" \
"$0\GvimExt32\libgcc_s_sjlj-1.dll" "$0\GvimExt32"
!endif
!endif
!endif
${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 Apr 03
# Last Change: 2026 May 16
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
# These functions are moved here from runtime/filetype.vim to make startup
@@ -798,9 +798,14 @@ export def FTnroff(): number
enddef
export def FTmm()
if exists("g:filetype_mm")
exe "setf " .. g:filetype_mm
return
endif
var n = 1
while n < 20
if getline(n) =~ '^\s*\(#\s*\(include\|import\)\>\|@import\>\|/\*\)'
if getline(n) =~ '^\s*\(//\|#\s*\(include\|import\)\>\|@import\>\|/\*\)'
setf objcpp
return
endif
@@ -915,7 +920,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
@@ -1726,6 +1731,8 @@ const ft_from_ext = {
"tdf": "ahdl",
# AIDL
"aidl": "aidl",
# Algol 68
"a68": "algol68",
# AMPL
"run": "ampl",
# ANTLR / PCCTS
@@ -1798,6 +1805,7 @@ const ft_from_ext = {
# BDF font
"bdf": "bdf",
# Beancount
"bean": "beancount",
"beancount": "beancount",
# BibTeX bibliography database file
"bib": "bib",
@@ -3113,7 +3121,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

@@ -3,7 +3,7 @@ vim9script
# Vim runtime support library
#
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2026 Apr 06
# Last Change: 2026 May 06
export def IsSafeExecutable(filetype: string, executable: string): bool
if empty(exepath(executable))
@@ -51,7 +51,7 @@ if has('unix')
execute $'silent !cmd /c start "" /b {args} {Redir()}' | redraw!
enddef
endif
elseif exists('$WSL_DISTRO_NAME') # use cmd.exe to start GUI apps in WSL
elseif exists('$WSL_DISTRO_NAME') && executable('cmd.exe') # use cmd.exe to start GUI apps in WSL
export def Launch(args: string)
const command = (args =~? '\v<\f+\.(exe|com|bat|cmd)>')
? $'cmd.exe /c start /b {args} {Redir()}'
@@ -139,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

@@ -23,6 +23,9 @@
" 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()
" 2026 May 14 by Vim Project: use correct shellescape() call in Vimuntar()
"
" Contains many ideas from Michael Toren's <tar.vim>
"
@@ -612,6 +615,24 @@ fun! tar#Extract()
let &report= repkeep
return
endif
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)
let tarball = expand("%")
@@ -621,7 +642,7 @@ fun! tar#Extract()
endif
if tarball =~# "\.tar$"
call system(extractcmd." ".shellescape(tarball)." ".shellescape(fname))
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
if v:shell_error != 0
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
else
@@ -630,7 +651,7 @@ fun! tar#Extract()
elseif tarball =~# "\.tgz$"
let extractcmd= substitute(extractcmd,"-","-z","")
call system(extractcmd." ".shellescape(tarball)." ".shellescape(fname))
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
if v:shell_error != 0
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
else
@@ -639,7 +660,7 @@ fun! tar#Extract()
elseif tarball =~# "\.tar\.gz$"
let extractcmd= substitute(extractcmd,"-","-z","")
call system(extractcmd." ".shellescape(tarball)." ".shellescape(fname))
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
if v:shell_error != 0
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
else
@@ -648,7 +669,7 @@ fun! tar#Extract()
elseif tarball =~# "\.tbz$"
let extractcmd= substitute(extractcmd,"-","-j","")
call system(extractcmd." ".shellescape(tarball)." ".shellescape(fname))
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
if v:shell_error != 0
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
else
@@ -657,7 +678,7 @@ fun! tar#Extract()
elseif tarball =~# "\.tar\.bz2$"
let extractcmd= substitute(extractcmd,"-","-j","")
call system(extractcmd." ".shellescape(tarball)." ".shellescape(fname))
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
if v:shell_error != 0
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
else
@@ -666,7 +687,7 @@ fun! tar#Extract()
elseif tarball =~# "\.tar\.bz3$"
let extractcmd= substitute(extractcmd,"-","-j","")
call system(extractcmd." ".shellescape(tarball)." ".shellescape(fname))
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
if v:shell_error != 0
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
else
@@ -675,7 +696,7 @@ fun! tar#Extract()
elseif tarball =~# "\.txz$"
let extractcmd= substitute(extractcmd,"-","-J","")
call system(extractcmd." ".shellescape(tarball)." ".shellescape(fname))
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
if v:shell_error != 0
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
else
@@ -684,7 +705,7 @@ fun! tar#Extract()
elseif tarball =~# "\.tar\.xz$"
let extractcmd= substitute(extractcmd,"-","-J","")
call system(extractcmd." ".shellescape(tarball)." ".shellescape(fname))
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
if v:shell_error != 0
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
else
@@ -693,7 +714,7 @@ fun! tar#Extract()
elseif tarball =~# "\.tzst$"
let extractcmd= substitute(extractcmd,"-","--zstd -","")
call system(extractcmd." ".shellescape(tarball)." ".shellescape(fname))
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
if v:shell_error != 0
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
else
@@ -702,7 +723,7 @@ fun! tar#Extract()
elseif tarball =~# "\.tar\.zst$"
let extractcmd= substitute(extractcmd,"-","--zstd -","")
call system(extractcmd." ".shellescape(tarball)." ".shellescape(fname))
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
if v:shell_error != 0
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
else
@@ -713,7 +734,7 @@ fun! tar#Extract()
if has("linux")
let extractcmd= substitute(extractcmd,"-","-I lz4 -","")
endif
call system(extractcmd." ".shellescape(tarball)." ".shellescape(fname))
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
if v:shell_error != 0
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
else
@@ -724,7 +745,7 @@ fun! tar#Extract()
if has("linux")
let extractcmd= substitute(extractcmd,"-","-I lz4 -","")
endif
call system(extractcmd." ".shellescape(tarball)." ".shellescape(fname))
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
if v:shell_error != 0
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
else
@@ -812,9 +833,9 @@ fun! tar#Vimuntar(...)
" if necessary, decompress the tarball; then, extract it
if tartail =~ '\.tgz'
if executable("gunzip")
silent exe "!gunzip ".shellescape(tartail)
silent exe "!gunzip ".shellescape(tartail, 1)
elseif executable("gzip")
silent exe "!gzip -d ".shellescape(tartail)
silent exe "!gzip -d ".shellescape(tartail, 1)
else
echoerr "unable to decompress<".tartail."> on this system"
if simplify(curdir) != simplify(tarhome)

View File

@@ -1,13 +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)
" 2026 Apr 05 by Vim Project: Detect path traversal attacks
" 2026 Apr 09 by Vim Project: Detect more path traversal attacks
" 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".
@@ -106,14 +103,14 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
while linenr <= a:line2
let svfile = getline(linenr)
if !filereadable(svfile)
call vimball#ShowMesg(s:ERROR,"unable to read file<".svfile.">")
call s:ChgDir(curdir)
call vimball#RestoreSettings()
return
endif
" create/switch to mkvimball tab
if !exists("vbtabnr")
tabnew
@@ -122,7 +119,7 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
else
exe "tabn ".vbtabnr
endif
let lastline= line("$") + 1
if lastline == 2 && getline("$") == ""
call setline(1,'" Vimball Archiver by Charles E. Campbell')
@@ -166,7 +163,7 @@ endfun
" ---------------------------------------------------------------------
" vimball#Vimball: extract and distribute contents from a vimball {{{2
" (invoked the the UseVimball command embedded in
" (invoked the the UseVimball command embedded in
" vimballs' prologue)
fun! vimball#Vimball(really,...)
@@ -216,7 +213,7 @@ fun! vimball#Vimball(really,...)
" give title to listing of (extracted) files from Vimball Archive
if a:really
echohl Title | echomsg "Vimball Archive" | echohl None
else
else
echohl Title | echomsg "Vimball Archive Listing" | echohl None
echohl Statement | echomsg "files would be placed under: ".home | echohl None
endif
@@ -230,13 +227,25 @@ fun! vimball#Vimball(really,...)
let fsize = substitute(getline(linenr+1),'^\(\d\+\).\{-}$','\1','')+0
let fenc = substitute(getline(linenr+1),'^\d\+\s*\(\S\{-}\)$','\1','')
let filecnt = filecnt + 1
" Do not allow a leading / or .. anywhere in the file name
if fname =~ '\.\.' || fname =~ '^/'
" 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
" Also, disallow strange paths, that could lead to code execution from
" .VimballRecord
" Disallow: pipe, quotes and closing paren
elseif fname =~ '[|'')"]'
echomsg printf("(Vimball) Forbidding strange filename: '%s', aborting...", fname)
exe "tabn ".curtabnr
bw! Vimball
call s:ChgDir(curdir)
return
endif
if a:really
@@ -295,7 +304,7 @@ fun! vimball#Vimball(really,...)
exe "silent w! ".fnameescape(fnamepath)
endif
echo "wrote ".fnameescape(fnamepath)
call s:RecordInVar(home,"call delete('".fnamepath."')")
call s:RecordInVar(home,"call delete('".escape(fnamepath, '"''|')."')")
endif
" return to tab with vimball
@@ -370,7 +379,7 @@ fun! vimball#RmVimball(...)
call s:ChgDir(home)
if filereadable(".VimballRecord")
keepalt keepjumps 1split
keepalt keepjumps 1split
sil! keepalt keepjumps e .VimballRecord
let keepsrch= @/
if search('^\M'.curfile."\m: ".'cw')
@@ -558,7 +567,7 @@ fun! s:RecordInFile(home)
if exists("s:recordfile") || exists("s:recorddir")
let curdir= getcwd()
call s:ChgDir(a:home)
keepalt keepjumps 1split
keepalt keepjumps 1split
let cmd= expand("%:tr").": "

View File

@@ -22,6 +22,8 @@
" 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,
@@ -405,7 +407,12 @@ fun! zip#Write(fname)
else
let zipfile = substitute(a:fname,'^.\{-}zipfile://\(.\{-}\)::[^\\].*$','\1','')
let fname = substitute(a:fname,'^.\{-}zipfile://.\{-}::\([^\\].*\)$','\1','')
" TODO: what to check on MS-Windows to avoid writing absolute paths?
" 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)
@@ -499,6 +506,18 @@ fun! zip#Extract()
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

View File

@@ -1,6 +1,8 @@
" Vim compiler file
" Compiler: Zig Compiler
" Upstream: https://github.com/ziglang/zig.vim
" Last Change:
" 2026 May 12 by the Vim project (set errormformat)
if exists("current_compiler")
finish
@@ -11,13 +13,29 @@ let s:save_cpo = &cpo
set cpo&vim
" a subcommand must be provided for the this compiler (test, build-exe, etc)
if has('patch-7.4.191')
CompilerSet makeprg=zig\ \$*\ \%:S
else
CompilerSet makeprg=zig\ \$*\ \"%\"
endif
CompilerSet makeprg=zig\ \$*\ \%:S
" TODO: improve errorformat as needed.
CompilerSet errorformat=
\%-G,
\%-G\ %#+-\ %.%#,
\%-Ginstall,
\%-Ginstall\ transitive\ failure,
\%-Grun,
\%-Grun\ transitive\ failure,
\%-Gtest,
\%-Gtest\ transitive\ failure,
\%-Gfailed\ command:\ %.%#,
\%-Gerror:\ %*\\d\ compilation\ errors,
\%-GBuild\ Summary:\ %.%#,
\%-Gerror:\ the\ following\ build\ command\ failed\ with\ exit\ code\ %*\\d:,
\%-G.zig-cache%.%#,
\%E%f:%l:%c:\ error:\ %m,
\%I%f:%l:%c:\ note:\ %m
" zig has no warnings, but zig cc and zig c++ do
CompilerSet errorformat+=
\%W%f:%l:%c:\ warning:\ %m,
\%-G%*\\d\ warnings\ generated.
let &cpo = s:save_cpo
unlet s:save_cpo

View File

@@ -1,7 +1,8 @@
" Vim compiler file
" Compiler: Zig Compiler (zig build)
" Upstream: https://github.com/ziglang/zig.vim
" Last Change: 2024 Apr 05 by The Vim Project (removed :CompilerSet definition)
" Last Change: 2024 Apr 05 by the Vim Project (removed :CompilerSet definition)
" 2026 May 12 by the Vim Project (removed comment)
if exists('current_compiler')
finish
@@ -13,13 +14,11 @@ let s:save_cpo = &cpo
set cpo&vim
if exists('g:zig_build_makeprg_params')
execute 'CompilerSet makeprg=zig\ build\ '.escape(g:zig_build_makeprg_params, ' \|"').'\ $*'
execute 'CompilerSet makeprg=zig\ build\ '.escape(g:zig_build_makeprg_params, ' \|"').'\ $*'
else
CompilerSet makeprg=zig\ build\ $*
CompilerSet makeprg=zig\ build\ $*
endif
" TODO: anything to add to errorformat for zig build specifically?
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab
" vim: tabstop=8 shiftwidth=2 softtabstop=2 expandtab

View File

@@ -1,7 +1,8 @@
" Vim compiler file
" Compiler: Zig Compiler (zig build-exe)
" Upstream: https://github.com/ziglang/zig.vim
" Last Change: 2025 Nov 16 by The Vim Project (set errorformat)
" Last Change: 2025 Nov 16 by the Vim Project (set errorformat)
" 2026 May 12 by the Vim project (remove errorformat)
if exists('current_compiler')
finish
@@ -13,9 +14,7 @@ let s:save_cpo = &cpo
set cpo&vim
CompilerSet makeprg=zig\ build-exe\ \%:S\ \$*
" CompilerSet errorformat=%f:%l:%c: %t%*[^:]: %m, %f:%l:%c: %m, %f:%l: %m
CompilerSet errorformat&
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab
" vim: tabstop=8 shiftwidth=2 softtabstop=2 expandtab

View File

@@ -0,0 +1,18 @@
" Vim compiler file
" Compiler: Zig Compiler (zig cc)
" Last Change: 2026 May 12
if exists('current_compiler')
finish
endif
runtime compiler/zig.vim
let current_compiler = 'zig_cc'
let s:save_cpo = &cpo
set cpo&vim
CompilerSet makeprg=zig\ cc\ \%:S\ \$*
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: tabstop=8 shiftwidth=2 softtabstop=2 expandtab

View File

@@ -1,7 +1,8 @@
" Vim compiler file
" Compiler: Zig Compiler (zig test)
" Upstream: https://github.com/ziglang/zig.vim
" Last Change: 2025 Nov 16 by The Vim Project (set errorformat)
" Last Change: 2025 Nov 16 by the Vim Project (set errorformat)
" 2026 May 12 by the Vim Project (remove error format)
if exists('current_compiler')
finish
@@ -13,9 +14,7 @@ let s:save_cpo = &cpo
set cpo&vim
CompilerSet makeprg=zig\ test\ \%:S\ \$*
" CompilerSet errorformat=%f:%l:%c: %t%*[^:]: %m, %f:%l:%c: %m, %f:%l: %m
CompilerSet errorformat&
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab
" vim: tabstop=8 shiftwidth=2 softtabstop=2 expandtab

View File

@@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 9.2. Last change: 2026 Feb 25
*autocmd.txt* For Vim version 9.2. Last change: 2026 May 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -421,6 +421,8 @@ Name triggered by ~
|TextChangedP| after a change was made to the text in Insert mode
when popup menu visible
|TextChangedT| after a change was made to the text in Terminal mode
|TextPutPost| after text has been put
|TextPutPre| before text is put
|TextYankPost| after text has been yanked or deleted
|SafeState| nothing pending, going to wait for the user to type a
@@ -1359,6 +1361,45 @@ TextChangedP After a change was made to the text in the
TextChangedT After a change was made to the text in the
current buffer in Terminal mode.
Otherwise the same as TextChanged.
*TextPutPost*
TextPutPost After text has been put in the current buffer.
The following values in |v:event| are mostly
the same as |TextYankPost|:
operator The operation performed,
either 'p' or 'P'.
regcontents Text that was put. For
|quote_=|, this is the result
of the expression.
regname Name of the register or empty
string for the unnamed
register.
regtype Type of the register, see
|getregtype()|.
visual True if the operation is
performed in |Visual| mode.
Not triggered when |quote_| is used nor when
called recursively.
It is not allowed to change the buffer text,
see |textlock|.
Note that for the |quote_.| register, since
the last inserted text is buffered into the
input buffer (buffer isn't modified directly),
this autocommand is called directly after
|TextPutPre|.
{only when compiled with the +eval feature}
*TextPutPre*
TextPutPre Before text has been put in the current buffer.
Same values as |TextPutPost| in |v:event|. It
is valid to call |setreg()| in this
autocommand, allowing you to process and
modify the text in "regcontents" before it is
put. However this does not apply to |quote_#|,
|quote_=|, |quote_%|, |quote_:|, |quote_/| or |quote_.|.
Not triggered when |quote_| is used nor when
called recursively.
It is not allowed to change the buffer text,
see |textlock|.
{only when compiled with the +eval feature}
*TextYankPost*
TextYankPost After text has been yanked or deleted in the
current buffer. The following values of

View File

@@ -1,4 +1,4 @@
*builtin.txt* For Vim version 9.2. Last change: 2026 Apr 10
*builtin.txt* For Vim version 9.2. Last change: 2026 May 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -107,7 +107,8 @@ ch_getbufnr({handle}, {what}) Number get buffer number for {handle}/{what}
ch_getjob({channel}) Job get the Job of {channel}
ch_info({handle}) Dict info about channel {handle}
ch_listen({address} [, {options}])
Channel listen on {address}
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}])
@@ -704,6 +705,8 @@ tabpagebuflist([{arg}]) List list of buffer numbers in tab page
tabpagenr([{arg}]) Number number of current or last tab page
tabpagewinnr({tabarg} [, {arg}])
Number number of current window in tab page
tabpanel_getinfo() Dict get current state of the tabpanel
tabpanel_scroll({n} [, {opts}]) Bool scroll the tabpanel
tagfiles() List tags files used
taglist({expr} [, {filename}]) List list of tags matching {expr}
tan({expr}) Float tangent of {expr}
@@ -6862,6 +6865,8 @@ listener_add({callback} [, {buf} [, {unbuffered}]]) *listener_add()*
second argument: >
GetBuffer()->listener_add(callback)
<
This function is not available in the |sandbox|.
Return type: |Number|
@@ -6876,6 +6881,8 @@ listener_flush([{buf}]) *listener_flush()*
Can also be used as a |method|: >
GetBuffer()->listener_flush()
<
This function is not available in the |sandbox|.
Return type: void
@@ -6887,6 +6894,8 @@ listener_remove({id}) *listener_remove()*
Can also be used as a |method|: >
GetListenerId()->listener_remove()
<
This function is not available in the |sandbox|.
Return type: |Number|
@@ -8866,6 +8875,8 @@ redraw_listener_add({opts}) *redraw_listener_add()*
Can also be used as a |method|: >
GetOpts()->redraw_listener_add()
<
This function is not available in the |sandbox|.
Return type: |Number|
@@ -11316,7 +11327,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 >
@@ -11870,6 +11886,38 @@ tabpagewinnr({tabarg} [, {arg}]) *tabpagewinnr()*
Return type: |Number|
tabpanel_getinfo() *tabpanel_getinfo()*
Return a |Dictionary| describing the current state of the
tabpanel (see |tabpanel|). The dictionary has these keys:
align "left" or "right"
columns width in screen columns
scrollbar |TRUE| if a scrollbar is shown
offset current scroll offset in rows
total total number of rows rendered
max_offset largest valid value for "offset"
The "total" and "max_offset" values are only accurate after
the tabpanel has been drawn at least once.
Return type: dict<any>
tabpanel_scroll({n} [, {opts}]) *tabpanel_scroll()*
Scroll the tabpanel by {n} rows. Positive values scroll down
(later tab pages become visible), negative values scroll up.
The new offset is clamped to the valid range.
When {opts} is a |Dictionary| and its "absolute" entry is
|TRUE|, {n} is used as the new absolute scroll offset instead
of a delta.
Returns |TRUE| if the scroll offset changed, |FALSE| otherwise
(for example when the tabpanel is not shown, or the offset is
already at the requested value).
Return type: |vim9-boolean|
tagfiles() *tagfiles()*
Returns a |List| with the file names used to search for tags
for the current buffer. This is the 'tags' option expanded.
@@ -11989,6 +12037,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
@@ -12008,6 +12057,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
@@ -13353,8 +13405,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 @@
*channel.txt* For Vim version 9.2. Last change: 2026 Apr 06
*channel.txt* For Vim version 9.2. Last change: 2026 Apr 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -132,7 +132,7 @@ Start Vim and create a listening channel: >
endfunc
" Start listening on port 8765
let server = ch_listen('localhost:8765', {"callback": "OnAccept"})
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')
@@ -170,6 +170,7 @@ unreachable on the network.
"js" - Use JS (JavaScript) encoding, more efficient than JSON.
"nl" - Use messages that end in a NL character
"raw" - Use raw messages
"blob" - Use raw messages and pass callback data as a |Blob|
"lsp" - Use language server protocol encoding
"dap" - Use debug adapter protocol encoding
*channel-callback* *E921*
@@ -189,6 +190,8 @@ unreachable on the network.
excluding the NL.
When "mode" is "raw" the "msg" argument is the whole message
as a string.
When "mode" is "blob" the "msg" argument is the whole message
as a |Blob|.
For all callbacks: Use |function()| to bind it to arguments
and/or a Dictionary. Or use the form "dict.function" to bind
@@ -637,8 +640,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"
@@ -668,22 +670,23 @@ ch_info({handle}) *ch_info()*
Return type: dict<any>
ch_listen({address} [, {options}]) *E1573* *E1574* *ch_listen()*
Listen on {address} for incoming channel connections.
This creates a server-side channel, unlike |ch_open()|
which connects to an existing server.
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 binding to all interfaces is not
allowed for security reasons.
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").
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.

View File

@@ -1,4 +1,4 @@
*cmdline.txt* For Vim version 9.2. Last change: 2026 Mar 17
*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.

View File

@@ -1,4 +1,4 @@
*eval.txt* For Vim version 9.2. Last change: 2026 Feb 14
*eval.txt* For Vim version 9.2. Last change: 2026 May 15
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -5346,6 +5346,9 @@ a |lambda| expression.
With the exception of the "available" callback if a callback is not provided,
Vim will not invoke anything, and this is not an error.
If the "paste" or "copy" callbacks are triggered recursively, then they will
not be called.
*clipboard-providers-textlock*
In both the "paste" and "copy" callbacks, it is not allowed to change the
buffer text, see |textlock|.
@@ -5367,6 +5370,9 @@ order:
is an empty string, then the type is automatically chosen.
2. A |list| of strings to return to Vim, each representing a line.
If an invalid value is returned, then this is not an error. Instead the
register will be left unchanged (not cleared).
*clipboard-providers-copy*
The "copy" callback returns nothing and takes the following arguments in the
following order:

View File

@@ -1,4 +1,4 @@
*filetype.txt* For Vim version 9.2. Last change: 2026 Apr 09
*filetype.txt* For Vim version 9.2. Last change: 2026 May 16
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -164,6 +164,7 @@ variables can be used to overrule the filetype used for certain extensions:
*.int g:filetype_int
*.lsl g:filetype_lsl
*.m g:filetype_m |ft-mathematica-syntax|
*.mm g:filetype_mm
*.mac g:filetype_mac
*[mM]makefile,*.mk,*.mak,[mM]akefile*
g:make_flavor |ft-make-syntax|

View File

@@ -1,4 +1,4 @@
*ft_mp.txt* For Vim version 9.2. Last change: 2026 Feb 14
*ft_mp.txt* For Vim version 9.2. Last change: 2026 May 04
This is the documentation for the METAFONT and MetaPost filetype plugins.
Unless otherwise specified, the commands, settings and mappings defined below
@@ -25,7 +25,7 @@ MetaPost documents, including syntax coloring, indentation, and completion.
Defining indentation rules for METAFONT and MetaPost code is tricky and
somewhat subjective, because the syntax is quite liberal. The plugin uses some
heuristics that work well most of the time, but in particular cases you may
want to to override the automatic rules, so that the manually defined
want to override the automatic rules, so that the manually defined
indentation is preserved by commands like `gg=G`.
This can be achieved by appending `%>`, `%<`, `%=` or `%!` to a line to

View File

@@ -1,4 +1,4 @@
*map.txt* For Vim version 9.2. Last change: 2026 Feb 14
*map.txt* For Vim version 9.2. Last change: 2026 May 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1593,7 +1593,10 @@ reported if any are supplied). However, it is possible to specify that the
command can take arguments, using the -nargs attribute. Valid cases are:
-nargs=0 No arguments are allowed (the default)
-nargs=1 Exactly one argument is required, it includes spaces
-nargs=1 Exactly one argument is required, it includes spaces;
completion treats white spaces as argument separation
-nargs=_ Exactly one argument is required, it includes spaces;
completion treats white spaces as part of the argument
-nargs=* Any number of arguments are allowed (0, 1, or many),
separated by white space
-nargs=? 0 or 1 arguments are allowed
@@ -1601,7 +1604,23 @@ command can take arguments, using the -nargs attribute. Valid cases are:
Arguments are considered to be separated by (unescaped) spaces or tabs in this
context, except when there is one argument, then the white space is part of
the argument.
the argument. The difference between the "-nargs=1" and "-nargs=_": >
func MyComplete(ArgLead, CmdLine, CursorPos)
return ["one value", "two values", "three values"]
\->matchfuzzy(a:ArgLead)
endfunc
:command -nargs=1 -complete=customlist,MyComplete MyCmd1 echo <q-args>
:command -nargs=_ -complete=customlist,MyComplete MyCmd2 echo <q-args>
Completing ":MyCmd1 two va<tab>" will complete with: >
:MyCmd1 two one value
Completing ":MyCmd2 two va<tab>" will complete with: >
:MyCmd2 two values
Note that arguments are used as text, not as expressions. Specifically,
"s:var" will use the script-local variable in the script where the command was
@@ -1693,7 +1712,21 @@ For the "custom" argument, the function should return the completion
candidates one per line in a newline separated string.
*E1303*
For the "customlist" argument, the function should return the completion
candidates as a Vim List. Non-string items in the list are ignored.
candidates as a Vim List. Each item may be either a string or a |Dictionary|.
A Dictionary item may have the following keys:
word (required) the text inserted into the command line when the
item is selected
abbr alternative text shown in the popup menu in place of "word",
when 'wildoptions' contains "pum"; useful when the inserted
text and the displayed text should differ
kind short kind text (one or two characters), shown in the popup
menu when 'wildoptions' contains "pum"
menu extra text shown after the match in the popup menu
info long description shown in the info popup; the |+popupwin|
feature is required to display it
Items that are neither a string nor a Dictionary, and Dictionary items without
a "word" key, are ignored. When 'wildoptions' does not contain "pum", only
"word" is shown.
The function arguments are:
ArgLead the leading portion of the argument currently being

View File

@@ -1,4 +1,4 @@
*options.txt* For Vim version 9.2. Last change: 2026 Apr 09
*options.txt* For Vim version 9.2. Last change: 2026 May 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -324,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
@@ -2393,6 +2393,9 @@ A jump table for the options with a short description can be found at |Q_op|.
close show close button: "on" (default) or "off"
height maximum height of the popup
highlight popup highlight group (default: PmenuSel)
opacity opacity percentage 0-100 (default 100, fully
opaque). When less than 100, content beneath
the popup shows through.
resize show resize handle: "on" (default) or "off"
shadow "off" (default) or "on" using |hl-PmenuShadow|
width maximum width of the popup
@@ -2400,6 +2403,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Example: >
:set completepopup=height:10,border:single,highlight:InfoPopup
:set completepopup=width:60,border:custom:─;│;─;│;┌;┐;┘;└
:set completepopup=border:round,opacity:80
<
When "align" is set to "item", the popup is positioned near the
selected item and moves as the selection changes.
@@ -3979,7 +3983,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|String| and is the |:find| command argument. The second argument is
a |Boolean| and is set to |v:true| when the function is called to get
a List of command-line completion matches for the |:find| command.
The function should return a List of strings.
The function should return a List, which is handled similarly to the
return value of a |:command-completion-customlist| function.
The function is called only once per |:find| command invocation.
The function can process all the directories specified in 'path'.
@@ -4757,7 +4762,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,
@@ -4768,7 +4774,8 @@ A jump table for the options with a short description can be found at |Q_op|.
[:PmenuKind,]:PmenuKindSel,
{:PmenuExtra,}:PmenuExtraSel,
x:PmenuSbar,X:PmenuThumb,j:PmenuBorder,
H:PmenuShadow,*:TabLine,
H:PmenuShadow,p:Popup,J:PopupBorder,
Q:PopupTitle,*:TabLine,
#:TabLineSel,_:TabLineFill,!:CursorColumn,
.:CursorLine,o:ColorColumn,q:QuickFixLine,
z:StatusLineTerm,Z:StatusLineTermNC,
@@ -4805,6 +4812,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|,
@@ -4837,6 +4846,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|hl-PmenuMatchSel| < popup menu matched text in selected line
|hl-PmenuBorder| j popup menu border characters
|hl-PmenuShadow| H popup menu shadow
|hl-Popup| p popup window body
|hl-PopupBorder| J popup window border characters
|hl-PopupTitle| Q popup window title
|hl-PreInsert| I text inserted when "preinsert" is in 'completeopt'
|hl-Normal| ( Window color (supersedes 'wincolor' option)
@@ -6196,6 +6208,49 @@ 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'
'foldmarker'
'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)
@@ -6962,7 +7017,8 @@ A jump table for the options with a short description can be found at |Q_op|.
of 'fillchars' option.
opacity:{n} opacity percentage 0-100 (default 100).
When less than 100, background content shows
through the popup menu.
through the popup menu. Requires the GUI,
'termguicolors', or a 256-color terminal.
Flags (no value):
margin adds one-cell spacing inside the left and
@@ -7532,8 +7588,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<
@@ -7541,7 +7597,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
@@ -7778,6 +7851,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Note: When using a pipe like "| tee", you'll lose the exit code of the
shell command. This might be configurable by your shell, look for
the pipefail option (for bash and zsh, use ":set -o pipefail").
Only a single "%s" value is allowed.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
@@ -7821,6 +7895,9 @@ A jump table for the options with a short description can be found at |Q_op|.
become obsolete (at least for Unix).
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*E1577*
Only a single "%s" item is allowed in the option value.
*'shellslash'* *'ssl'* *'noshellslash'* *'nossl'*
'shellslash' 'ssl' boolean (default off)
@@ -7982,6 +8059,9 @@ A jump table for the options with a short description can be found at |Q_op|.
search count statistics. The maximum limit can be set with
the 'maxsearchcount' option, see also |searchcount()|
function.
u don't give undo and redo messages like *shm-u*
"1 line less; before #1 1 second ago", "Already at oldest
change" or "Already at newest change"
This gives you the opportunity to avoid that a change between buffers
requires you to hit <Enter>, but still gives as useful a message as
@@ -8620,13 +8700,14 @@ 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-%@*
*stl-%@*
@ - Inserts a newline. This only takes effect when the "maxheight"
value of 'statuslineopt' is greater than 1, or for |tabpanel|.
*stl-%[FuncName]*
*stl-%[FuncName]*
%[ defines clickable regions in the statusline. When the user clicks
on a region with the mouse, the specified function is called.
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.
@@ -8644,11 +8725,17 @@ A jump table for the options with a short description can be found at |Q_op|.
"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.
"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.
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)
@@ -8983,24 +9070,22 @@ A jump table for the options with a short description can be found at |Q_op|.
Optional settings for the |tabpanel|, It can consist of the following
items. Items must be separated by a comma.
align:{text} Specifies the position of the tabpanel.
Currently supported positions are:
left left-side
align:{text} Specifies the position of the tabpanel.
Currently supported positions are:
left left-side (default)
right right-side
(default "left")
columns:{n} Number of columns of the tabpanel.
If this value is 0 or less than 'columns', the
tab panel will not be displayed.
(default 20)
vert Use a vertical separator for tabpanel.
The vertical separator character is taken from
"tpl_vert" in 'fillchars'.
(default off)
columns:{n} Number of columns of the tabpanel. (default 20)
If this value is 0 or less than 'columns', the
tabpanel will not be displayed.
scrollbar A one-column scrollbar is always displayed at the
right edge of the tabpanel, regardless of the
"align:" setting. (default off)
See |tabpanel-scroll|.
vert The vertical separator is drawn at the boundary
between the tabpanel and the buffer area.
(default off)
The character to be drawn uses "tpl_vert" from
'fillchars'.
Examples: >
:set tabpanelopt=columns:16,align:right
:set tabpanelopt=
@@ -9138,6 +9223,22 @@ A jump table for the options with a short description can be found at |Q_op|.
file names from the list. This avoids problems when a future version
uses another default.
*'tagsecure'* *'tsc'* *'notagsecure'* *'notsc'*
'tagsecure' 'tsc' boolean (default on)
global
When on, Vim refuses to follow tag entries whose file field looks like
a URL ("scheme://..."), aborting the jump with error |E1576|. This
prevents tag files from causing Vim to open URLs through |netrw|, which
would trigger a network request and expose netrw's URL-handling code to
attacker-controlled input or lead to environment exfiltration.
Tag files might be distributed alongside source code (e.g. via Git
repositories) and may therefore be untrustworthy. Only disable
this option if you fully control the tag files Vim will read.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'tagstack'* *'tgst'* *'notagstack'* *'notgst'*
'tagstack' 'tgst' boolean (default on)
global
@@ -9974,6 +10075,14 @@ A jump table for the options with a short description can be found at |Q_op|.
letter. Thus "KEEPTHIS and "K_L_M" are stored, but "KeepThis"
and "_K_L_M" are not. Nested List and Dict items may not be
read back correctly, you end up with an empty item.
Restoring |List|, |Dictionary| and |Tuple| variables is done by
parsing their textual form with the Vim expression evaluator.
Reading a viminfo file with "!" enabled is therefore only safe
when the file is trusted. In particular, do not enable "!"
before reading a viminfo file you obtained from another user,
downloaded, or that is writable by another account. See
also |viminfo-security|.
*viminfo-quote*
" Maximum number of lines saved for each register. Old name of
the '<' item, with the disadvantage that you need to put a
@@ -10331,8 +10440,12 @@ A jump table for the options with a short description can be found at |Q_op|.
applies to buffer name completion.
"noselect" If 'wildmenu' is enabled, show the menu but do not
preselect the first item.
If only one match exists, it is completed fully, unless "noselect" is
specified.
"noinsert" If 'wildmenu' is enabled, show the menu and preselect
the first match, but do not insert it in the command
line. If both "noinsert" and "noselect" are present,
"noselect" takes precedence.
If only one match exists, it is completed fully, unless "noselect" or
"noinsert" is specified.
Some useful combinations of colon-separated values:
"longest:full" Start with the longest common string and show
@@ -10600,11 +10713,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)
@@ -10617,9 +10729,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

@@ -1142,6 +1142,8 @@ One may easily "bookmark" the currently browsed directory by using >
mb
<
Note: Bookmarked paths are normalized and stored as absolute paths.
*.netrwbook*
Bookmarks are retained in between sessions of vim in a file called .netrwbook
as a |List|, which is typically stored in the first directory on the user's
@@ -2854,10 +2856,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 Apr 05
*pi_vimball.txt* For Vim version 9.2. Last change: 2026 Apr 16
----------------
Vimball Archiver
@@ -166,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 Apr 05
*pi_zip.txt* For Vim version 9.2. Last change: 2026 May 16
+====================+
| Zip File Interface |
@@ -114,9 +114,9 @@ Copyright: Copyright (C) 2005-2015 Charles E Campbell *zip-copyright*
should be treated as zip files.
Alternatively, one may change *g:zipPlugin_ext* in one's .vimrc.
Currently (as of October 2025) it holds: >
Currently (as of May 2026) it holds: >
let g:zipPlugin_ext='*.aar,*.apk,*.celzip,*.crtx,*.docm,*.docx,
let g:zipPlugin_ext='*.aar,*.apk,*.cbz,*.celzip,*.crtx,*.docm,*.docx,
\ *.dotm,*.dotx,*.ear,*.epub,*.gcsx,*.glox,*.gqsx,*.ja,*.jar,*.kmz,
\ *.odb,*.odc,*.odf,*.odg,*.odi,*.odm,*.odp,*.ods,*.odt,*.otc,*.otf,
\ *.otg,*.oth,*.oti,*.otp,*.ots,*.ott,*.oxt,*.pkpass,*.potm,*.potx,

View File

@@ -1,4 +1,4 @@
*popup.txt* For Vim version 9.2. Last change: 2026 Apr 06
*popup.txt* For Vim version 9.2. Last change: 2026 May 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -44,8 +44,11 @@ A popup window can be used for such things as:
The text in the popup window can be colored with |text-properties|. It is
also possible to use syntax highlighting.
The default color used is "Pmenu". If you prefer something else use the
"highlight" argument or the 'wincolor' option, e.g.: >
The default colors are taken from |hl-Popup| (body), |hl-PopupBorder|
(border) and |hl-PopupTitle| (title), which all link to |hl-Pmenu| by
default for backward compatibility. Override them to give general popup
windows a different look than the popup completion menu, or use the
"highlight" argument or the 'wincolor' option for a per-popup override: >
hi MyPopupColor ctermbg=lightblue guibg=lightblue
call setwinvar(winid, '&wincolor', 'MyPopupColor')
@@ -712,6 +715,15 @@ The second argument of |popup_create()| is a dictionary with options:
when "textprop" is present.
textpropid Used to identify the text property when "textprop" is
present. Use zero to reset.
clipwindow Only used when "textprop" is set. When TRUE the popup
is kept within the window containing the text
property: if the text property scrolls past that
window's top, bottom, left or right edge, the popup
is clipped at that edge instead of being drawn
outside it. Once the text property has scrolled out
of the window the popup is hidden.
Default FALSE.
See |popup-clipwindow|.
fixed When FALSE (the default), and:
- "pos" is "botleft" or "topleft", and
- the popup would be truncated at the right edge of
@@ -751,6 +763,10 @@ The second argument of |popup_create()| is a dictionary with options:
border one line of padding is added to put the title
on. You might want to add one or more spaces at the
start and end as padding.
The title uses |hl-PopupTitle| by default; if
"borderhighlight" is set the top border highlight is
used instead, and if "highlight"/'wincolor' is set
that is used.
wrap TRUE to make the lines wrap (default TRUE).
drag TRUE to allow the popup to be dragged with the mouse
by grabbing at the border. Has no effect if the
@@ -799,6 +815,8 @@ The second argument of |popup_create()| is a dictionary with options:
the highlight for the top/right/bottom/left border.
Example: ['TopColor', 'RightColor', 'BottomColor,
'LeftColor']
When not given and "highlight"/'wincolor' is also not
set, |hl-PopupBorder| is used.
borderchars List with characters, defining the character to use
for the top/right/bottom/left border. Optionally
followed by the character to use for the
@@ -949,6 +967,31 @@ If the window for which the popup was defined is closed, the popup is closed.
If the popup cannot fit in the desired position, it may show at a nearby
position.
CLIP TEXTPROP POPUP TO HOST WINDOW *popup-clipwindow*
When the popup is anchored to a text property in a split window, the popup is
by default drawn relative to the whole screen and may extend past the edges of
the window that contains the text property (the "host window"). Setting
"clipwindow" to TRUE keeps the popup within window's content area:
parts of the popup that fall outside the window are clipped, and the popup is
hidden once the text property has scrolled entirely past one of the edges.
Example: a tall popup anchored above the cursor that should never spill into
the window below the split: >
call popup_create(body, #{
\ textprop: 'marker',
\ textpropid: id,
\ pos: 'topleft',
\ line: -1, col: 0,
\ posinvert: v:false,
\ clipwindow: v:true,
\ })
<
With "posinvert" left at its default (TRUE) the popup may be flipped to the
opposite side of the text property when there is no room; set it to FALSE to
keep the requested side and rely on "clipwindow" to clip the overflow.
Some hints:
- To avoid collision with other plugins the text property type name has to be
unique. You can also use the "bufnr" item to make it local to a buffer.
@@ -1067,8 +1110,9 @@ The opacity value ranges from 0 to 100:
1-99 Partially transparent - the popup background is blended with
the underlying text, making both partially visible.
The transparency effect requires using the GUI or having 'termguicolors'
enabled in the terminal. Without it, the opacity setting has no effect.
The transparency effect requires using the GUI, having 'termguicolors'
enabled, or running in a 256-color terminal. On terminals with fewer
than 256 colors the opacity setting has no effect.
When a popup is transparent:
- The popup's background color is blended with the background text

View File

@@ -1,4 +1,4 @@
*quickref.txt* For Vim version 9.2. Last change: 2026 Apr 07
*quickref.txt* For Vim version 9.2. Last change: 2026 May 17
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
@@ -894,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
@@ -958,6 +960,7 @@ Short explanation of each option: *option-list*
'taglength' 'tl' number of significant characters for a tag
'tagrelative' 'tr' file names in tag file are relative
'tags' 'tag' list of file names used by the tag command
'tagsecure' 'tsc' do not open remote files using tag commands
'tagstack' 'tgst' push tags onto the tag stack
'tcldll' name of the Tcl dynamic library
'term' name of the terminal

View File

@@ -195,6 +195,10 @@ recovered file. Or use |:DiffOrig|.
Once you are sure the recovery is ok delete the swap file. Otherwise, you
will continue to get warning messages that the ".swp" file already exists.
Note: Recovering swap files is best-effort. Vim attempts to validate fields
and skip corrupted sections, but the swap file format is intended for files
you trust. A crafted swap file may trigger parser bugs; such reports are
treated as robustness issues rather than security vulnerabilities.
ENCRYPTION AND THE SWAP FILE *:recover-crypt*

View File

@@ -1,4 +1,4 @@
*starting.txt* For Vim version 9.2. Last change: 2026 Mar 17
*starting.txt* For Vim version 9.2. Last change: 2026 Apr 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1573,6 +1573,24 @@ Session. You could have several Session files, one for each project you are
working on. Viminfo and Session files together can be used to effectively
enter Vim and directly start working in your desired setup. |session-file|
*viminfo-security*
A viminfo file written by Vim is plain text and contains Vim expressions for
|List|, |Dictionary| and |Tuple| values. When "!" is in 'viminfo' at the time
Vim processes the file as a viminfo file, those expressions are evaluated.
The default value of 'viminfo' does not include "!", so by default no
expression evaluation happens.
Opening a viminfo file in a buffer (e.g. with |:edit|) is harmless; Vim only
displays the file contents. The risk is letting Vim process an untrusted file
through the viminfo machinery, which happens when:
- |:rviminfo| is used on the file, or
- 'viminfofile' is set to point at it, or
- the file is placed at the path Vim already reads as viminfo
|viminfo-file-name|
In any of those cases, do not have "!" in 'viminfo' if you do not trust it.
*viminfo-read*
When Vim is started and the 'viminfo' option is non-empty, the contents of
the viminfo file are read and the info can be used in the appropriate places.

View File

@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 9.2. Last change: 2026 Mar 22
*syntax.txt* For Vim version 9.2. Last change: 2026 May 17
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
@@ -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 is adjacent
to the current window. Drawn with the "vert" item of
'fillchars'.
*hl-VertSplitNC*
VertSplitNC Column separating vertically split windows where neither
adjacent window is the current window. Drawn with the
"vert" item of 'fillchars'.
By default, highlighted like |hl-VertSplit|.
*hl-Folded*
Folded Line used for closed folds.
*hl-FoldColumn*
@@ -6056,6 +6077,18 @@ PmenuShadow Popup menu: Used for shadow.
ComplMatchIns Matched text of the currently inserted completion.
*hl-PreInsert*
PreInsert Text inserted when "preinsert" is in 'completeopt'.
*hl-Popup*
Popup Popup window body, used when neither the popup's 'wincolor'
nor explicit "highlight" argument is set. Linked to |hl-Pmenu|
by default.
*hl-PopupBorder*
PopupBorder Popup window border characters, used when "borderhighlight" is
not set and the popup's 'wincolor' is also not set.
Linked to |hl-Pmenu| by default.
*hl-PopupTitle*
PopupTitle Popup window title, used when "borderhighlight" is not set and
the popup's 'wincolor' is also not set. Linked to
|hl-Pmenu| by default.
*hl-PopupSelected*
PopupSelected Popup window created with |popup_menu()|. Linked to
|hl-PmenuSel| by default.
@@ -6094,16 +6127,22 @@ SpellRare Word that is recognized by the spellchecker as one that is
hardly ever used. |spell|
This will be combined with the highlighting used otherwise.
*hl-StatusLine*
StatusLine Status line of current window.
StatusLine Status line of current window. The highlight at the status
line's edge (StatusLine, or any %#... / %N* in 'statusline')
also extends into the adjacent vertical separator cell when
the status lines are connected (no 'vert' character drawn).
*hl-StatusLineNC*
StatusLineNC status lines of not-current windows
StatusLineNC status lines of not-current windows. Like |hl-StatusLine|,
the edge highlight also extends into the adjacent vertical
separator cell.
Note: If this is equal to "StatusLine", Vim will use "^^^" in
the status line of the current window.
*hl-StatusLineTerm*
StatusLineTerm Status line of current window, if it is a |terminal| window.
*hl-StatusLineTermNC*
StatusLineTermNC Status lines of not-current windows that is a
|terminal| window.
StatusLineTermNC
Status lines of not-current windows that is a |terminal|
window.
*hl-TabLine*
TabLine Tab pages line, not active tab page label.
*hl-TabLineFill*
@@ -6123,18 +6162,19 @@ Title Titles for output from ":set all", ":autocmd" etc.
*hl-TitleBar*
TitleBar Title bar for the active Gui's window.
This feature is supported only in the MS-Windows GUI.
See |gui-w32-title-bar| for details
See |gui-w32-title-bar| for details.
Only the `guibg` and `guifg` highlight arguments are effective.
*hl-TitleBarNC*
TitleBarNC Title bar for inactive Gui's window.
This feature is supported only in the MS-Windows GUI.
See |gui-w32-title-bar| for details
See |gui-w32-title-bar| for details.
Only the `guibg` and `guifg` highlight arguments are effective.
*hl-Visual*
Visual Visual mode selection.
*hl-VisualNOS*
VisualNOS Visual mode selection when vim is "Not Owning the Selection".
Only X11 Gui's |gui-x11| and |xterm-clipboard| supports this.
Only X11 Gui's |gui-x11|, |xterm-clipboard| and
|wayland-selections| supports this.
*hl-WarningMsg*
WarningMsg Warning messages.
*hl-WildMenu*
@@ -6154,10 +6194,9 @@ Menu Current font, background and foreground colors of the menus.
Also used for the toolbar.
Applicable highlight arguments: font, guibg, guifg.
NOTE: For Motif the font argument actually
specifies a fontset at all times, no matter if 'guifontset' is
empty, and as such it is tied to the current |:language| when
set.
NOTE: For Motif the font argument actually specifies a fontset
at all times, no matter if 'guifontset' is empty, and as such
it is tied to the current |:language| when set.
*hl-Scrollbar*
Scrollbar Current background and foreground of the main window's
@@ -6168,10 +6207,9 @@ Scrollbar Current background and foreground of the main window's
Tooltip Current font, background and foreground of the tooltips.
Applicable highlight arguments: font, guibg, guifg.
NOTE: For Motif the font argument actually
specifies a fontset at all times, no matter if 'guifontset' is
empty, and as such it is tied to the current |:language| when
set.
NOTE: For Motif the font argument actually specifies a fontset
at all times, no matter if 'guifontset' is empty, and as such
it is tied to the current |:language| when set.
==============================================================================
15. Linking groups *:hi-link* *:highlight-link* *E412* *E413*

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 May 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -482,6 +482,42 @@ 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,
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.
The current tab page is always brought into view: when the selected tab page
changes (by |gt|, |gT|, |:tabnext| etc.), the panel scrolls so the current
entry is visible.
To show a vertical scrollbar indicating the current scroll position, add
"scrollbar" to 'tabpanelopt': >
:set tabpanelopt+=scrollbar
A one-column scrollbar is always displayed at the right edge of the tabpanel,
regardless of the "align:" setting in 'tabpanelopt'. Clicking on the
scrollbar column moves the thumb to the click position, and the thumb can be
dragged to scroll continuously.
The scrollbar uses the |hl-PmenuSbar| highlight group for the track and
|hl-PmenuThumb| for the thumb.
The scroll offset is remembered across redraws.
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 page 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'*
@@ -781,6 +785,7 @@ $quote eval.txt /*$quote*
'nota' options.txt /*'nota'*
'notagbsearch' options.txt /*'notagbsearch'*
'notagrelative' options.txt /*'notagrelative'*
'notagsecure' options.txt /*'notagsecure'*
'notagstack' options.txt /*'notagstack'*
'notbi' options.txt /*'notbi'*
'notbidi' options.txt /*'notbidi'*
@@ -799,6 +804,7 @@ $quote eval.txt /*$quote*
'noto' options.txt /*'noto'*
'notop' options.txt /*'notop'*
'notr' options.txt /*'notr'*
'notsc' options.txt /*'notsc'*
'nottimeout' options.txt /*'nottimeout'*
'nottybuiltin' options.txt /*'nottybuiltin'*
'nottyfast' options.txt /*'nottyfast'*
@@ -949,6 +955,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'*
@@ -1007,6 +1014,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'*
@@ -1223,6 +1231,7 @@ $quote eval.txt /*$quote*
'taglength' options.txt /*'taglength'*
'tagrelative' options.txt /*'tagrelative'*
'tags' options.txt /*'tags'*
'tagsecure' options.txt /*'tagsecure'*
'tagstack' options.txt /*'tagstack'*
'tal' options.txt /*'tal'*
'tb' options.txt /*'tb'*
@@ -1273,6 +1282,7 @@ $quote eval.txt /*$quote*
'tr' options.txt /*'tr'*
'trz' options.txt /*'trz'*
'ts' options.txt /*'ts'*
'tsc' options.txt /*'tsc'*
'tsl' options.txt /*'tsl'*
'tsr' options.txt /*'tsr'*
'tsrfu' options.txt /*'tsrfu'*
@@ -1556,7 +1566,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*
@@ -4773,6 +4782,8 @@ E1572 options.txt /*E1572*
E1573 channel.txt /*E1573*
E1574 channel.txt /*E1574*
E1575 builtin.txt /*E1575*
E1576 tagsrch.txt /*E1576*
E1577 options.txt /*E1577*
E158 sign.txt /*E158*
E159 sign.txt /*E159*
E16 cmdline.txt /*E16*
@@ -5962,6 +5973,8 @@ TextChanged autocmd.txt /*TextChanged*
TextChangedI autocmd.txt /*TextChangedI*
TextChangedP autocmd.txt /*TextChangedP*
TextChangedT autocmd.txt /*TextChangedT*
TextPutPost autocmd.txt /*TextPutPost*
TextPutPre autocmd.txt /*TextPutPre*
TextYankPost autocmd.txt /*TextYankPost*
Transact-SQL ft_sql.txt /*Transact-SQL*
Tuple eval.txt /*Tuple*
@@ -6228,6 +6241,9 @@ 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*
@@ -7514,6 +7530,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*
@@ -7965,7 +7982,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*
@@ -8452,8 +8468,11 @@ hl-PmenuSbar syntax.txt /*hl-PmenuSbar*
hl-PmenuSel syntax.txt /*hl-PmenuSel*
hl-PmenuShadow syntax.txt /*hl-PmenuShadow*
hl-PmenuThumb syntax.txt /*hl-PmenuThumb*
hl-Popup syntax.txt /*hl-Popup*
hl-PopupBorder syntax.txt /*hl-PopupBorder*
hl-PopupNotification syntax.txt /*hl-PopupNotification*
hl-PopupSelected syntax.txt /*hl-PopupSelected*
hl-PopupTitle syntax.txt /*hl-PopupTitle*
hl-PreInsert syntax.txt /*hl-PreInsert*
hl-Question syntax.txt /*hl-Question*
hl-QuickFixLine syntax.txt /*hl-QuickFixLine*
@@ -8487,6 +8506,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*
@@ -9780,6 +9800,7 @@ popt-option print.txt /*popt-option*
popup popup.txt /*popup*
popup-buffer popup.txt /*popup-buffer*
popup-callback popup.txt /*popup-callback*
popup-clipwindow popup.txt /*popup-clipwindow*
popup-close popup.txt /*popup-close*
popup-examples popup.txt /*popup-examples*
popup-filter popup.txt /*popup-filter*
@@ -10321,6 +10342,7 @@ shm-q options.txt /*shm-q*
shm-r options.txt /*shm-r*
shm-s options.txt /*shm-s*
shm-t options.txt /*shm-t*
shm-u options.txt /*shm-u*
shm-w options.txt /*shm-w*
shm-x options.txt /*shm-x*
short-name-changed version4.txt /*short-name-changed*
@@ -10884,6 +10906,10 @@ 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*
tabpanel_getinfo() builtin.txt /*tabpanel_getinfo()*
tabpanel_scroll() builtin.txt /*tabpanel_scroll()*
tag tagsrch.txt /*tag*
tag-! tagsrch.txt /*tag-!*
tag-binary-search tagsrch.txt /*tag-binary-search*
@@ -11747,6 +11773,7 @@ viminfo-r options.txt /*viminfo-r*
viminfo-read starting.txt /*viminfo-read*
viminfo-read-write starting.txt /*viminfo-read-write*
viminfo-s options.txt /*viminfo-s*
viminfo-security starting.txt /*viminfo-security*
viminfo-timestamp starting.txt /*viminfo-timestamp*
viminfo-write starting.txt /*viminfo-write*
vimrc starting.txt /*vimrc*
@@ -11798,8 +11825,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 @@
*tagsrch.txt* For Vim version 9.2. Last change: 2026 Feb 14
*tagsrch.txt* For Vim version 9.2. Last change: 2026 May 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -579,6 +579,10 @@ ctags).
have an absolute or relative path. It may contain environment
variables and wildcards (although the use of wildcards is
doubtful). It cannot contain a <Tab>.
*E1576*
Using a remote file via network protocol (e.g. using
http://remote/file.txt) is not allowed unless 'tagsecure'
is unset.
{tagaddress} The Ex command that positions the cursor on the tag. It can
be any Ex command, although restrictions apply (see
|tag-security|). Posix only allows line numbers and search

View File

@@ -965,6 +965,20 @@ term_start({cmd} [, {options}]) *term_start()*
input and one output handle, with no separate handle for
stderr.
Note: term_start() always uses RAW mode for its callbacks.
"out_cb" and "err_cb" receive the raw chunk of data as read
from the OS. A single callback invocation may contain
multiple lines separated by NL, and (for stdout via a pty)
each line may have a trailing CR from the line discipline
(ONLCR). If per-line handling is desired, the callback must
split "msg" on NL and strip the trailing CR itself.
Example: >
func Handle(ch, msg)
for line in split(a:msg, "\n")
echom substitute(line, '\r$', '', '')
endfor
endfunc
<
There are extra options:
"term_name" name to use for the buffer name, instead
of the command name.

View File

@@ -1,4 +1,4 @@
*todo.txt* For Vim version 9.2. Last change: 2026 Feb 14
*todo.txt* For Vim version 9.2. Last change: 2026 Apr 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -421,8 +421,6 @@ more information.
Add an option to restrict 'incsearch' to not scroll the view. (Tavis Ormandy)
Remove SPACE_IN_FILENAME ? It is only used for completion.
When 'term' starts with "foot" then default t_TI and t_TE to the values used
for the builtin xterm termcap.
@@ -2115,7 +2113,6 @@ es_ES.utf-8" gives an error and doesn't switch messages. (Dominique Pelle,
When $HOME contains special characters, such as a comma, escape them when used
in an option. (Michael Hordijk, 2009 May 5)
Turn "esc" argument of expand_env_esc() into string of chars to be escaped.
Should make 'ignorecase' global-local, so that it makes sense setting it from
a modeline.

View File

@@ -1,4 +1,4 @@
*usr_05.txt* For Vim version 9.2. Last change: 2026 Feb 14
*usr_05.txt* For Vim version 9.2. Last change: 2026 May 11
VIM USER MANUAL by Bram Moolenaar
@@ -509,6 +509,16 @@ To highlight in visual mode, use: >
To disable the effect of the plugin after it has been loaded: >
au! hlyank
Additionally, the plugin can also highlight regions that are put using the
|TextPutPost| autocommand. This is by default disabled and can be enabled
using: >
:let g:hlput_enable = v:true
<
The following configuration variables can be used are "g:hlput_hlgroup" and
"g:hlput_duration", which have the same effect as their yank counterparts: >
:let g:hlput_hlgroup = 'IncSearch'
:let g:hlput_duration = 300
------------------------------------------------------------------------------
Adding the osc52 package *osc52-install* *package-osc52*
------------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
*usr_30.txt* For Vim version 9.2. Last change: 2026 Feb 14
*usr_30.txt* For Vim version 9.2. Last change: 2026 May 15
VIM USER MANUAL by Bram Moolenaar
@@ -531,9 +531,9 @@ they do when using only tab characters.
Vim 5.4 introduced the 'softtabstop' option. On top of the (hard) tab stops
used to display the horizontal tab characters in the text, Vim adds extra
soft tab stops dedicated only to the cursor. When 'softtabstop' is set to a
positive value, and the <Tab> key will push the cursor to the next soft tab
positive value, the <Tab> key will push the cursor to the next soft tab
stop. Vim will insert the correct combination of tab characters and spaces to
make the effect visually. Likewise pressing <BS> will have the cursor try to
achieve this effect. Likewise pressing <BS> will have the cursor try to
reach the nearest soft tab stop. The following example uses
`:set softtabstop=4`

View File

@@ -1,4 +1,4 @@
*usr_41.txt* For Vim version 9.2. Last change: 2026 Feb 16
*usr_41.txt* For Vim version 9.2. Last change: 2026 Apr 28
VIM USER MANUAL by Bram Moolenaar
@@ -1081,6 +1081,8 @@ Buffers, windows and the argument list:
tabpagebuflist() return List of buffers in a tab page
tabpagenr() get the number of a tab page
tabpagewinnr() like winnr() for a specified tab page
tabpanel_getinfo() get current state of the tabpanel
tabpanel_scroll() scroll the tabpanel
winnr() get the window number for the current window
bufwinid() get the window ID of a specific buffer
bufwinnr() get the window number of a specific buffer

View File

@@ -1,4 +1,4 @@
*various.txt* For Vim version 9.2. Last change: 2026 Apr 06
*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 Apr 09
*version9.txt* For Vim version 9.2. Last change: 2026 May 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -41880,6 +41880,9 @@ Highlighting: ~
|hl-PmenuMatchSel| Popup menu: highlighting of matched text in selected
line
|hl-PmenuShadow| Popup menu: highlighting of the popup shadow
|hl-Popup| Popup window: body, default link |hl-Pmenu|
|hl-PopupBorder| Popup window: border characters, default link |hl-Pmenu|
|hl-PopupTitle| Popup window: title, default link |hl-Pmenu|
|hl-PreInsert| highlighting for completion preinserted text
|hl-TabPanel| |tabpanel|: not active tab page label
|hl-TabPanelFill| |tabpanel|: filler space
@@ -41954,7 +41957,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.
@@ -52587,6 +52590,8 @@ Popups ~
- Support for transparency, see |popup-opacity|.
- 'previewpopup' supports the same values as 'completepopup' (except for
"align").
- Support "opacity" setting for 'completepopup' option.
- Support for clipping textproperty popups |popup-clipwindow|.
Diff mode ~
---------
@@ -52613,12 +52618,27 @@ Other ~
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 |status-line| using the
|stl-%[FuncName]| atom.
- Allow mouse clickable regions in the 'statusline', 'tabline' and the
'tabpanel' using the |stl-%[FuncName]| atom.
- Enable reflow support in the |:terminal|.
- Enabled scrolling for the tabpanel when the tab page list exceeds the screen
height. Also added the "scrollbar" sub-option to 'tabpanelopt'.
- Added the "noinsert" value to the 'wildmode' option for symmetry with the
'completeopt' option
- Channel can handle |Blob| messages |channel-open-options|.
- Added the "u" flag to 'shortmess' to silence undo/redo messages: |shm-u|
- |:command-completion-customlist| can return a list of dictionaries with
kind/menu/info/abbr for the popup menu.
- |C-indenting| detects comments better.
- The |package-hlyank| can now optionally highlight the last put region as
well.
- New argument handling for user commands |:command-nargs| using the "-nars=_"
attribute to handle completion of single arguments with spaces as expected.
Platform specific ~
-----------------
- support OpenType font features in 'guifont' for DirectWrite (Win32)
- Include strptime() fallback for MS-Windows
xxd ~
---
@@ -52633,6 +52653,14 @@ Changed ~
- |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.
- On Unix, filename completion for single-file Ex commands now treats embedded
whitespace as part of the filename, like on other platforms.
*added-9.3*
Added ~
@@ -52642,22 +52670,36 @@ Various syntax, indent and other plugins were added.
Functions: ~
|ch_listen()| listen on {address}
|tabpanel_getinfo()| get current state of the |tabpanel|
|tabpanel_scroll()| scroll the |tabpanel|
Autocommands: ~
|SessionLoadPre| before loading a |Session| file
|TextPutPost| after putting text
|TextPutPre| before putting text
Options: ~
'pumopt' Additional options for the popup menu
'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.
'tagsecure' Do not open remote files using tag commands
'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.
|hl-Popup| Popup window body.
|hl-PopupBorder| Popup window border.
|hl-PopupTitle| Popup window title.
==============================================================================
PATCHES *patches-9.3* *bug-fixes-9.3*
*patches-after-9.2*

View File

@@ -36,8 +36,9 @@ Pu
Particolarmente utile per editare programmi.
.PP
Ci sono parecchi miglioramenti rispetto a Vi: undo multipli, finestre e buffer
multipli, evidenziazione sintattica, possibilità di modificare la riga di comando,
completamento nomi file, help in linea, selezione testi in Modo Visual, etc..
multipli, evidenziazione sintattica, possibilità di modificare la riga di
comando, completamento nomi file, help online, selezione testi in Modo
Visual, etc.
Vedere ":help vi_diff.txt" per un sommario delle differenze fra
.B Vim
e Vi.
@@ -67,9 +68,10 @@ essere usata per scegliere uno o pi
nome_file ..
Una lista di nomi di file.
Il primo di questi sarà il file corrente, e verrà letto nel buffer.
Il cursore sarà posizionato sulla prima linea del buffer.
Il cursore sarà posizionato sulla prima riga del buffer.
Si può arrivare agli altri file col comando ":next".
Per editare un file il cui nome inizia per "\-" premettete "\-\-" alla lista_file.
Per editare un file il cui nome inizia per "\-" premettete "\-\-" alla
lista_file.
.TP
\-
Il file da editare è letto dallo stdin.
@@ -77,7 +79,7 @@ I comandi sono letti da stderr, che dovrebbe essere un terminale [tty].
.TP
\-t {tag}
Il file da editare e la posizione iniziale del cursore dipendono da "tag",
una specie di "etichetta" a cui saltare.
una "etichetta" a cui saltare.
{tag} viene cercata nel file "tags", e il file a essa associato diventa
quello corrente, e il comando a essa associato viene eseguito.
Di solito si usa per programmi C, nel qual caso {tag} potrebbe essere un
@@ -87,7 +89,7 @@ e il cursore
Vedere ":help tag\-commands".
.TP
\-q [file_errori]
Inizia in Modo QuickFix [correzione veloce].
Iniziare in Modo QuickFix [correzione veloce].
Il file [file_errori] è letto e il primo errore è visualizzato.
Se [file_errori] non è indicato, il suo nome è ottenuto dal valore
dell'opzione 'errorfile' (che, se non specificata, vale "AztecC.Err"
@@ -97,28 +99,28 @@ Vedere ":help quickfix".
.PP
.B Vim
si comporta in modo diverso se invocato con nomi differenti (il programma
eseguibile "soggiacente" può essere sempre lo stesso).
eseguibile "sottostante" può essere sempre lo stesso).
.TP 10
vim
Modo Normal, comportamento predefinito.
Iniziare in Modo Normal, comportamento predefinito.
.TP
ex
Inizia in Modo "Ex".
Iniziare in Modo "Ex".
Si può passare in Modo Normal col comando ":vi".
Si può invocare il Modo "Ex" anche con l'argomento "\-e".
.TP
view
Inizia in Modo Read-only (Sola Lettura). Non si possono modificare i file.
Iniziare in Modo Read-only (sola-lettura). Non si possono modificare i file.
Si può invocare il Modo Read-only anche con l'argomento "\-R".
.TP
gvim gview
La versione GUI [Graphical User Interface].
Apre una nuova finestra.
Usare la versione GUI [Graphical User Interface].
Viene aperta una nuova finestra.
Si può invocare il Modo GUI anche con l'argomento "\-g".
.TP
evim eview
La versione GUI in Modo Easy (semplificata).
Apre una nuova finestra.
Usare la versione GUI in Modo Easy (semplificato).
Viene aperta una nuova finestra.
Si può invocare il Modo Easy anche con l'argomento "\-y".
.TP
rvim rview rgvim rgview
@@ -128,21 +130,21 @@ della shell o sospendere
Si può chiedere la stessa cosa anche con l'argomento "\-Z".
.SH OPZIONI
Le opzioni possono essere in un ordine qualsiasi, prima o dopo i nomi di file.
Opzioni che non hanno un argomento si possono specificare dietro a un solo "\-".
Opzioni che non hanno un argomento si possono specificare insieme dietro a un
solo "\-".
.TP 12
+[numero]
Nel primo file il cursore sarà posizionato sulla linea "numero".
Se "numero" manca, il cursore sarà posizionato sull'ultima linea del file.
Nel primo file, posizionare il cursore sulla riga numero "numero".
Se "numero" manca, il cursore sarà posizionato sull'ultima riga del file.
.TP
+/{espressione}
Nel primo file il cursore sarà posizionato alla
prima occorrenza di {espressione}.
Nel primo file posizionare il cursore alla prima occorrenza di {espressione}.
Vedere ":help search\-pattern" per come specificare l'espressione.
.TP
+{comando}
.TP
\-c {comando}
{comando} sarà eseguito dopo che il primo file è stato letto.
Eseguire {comando} dopo che il primo file è stato letto.
{comando} è interpretato come un comando Ex.
Se il {comando} contiene spazi deve essere incluso fra doppi apici
(o altro delimitatore, a seconda della shell che si sta usando).
@@ -154,7 +156,7 @@ Note: Si possono avere fino a 10 comandi "+" o "\-c".
Se
.B Vim
è stato compilato con supporto ARABIC per editare file con orientamento
destra-sinistra e tastiera con mappatura araba, quest'opzione inizia
destra-sinistra e tastiera con mappatura araba, quest'opzione fa iniziare
.B Vim
in Modo Arabic, cioè impostando 'arabic'.
Altrimenti viene dato un messaggio di errore e
@@ -162,32 +164,32 @@ Altrimenti viene dato un messaggio di errore e
termina in modo anormale.
.TP
\-b
Modo Binary (binario).
Vengono impostate alcune opzioni che permettono di modificare un file
binario o un file che contiene un programma eseguibile.
Eseguire Vim in Modo Binary (binario).
Vengono impostate alcune opzioni che permettono di modificare un file binario
o un file che contiene un programma eseguibile.
.TP
\-C
Compatibile. Imposta l'opzione 'compatible'.
Compatibile. Impostare l'opzione 'compatible'.
In questo modo
.B Vim
ha quasi lo stesso comportamento di Vi, anche in presenza di un file .vimrc.
.TP
\-d
Inizia in Modo Diff [differenze].
Dovrebbero esserci come argomenti da due o otto nomi di file.
Iniziare in Modo Diff [differenze].
Dovrebbero esserci come argomenti da due fino a otto nomi di file.
.B Vim
aprirà tutti i file evidenziando le differenze fra gli stessi.
Funziona come vimdiff(1).
.TP
\-d {dispositivo}, \-dev {dispositivo}
Apre {dispositivo} per usarlo come terminale.
Aprire {dispositivo} per usarlo come terminale.
Solo per l'Amiga.
Esempio:
"\-d con:20/30/600/150".
.TP
\-D
Debugging. Vim si mette in Modo "debugging" a partire
dall'esecuzione del primo comando da uno script.
Debugging. Entrare in Modo "debugging" a partire dall'esecuzione del primo
comando di uno script.
.TP
\-e
Eseguire
@@ -202,15 +204,15 @@ in Modo Ex migliorato, come se il programma eseguito sia "exim".
\-f
Direttamente [Foreground]. Per la versione GUI,
.B Vim
non crea [fork] una nuova finestra, indipendente dalla shell di invocazione.
Per l'Amiga,
non creare [fork] una nuova finestra, indipendente dalla shell di invocazione.
Per l'Amiga, non fa ripartire
.B Vim
non è fatto ripartire per aprire una nuova finestra.
per aprire una nuova finestra.
Opzione da usare quando
.B Vim
è eseguito da un programma che attende la fine della
sessione di edit (p.es., mail).
Sull'Amiga i comandi ":sh" e ":!" non sono disponibili.
è eseguito da un programma che attende la fine della sessione di edit (p.es.,
mail).
In ambiente Amiga, i comandi ":sh" e ":!" non sono disponibili.
.TP
\-F
Se
@@ -229,7 +231,8 @@ Nota: Il supporto Farsi
Se
.B Vim
è stato compilato con supporto GUI, quest'opzione chiede di usarla.
Se Vim è stato compilato senza supporto GUI viene dato un messaggio di errore e
Se Vim è stato compilato senza supporto GUI viene dato un messaggio di
errore e
.B Vim
termina in modo anormale.
.TP
@@ -246,145 +249,148 @@ termina in modo anormale.
.TP
\-i {viminfo}
Se è abilitato l'uso di un file viminfo, quest'opzione indica il nome
del file da usare invece di quello predefinito "~/.viminfo".
del file da usare invece del file predefinito "~/.viminfo".
Si può anche evitare l'uso di un file .viminfo, dando come nome
"NONE".
.TP
\-l
Modo Lisp.
Imposta le opzioni 'lisp' e 'showmatch'.
Eseguire Vim in Modo Lisp.
Vengono impostate le opzioni 'lisp' e 'showmatch'.
.TP
\-L
Equivalente a \-r.
.TP
\-m
Inibisce modifica file.
Inibisce l'opzione 'write'.
Inibire modifica file.
Viene inibita l'opzione 'write'.
È ancora possibile modificare un buffer, ma non riscriverlo.
.TP
\-M
Modifiche non permesse. Le opzioni 'modifiable' e 'write' sono annullate,
in modo da impedire sia modifiche che riscritture. Da notare che queste
opzioni possono essere abilitate in seguito, permettendo così modifiche.
in modo da impedire sia modifiche che riscritture. Si noti che queste opzioni
possono essere cambiate in seguito, per consentire modifiche.
.TP
\-n
Inibisce l'uso di un file di swap.
Il recupero dopo una caduta di macchina sarà impossibile.
Inibire l'uso di un file di swap.
Ripristinare il file in caso di fine anormale sarà impossibile.
Utile per editare un file su un supporto molto lento (p.es., floppy).
Il comando ":set uc=0" ha lo stesso effetto.
Per abilitare il recupero usare ":set uc=200".
Per abilitare il ripristino usare ":set uc=200".
.TP
\-N
Modo "Non-compatibile". Annulla l'opzione 'compatible'.
Eseguire Vim in Modo "Non-compatibile". Annulla l'opzione 'compatible'.
Così
.B Vim
si comporta un po' meglio, ma è meno compatibile con Vi, anche in assenza di un
file .vimrc.
si comporta un po' meglio, ma è meno compatibile con Vi, anche in assenza di
un file .vimrc.
.TP
\-nb
Diviene un Editor server per NetBeans. Vedere la documentazione per dettagli.
Fare di Vim un Editor server per NetBeans. Vedere la documentazione per
dettagli.
.TP
\-o[N]
Apre N finestre in orizzontale.
Se N manca, apre una finestra per ciascun file.
Aprire N finestre in orizzontale.
Se N manca, aprire una finestra per ciascun file.
.TP
\-O[N]
Apre N finestre, in verticale.
Se N manca, apre una finestra per ciascun file.
Aprire N finestre, in verticale.
Se N manca, aprire una finestra per ciascun file.
.TP
\-p[N]
Apre N pagine di linguette.
Quando N è omesso, apre una pagine di linguette per ciascun file.
Aprire N pagine di schede.
Quando N è omesso, aprire una pagine di schede per ciascun file.
.TP
\-P {titolo-padre}
Solo per GUI Win32: Specifica il titolo dell'applicazione-padre. Se possibile,
Vim viene eseguito in una finestra MDI (Multiple-Document Interface).
{titolo-padre} deve apparire nel titolo della applicazione-padre. Accertatevi
Solo per GUI Win32: Specificare il titolo dell'applicazione-padre. Se
possibile, Vim viene eseguito in una finestra MDI
(Multiple-Document Interface).
{titolo-padre} deve apparire nel titolo dell'applicazione-padre. Accertarsi
che sia sufficientemente esplicativo. Notare che l'implementazione è ancora
rudimentale. Non funziona per tutte le applicazioni, e il menù non funziona.
.TP
\-r
Lista file di swap, e informazioni su come usarli per ripristinare file.
Listare file di swap, con informazioni su come usarli per ripristinare file.
.TP
\-r {file}
Modo Recovery (ripristino).
Eseguire Vim in Modo Recovery (ripristino).
Il file di swap è usato per recuperare una sessione di edit finita male.
Il file di swap è un file con lo stesso nome file del file di testo
editato, col suffisso ".swp".
Il file di swap è un file con lo stesso nome file del file di testo editato,
col prefisso "." e col suffisso ".swp".
Vedere ":help recovery".
.TP
\-R
Modo Read-only (Sola Lettura).
Imposta l'opzione 'readonly'.
Si può ancora modificare il buffer, ma il file è protetto da una riscrittura
involontaria.
Se si vuole davvero riscrivere il file, occorre aggiungere un punto esclamativo
al comando Ex, come in ":w!".
Eseguire Vim in Modo Read-only (Sola Lettura).
Viene impostata l'opzione 'readonly'.
È ancora possibile modificare il buffer, ma il file è protetto da una
riscrittura involontaria.
Se si vuole davvero riscrivere il file, occorre aggiungere un punto
esclamativo al comando Ex, come in ":w!".
L'opzione \-R implica anche l'opzione \-n (vedere sopra).
L'opzione 'readonly' può essere annullata con ":set noro".
Vedere ":help 'readonly'".
.TP
\-s
Modo silenzioso. Solo quando invocato come "Ex" o quando l'opzione
"\-e" è stata data prima dell'opzione "\-s".
Eseguire Vim in Modo silenzioso. Solo quando invocato come "Ex" o quando
l'opzione "\-e" è stata specificata prima dell'opzione "\-s".
.TP
\-s {script_in_input}
Lo script file {script_in_input} è letto.
Eseguire lo script file {script_in_input}.
I caratteri nel file sono interpretati come se immessi da terminale.
Lo stesso risultato si può ottenere col comando ":source! {script_in_input}".
Se la fine del file di input viene raggiunta prima che Vim termini,
l'ulteriore input verrà preso dalla tastiera.
.TP
\-S {file}
I comandi contenuti in {file} sono eseguiti dopo la lettura del primo file.
Eseguire i comandi contenuti in {file} dopo la lettura del primo file.
Equivalente a \-c "source {file}".
{file} non può avere un nome che inizia per '\-'.
Se {file} è omesso si usa "Session.vim" (funziona solo se \-S è l'ultimo
argomento specificato).
.TP
\-T {terminale}
Dice a
Specificare a
.B Vim
quale tipo di terminale state usando.
il tipo di terminale che si sta usando.
Utile solo se il terminale non viene riconosciuto correttamente da Vim.
Dovrebbe essere un terminale noto a
.B Vim
(predefinito) o definito nei file termcap o terminfo.
.TP
\-u {vimrc}
Usa i comandi nel file {vimrc} per inizializzazioni.
Usare i comandi nel file {vimrc} per inizializzazioni.
Tutte le altre inizializzazioni non sono eseguite.
Usare quest'opzione per editare qualche file di tipo speciale.
Si possono anche omettere tutte le inizializzazioni dando come nome "NONE".
Vedere ":help initialization" da vim per ulteriori dettagli.
.TP
\-U {gvimrc}
Usa i comandi nel file {gvimrc} per inizializzazioni GUI.
Usare i comandi nel file {gvimrc} per inizializzare la GUI.
Tutte le altre inizializzazioni GUI non sono eseguite.
Si possono anche omettere tutte le inizializzazioni GUI dando come nome "NONE".
Si possono anche omettere tutte le inizializzazioni GUI dando come nome
"NONE".
Vedere ":help gui\-init" da vim per ulteriori dettagli.
.TP
\-v
Inizia
Iniziare
.B Vim
in Modo Vi, come se il programma eseguibile fosse "vi". Questo ha
effetto solo quando Vim viene invocato con il nome "ex".
.TP
\-V[N]
Verboso. Vim manda messaggi relativi ai file di script che esegue
e quando legge o scrive un file viminfo. Il numero opzionale N è il valore
dell'opzione 'verbose'. Il valore predefinito è 10.
Verboso. Fare inviare a Vim messaggi relativi ai file di script eseguiti
e alla lettura/scrittura di un file viminfo. Il numero opzionale N è il
valore dell'opzione 'verbose'. Il valore predefinito è 10.
.TP
\-V[N]{nome_file}
Come \-V imposta 'verbosefile' a {nome_file}. Il risultato è che i messaggi
non sono visualizzati, ma scritti sul file {nome_file}. Il {nome_file} non
deve iniziare con un numero.
Come \-V, e si imposta 'verbosefile' a {nome_file}. Il risultato è che i
messaggi non sono visualizzati, ma scritti sul file {nome_file}. Il
{nome_file} non deve iniziare con un numero.
.TP
\-w{numero}
Imposta l'opzione 'window' a {numero}.
Impostare l'opzione 'window' a {numero}.
.TP
\-w {script_file}
Ogni carattere immesso viene registrato nel file {script_file},
Registrare ogni carattere immesso nel file {script_file},
finché non si esce da
.B Vim.
Utile se si vuole creare uno script file da usare con "vim \-s" o
@@ -402,7 +408,7 @@ nella scrittura dei file. Verr
.TP
\-X
Non connettersi al server X. Vim parte più rapidamente,
ma il titolo della finestra e la clipboard non sono usati.
ma il titolo della finestra e gli appunti non sono disponibili.
.TP
\-Y
Non connettersi al compositore Wayland.
@@ -410,17 +416,19 @@ Non connettersi al compositore Wayland.
\-y
Eseguire
.B Vim
in Modo Easy (semplificato), come se l'eseguibile invocato sia "evim" o "eview".
in Modo Easy (semplificato), come se l'eseguibile invocato sia "evim" o
"eview".
Fa sì che
.B Vim
si comporti come un editor che usa solo il mouse e i caratteri.
.TP
\-Z
Modo ristretto. Vim si comporta come se invocato con un nome che inizia per "r".
Eseguire Vim in Modo ristretto. Vim si comporta come se invocato con un nome
che inizia per "r".
.TP
\-\-
Specifica la fine delle opzioni.
Argomenti specificati dopo questo sono considerati nomi file.
In questo modo si specifica la fine delle opzioni.
Argomenti aggiunti dopo questo sono considerati nomi file.
Si può usare per editare un file il cui nome inizi per '-'.
.TP
\-\-clean
@@ -428,40 +436,43 @@ Richiede di non usare alcun file di personalizzazione (vimrc, plugin, etc.).
Utile per verificare se un problema persiste invocando Vim "originale".
.TP
\-\-cmd {comando}
Come "\-c", ma il comando è eseguito subito PRIMA
di eseguire qualsiasi file vimrc.
Si possono usare fino a 10 di questi comandi, indipendentemente dai comandi "\-c".
Come "\-c", ma eseguire il comando subito PRIMA di eseguire qualsiasi file
vimrc.
Si possono usare fino a 10 di questi comandi, indipendentemente dai comandi
"\-c".
.TP
\-\-echo\-wid
Solo per GUI GTK: Visualizza ID di Window su stdout.
Solo per GUI GTK: Visualizzare ID di Window su stdout.
.TP
\-\-gui-dialog-file {nome}
Quando si usa la GUI, invece di visualizzare un dialogo, il titolo e il
messaggio del dialogo sono scritti sul file {nome}. Il file viene creato o,
se già esistente, viene esteso. Quest'opzione serve solo in fase di test,
per evitare di restare bloccati da un dialogo che non si riesce a visualizzare.
per evitare di restare bloccati da un dialogo che non si riesce a
visualizzare.
Se si sta lavorando senza la GUI l'argomento viene ignorato.
.TP
\-\-help, \-h, \-?
Un po' di aiuto su opzioni e argomenti che si possono dare invocando Vim.
Visualizzare opzioni e argomenti che si possono specificare invocando Vim.
Subito dopo
.B Vim
esce.
.TP
\-\-literal
Considera i nomi passati come argomenti letterali, senza espandere metacaratteri.
Considerare i nomi passati come argomenti letterali, senza espandere
metacaratteri.
Non ha effetto in Unix, dove la shell espande comunque i metacaratteri.
.TP
\-\-log {nome_file}
Se
.B Vim
è stato compilato con le funzionalità eval e channel, inizia a registrare
e scrive le registrazioni a {nome_file}. Ciò equivale a chiamare
è stato compilato con le funzionalità eval e channel, iniziare a registrare
e scrivere le registrazioni a {nome_file}. Ciò equivale a chiamare
.I ch_logfile({nome_file}, 'ao')
in una fase molto iniziale dell'avvio del programma.
.TP
\-\-nofork
Direttamente [Foreground]. Per la versione GUI,
Eseguire Vim irettamente [Foreground]. Per la versione GUI,
.B Vim
non crea [fork] una nuova finestra, indipendente dalla shell di invocazione.
.TP
@@ -471,17 +482,19 @@ Non caricare plugin. Implicito se si specifica \-u NONE.
\-\-not\-a\-term
Da usare per specificare a
.B Vim
che l'utente è consapevole che l'input e l'output non avvengono con un terminale
vero e proprio. Ciò serve per evitare il messaggio di avvertimento e il ritardo
di due secondi che avverrebbero in assenza di questo argomento.
che l'utente è consapevole che l'input e l'output non avvengono con un
terminale vero e proprio. Ciò serve per evitare il messaggio di avvertimento
e il ritardo di due secondi, ossia il comportamento previsto in assenza di
questo argomento.
.TP
\-\-remote
Connettersi a un server Vim e chiedere di editare i file elencati come altri
argomenti. Se non si trova un server viene dato un messaggio e i file sono
editati nel Vim corrente.
Connettersi a un server Vim a cui chiedere di editare i file elencati come
altri argomenti. Se non si trova un server viene dato un messaggio e i file
sono editati nel Vim corrente.
.TP
\-\-remote\-expr {expr}
Connettersi a un server Vim, valutare {expr} e stampare il risultato su stdout.
\-\-remote\-expr {espressione}
Connettersi a un server Vim, valutare {espressione} e stampare il risultato su
stdout.
.TP
\-\-remote\-send {chiavi}
Connettersi a un server Vim e spedirgli {chiavi}.
@@ -490,16 +503,16 @@ Connettersi a un server Vim e spedirgli {chiavi}.
Come \-\-remote, ma senza avvisare se non si trova un server.
.TP
\-\-remote-wait
Come \-\-remote, ma Vim non termina finché i file non sono stati editati.
Come \-\-remote, ma non terminare Vim finché i file non sono stati editati.
.TP
\-\-remote\-wait\-silent
Come \-\-remote\-wait, ma senza avvisare se non si trova un server.
.TP
\-\-serverlist
Elenca i nomi di tutti i server Vim disponibili.
Elencare i nomi di tutti i server Vim disponibili.
.TP
\-\-servername {nome}
Usa {nome} come nome del server usato per il Vim corrente, a meno che sia
Usare {nome} come nome del server usato per il Vim corrente, a meno che sia
usato con l'argomento \-\-remote, nel qual caso indica il server a cui
connettersi.
Quando si sta usando il server a socket [socketserver backend], se il nome
@@ -512,19 +525,20 @@ rispettivamente, o "socket" o "x11". Disponibile solo se Vim
compilato con le due funzionalità socketserver e X11.
.TP
\-\-socketid {id}
Solo per GUI GTK: Usa meccanismo GtkPlug per eseguire gVim in un'altra finestra.
Solo per GUI GTK: Usare meccanismo GtkPlug per eseguire gVim in un'altra
finestra.
.TP
\-\-startuptime {nome_file}
Durante la fase iniziale, scrive messaggi di log al file {nome_file}.
Durante la fase iniziale, scrivere messaggi di log al file {nome_file}.
.TP
\-\-ttyfail
Quando stdin o stdout non sono un terminale (tty) esce subito da Vim.
Quando stdin o stdout non sono un terminale (tty) uscire subito da Vim.
.TP
\-\-version
Stampa la versione di Vim ed esce.
Stampare la versione di Vim e uscire.
.TP
\-\-windowid {id}
Solo per GUI Win32: Chiede a gVim di provare a user l'ID di window {id}
Solo per GUI Win32: Chiedere a gVim di provare a user l'ID di window {id}
come padre, in modo da venir eseguito all'interno della finestra specificata.
.SH AIUTO ONLINE
Battere ":help" in
@@ -532,10 +546,11 @@ Battere ":help" in
per iniziare.
Battere ":help argomento" per ricevere aiuto su uno specifico argomento.
Per esempio: ":help ZZ" per ricevere aiuto sul comando "ZZ".
Usare <Tab> e CTRL\-D per completare gli argomenti (":help cmdline\-completion").
Usare <Tab> e CTRL\-D per completare gli argomenti
(":help cmdline\-completion").
Ci sono "tag" nei file di help per passare da un argomento a un altro
(simili a legami ipertestuali, vedere ":help").
Tutti i file di documentazione possono essere navigati così. Ad es.:
Tutti i file di documentazione possono essere navigati così. P.es.:
":help syntax.txt".
.SH FILE
.TP 15
@@ -546,11 +561,11 @@ I file di documentazione di
Usare ":help doc\-file\-list" per avere la lista completa.
.br
.I vim??
è il numero di versione corto, p.es., vim91 per indicare
.B Vim 9.1
è il numero di versione corto, p.es., vim92 per indicare
.B Vim 9.2
.TP
/usr/local/share/vim/vim??/doc/tags
Il file di tags usato per trovare informazioni nei file di documentazione.
Il file di tag usato per trovare informazioni nei file di documentazione.
.TP
/usr/local/share/vim/vim??/syntax/syntax.vim
Inizializzazioni sintattiche a livello di sistema.
@@ -586,18 +601,21 @@ Inizializzazioni del men
a livello di sistema.
.TP
/usr/local/share/vim/vim??/bugreport.vim
Script Vim per generare una segnalazione di errore. Vedere ":help bugs".
Script Vim per generare una segnalazione di errore.
Vedere ":help bugs".
.TP
/usr/local/share/vim/vim??/filetype.vim
Script Vim per determinare il tipo di un file dal suo nome. Vedere ":help 'filetype'".
Script Vim per determinare il tipo di un file dal suo nome.
Vedere ":help 'filetype'".
.TP
/usr/local/share/vim/vim??/scripts.vim
Script Vim per determinare il tipo di un file dal suo contenuto. Vedere ":help 'filetype'".
Script Vim per determinare il tipo di un file dal suo contenuto.
Vedere ":help 'filetype'".
.TP
/usr/local/share/vim/vim??/print/*.ps
File usati per stampa PostScript.
.PP
Per informazioni aggiornate [in inglese \- NdT] vedere la home page di Vim:
Per informazioni aggiornate [in inglese] vedere la home page di Vim:
.br
<URL:http://www.vim.org/>
.SH VEDERE ANCHE
@@ -614,12 +632,12 @@ Vedere ":help credits" in
Tony Andrews e G.R. (Fred) Walter.
In verità, poco o nulla è rimasto del loro codice originale.
.SH BUG
Probabilmente.
È probabile che ce ne siano.
Vedere ":help todo" per una lista di problemi noti.
.PP
Si noti che un certo numero di comportamenti che possono essere considerati errori
da qualcuno, sono in effetti causati da una riproduzione fin troppo fedele del
comportamento di Vi. Se si ritiene che altre cose siano errori "perché Vi si comporta
diversamente", si dia prima un'occhiata al file vi_diff.txt (o si immetta
:help vi_diff.txt da Vim).
Un'occhiata va data anche alle opzioni 'compatible' e 'cpoptions.
Si noti che un certo numero di comportamenti che possono essere visti come
errori, sono in effetti causati da una riproduzione fin troppo fedele del
comportamento di Vi. Se si ritiene che altre cose siano errori "perché Vi si
comporta diversamente", si dia prima un'occhiata al file vi_diff.txt
(o si immetta :help vi_diff.txt da Vim).
Un'occhiata va data anche alle opzioni 'compatible' e 'cpoptions'.

View File

@@ -36,8 +36,9 @@ Può essere usato per editare qualsiasi file di testo.
Particolarmente utile per editare programmi.
.PP
Ci sono parecchi miglioramenti rispetto a Vi: undo multipli, finestre e buffer
multipli, evidenziazione sintattica, possibilità di modificare la riga di comando,
completamento nomi file, help in linea, selezione testi in Modo Visual, etc..
multipli, evidenziazione sintattica, possibilità di modificare la riga di
comando, completamento nomi file, help online, selezione testi in Modo
Visual, etc.
Vedere ":help vi_diff.txt" per un sommario delle differenze fra
.B Vim
e Vi.
@@ -67,9 +68,10 @@ essere usata per scegliere uno o più file da modificare.
nome_file ..
Una lista di nomi di file.
Il primo di questi sarà il file corrente, e verrà letto nel buffer.
Il cursore sarà posizionato sulla prima linea del buffer.
Il cursore sarà posizionato sulla prima riga del buffer.
Si può arrivare agli altri file col comando ":next".
Per editare un file il cui nome inizia per "\-" premettete "\-\-" alla lista_file.
Per editare un file il cui nome inizia per "\-" premettete "\-\-" alla
lista_file.
.TP
\-
Il file da editare è letto dallo stdin.
@@ -77,7 +79,7 @@ I comandi sono letti da stderr, che dovrebbe essere un terminale [tty].
.TP
\-t {tag}
Il file da editare e la posizione iniziale del cursore dipendono da "tag",
una specie di "etichetta" a cui saltare.
una "etichetta" a cui saltare.
{tag} viene cercata nel file "tags", e il file a essa associato diventa
quello corrente, e il comando a essa associato viene eseguito.
Di solito si usa per programmi C, nel qual caso {tag} potrebbe essere un
@@ -87,7 +89,7 @@ e il cursore è posizionato all'inizio della funzione.
Vedere ":help tag\-commands".
.TP
\-q [file_errori]
Inizia in Modo QuickFix [correzione veloce].
Iniziare in Modo QuickFix [correzione veloce].
Il file [file_errori] è letto e il primo errore è visualizzato.
Se [file_errori] non è indicato, il suo nome è ottenuto dal valore
dell'opzione 'errorfile' (che, se non specificata, vale "AztecC.Err"
@@ -97,28 +99,28 @@ Vedere ":help quickfix".
.PP
.B Vim
si comporta in modo diverso se invocato con nomi differenti (il programma
eseguibile "soggiacente" può essere sempre lo stesso).
eseguibile "sottostante" può essere sempre lo stesso).
.TP 10
vim
Modo Normal, comportamento predefinito.
Iniziare in Modo Normal, comportamento predefinito.
.TP
ex
Inizia in Modo "Ex".
Iniziare in Modo "Ex".
Si può passare in Modo Normal col comando ":vi".
Si può invocare il Modo "Ex" anche con l'argomento "\-e".
.TP
view
Inizia in Modo Read-only (Sola Lettura). Non si possono modificare i file.
Iniziare in Modo Read-only (sola-lettura). Non si possono modificare i file.
Si può invocare il Modo Read-only anche con l'argomento "\-R".
.TP
gvim gview
La versione GUI [Graphical User Interface].
Apre una nuova finestra.
Usare la versione GUI [Graphical User Interface].
Viene aperta una nuova finestra.
Si può invocare il Modo GUI anche con l'argomento "\-g".
.TP
evim eview
La versione GUI in Modo Easy (semplificata).
Apre una nuova finestra.
Usare la versione GUI in Modo Easy (semplificato).
Viene aperta una nuova finestra.
Si può invocare il Modo Easy anche con l'argomento "\-y".
.TP
rvim rview rgvim rgview
@@ -128,21 +130,21 @@ della shell o sospendere
Si può chiedere la stessa cosa anche con l'argomento "\-Z".
.SH OPZIONI
Le opzioni possono essere in un ordine qualsiasi, prima o dopo i nomi di file.
Opzioni che non hanno un argomento si possono specificare dietro a un solo "\-".
Opzioni che non hanno un argomento si possono specificare insieme dietro a un
solo "\-".
.TP 12
+[numero]
Nel primo file il cursore sarà posizionato sulla linea "numero".
Se "numero" manca, il cursore sarà posizionato sull'ultima linea del file.
Nel primo file, posizionare il cursore sulla riga numero "numero".
Se "numero" manca, il cursore sarà posizionato sull'ultima riga del file.
.TP
+/{espressione}
Nel primo file il cursore sarà posizionato alla
prima occorrenza di {espressione}.
Nel primo file posizionare il cursore alla prima occorrenza di {espressione}.
Vedere ":help search\-pattern" per come specificare l'espressione.
.TP
+{comando}
.TP
\-c {comando}
{comando} sarà eseguito dopo che il primo file è stato letto.
Eseguire {comando} dopo che il primo file è stato letto.
{comando} è interpretato come un comando Ex.
Se il {comando} contiene spazi deve essere incluso fra doppi apici
(o altro delimitatore, a seconda della shell che si sta usando).
@@ -154,7 +156,7 @@ Note: Si possono avere fino a 10 comandi "+" o "\-c".
Se
.B Vim
è stato compilato con supporto ARABIC per editare file con orientamento
destra-sinistra e tastiera con mappatura araba, quest'opzione inizia
destra-sinistra e tastiera con mappatura araba, quest'opzione fa iniziare
.B Vim
in Modo Arabic, cioè impostando 'arabic'.
Altrimenti viene dato un messaggio di errore e
@@ -162,32 +164,32 @@ Altrimenti viene dato un messaggio di errore e
termina in modo anormale.
.TP
\-b
Modo Binary (binario).
Vengono impostate alcune opzioni che permettono di modificare un file
binario o un file che contiene un programma eseguibile.
Eseguire Vim in Modo Binary (binario).
Vengono impostate alcune opzioni che permettono di modificare un file binario
o un file che contiene un programma eseguibile.
.TP
\-C
Compatibile. Imposta l'opzione 'compatible'.
Compatibile. Impostare l'opzione 'compatible'.
In questo modo
.B Vim
ha quasi lo stesso comportamento di Vi, anche in presenza di un file .vimrc.
.TP
\-d
Inizia in Modo Diff [differenze].
Dovrebbero esserci come argomenti da due o otto nomi di file.
Iniziare in Modo Diff [differenze].
Dovrebbero esserci come argomenti da due fino a otto nomi di file.
.B Vim
aprirà tutti i file evidenziando le differenze fra gli stessi.
Funziona come vimdiff(1).
.TP
\-d {dispositivo}, \-dev {dispositivo}
Apre {dispositivo} per usarlo come terminale.
Aprire {dispositivo} per usarlo come terminale.
Solo per l'Amiga.
Esempio:
"\-d con:20/30/600/150".
.TP
\-D
Debugging. Vim si mette in Modo "debugging" a partire
dall'esecuzione del primo comando da uno script.
Debugging. Entrare in Modo "debugging" a partire dall'esecuzione del primo
comando di uno script.
.TP
\-e
Eseguire
@@ -202,15 +204,15 @@ in Modo Ex migliorato, come se il programma eseguito sia "exim".
\-f
Direttamente [Foreground]. Per la versione GUI,
.B Vim
non crea [fork] una nuova finestra, indipendente dalla shell di invocazione.
Per l'Amiga,
non creare [fork] una nuova finestra, indipendente dalla shell di invocazione.
Per l'Amiga, non fa ripartire
.B Vim
non è fatto ripartire per aprire una nuova finestra.
per aprire una nuova finestra.
Opzione da usare quando
.B Vim
è eseguito da un programma che attende la fine della
sessione di edit (p.es., mail).
Sull'Amiga i comandi ":sh" e ":!" non sono disponibili.
è eseguito da un programma che attende la fine della sessione di edit (p.es.,
mail).
In ambiente Amiga, i comandi ":sh" e ":!" non sono disponibili.
.TP
\-F
Se
@@ -229,7 +231,8 @@ Nota: Il supporto Farsi è stato rimosso a partire dalla patch 8.1.0932.
Se
.B Vim
è stato compilato con supporto GUI, quest'opzione chiede di usarla.
Se Vim è stato compilato senza supporto GUI viene dato un messaggio di errore e
Se Vim è stato compilato senza supporto GUI viene dato un messaggio di
errore e
.B Vim
termina in modo anormale.
.TP
@@ -246,145 +249,148 @@ termina in modo anormale.
.TP
\-i {viminfo}
Se è abilitato l'uso di un file viminfo, quest'opzione indica il nome
del file da usare invece di quello predefinito "~/.viminfo".
del file da usare invece del file predefinito "~/.viminfo".
Si può anche evitare l'uso di un file .viminfo, dando come nome
"NONE".
.TP
\-l
Modo Lisp.
Imposta le opzioni 'lisp' e 'showmatch'.
Eseguire Vim in Modo Lisp.
Vengono impostate le opzioni 'lisp' e 'showmatch'.
.TP
\-L
Equivalente a \-r.
.TP
\-m
Inibisce modifica file.
Inibisce l'opzione 'write'.
Inibire modifica file.
Viene inibita l'opzione 'write'.
È ancora possibile modificare un buffer, ma non riscriverlo.
.TP
\-M
Modifiche non permesse. Le opzioni 'modifiable' e 'write' sono annullate,
in modo da impedire sia modifiche che riscritture. Da notare che queste
opzioni possono essere abilitate in seguito, permettendo così modifiche.
in modo da impedire sia modifiche che riscritture. Si noti che queste opzioni
possono essere cambiate in seguito, per consentire modifiche.
.TP
\-n
Inibisce l'uso di un file di swap.
Il recupero dopo una caduta di macchina sarà impossibile.
Inibire l'uso di un file di swap.
Ripristinare il file in caso di fine anormale sarà impossibile.
Utile per editare un file su un supporto molto lento (p.es., floppy).
Il comando ":set uc=0" ha lo stesso effetto.
Per abilitare il recupero usare ":set uc=200".
Per abilitare il ripristino usare ":set uc=200".
.TP
\-N
Modo "Non-compatibile". Annulla l'opzione 'compatible'.
Eseguire Vim in Modo "Non-compatibile". Annulla l'opzione 'compatible'.
Così
.B Vim
si comporta un po' meglio, ma è meno compatibile con Vi, anche in assenza di un
file .vimrc.
si comporta un po' meglio, ma è meno compatibile con Vi, anche in assenza di
un file .vimrc.
.TP
\-nb
Diviene un Editor server per NetBeans. Vedere la documentazione per dettagli.
Fare di Vim un Editor server per NetBeans. Vedere la documentazione per
dettagli.
.TP
\-o[N]
Apre N finestre in orizzontale.
Se N manca, apre una finestra per ciascun file.
Aprire N finestre in orizzontale.
Se N manca, aprire una finestra per ciascun file.
.TP
\-O[N]
Apre N finestre, in verticale.
Se N manca, apre una finestra per ciascun file.
Aprire N finestre, in verticale.
Se N manca, aprire una finestra per ciascun file.
.TP
\-p[N]
Apre N pagine di linguette.
Quando N è omesso, apre una pagine di linguette per ciascun file.
Aprire N pagine di schede.
Quando N è omesso, aprire una pagine di schede per ciascun file.
.TP
\-P {titolo-padre}
Solo per GUI Win32: Specifica il titolo dell'applicazione-padre. Se possibile,
Vim viene eseguito in una finestra MDI (Multiple-Document Interface).
{titolo-padre} deve apparire nel titolo della applicazione-padre. Accertatevi
Solo per GUI Win32: Specificare il titolo dell'applicazione-padre. Se
possibile, Vim viene eseguito in una finestra MDI
(Multiple-Document Interface).
{titolo-padre} deve apparire nel titolo dell'applicazione-padre. Accertarsi
che sia sufficientemente esplicativo. Notare che l'implementazione è ancora
rudimentale. Non funziona per tutte le applicazioni, e il menù non funziona.
.TP
\-r
Lista file di swap, e informazioni su come usarli per ripristinare file.
Listare file di swap, con informazioni su come usarli per ripristinare file.
.TP
\-r {file}
Modo Recovery (ripristino).
Eseguire Vim in Modo Recovery (ripristino).
Il file di swap è usato per recuperare una sessione di edit finita male.
Il file di swap è un file con lo stesso nome file del file di testo
editato, col suffisso ".swp".
Il file di swap è un file con lo stesso nome file del file di testo editato,
col prefisso "." e col suffisso ".swp".
Vedere ":help recovery".
.TP
\-R
Modo Read-only (Sola Lettura).
Imposta l'opzione 'readonly'.
Si può ancora modificare il buffer, ma il file è protetto da una riscrittura
involontaria.
Se si vuole davvero riscrivere il file, occorre aggiungere un punto esclamativo
al comando Ex, come in ":w!".
Eseguire Vim in Modo Read-only (Sola Lettura).
Viene impostata l'opzione 'readonly'.
È ancora possibile modificare il buffer, ma il file è protetto da una
riscrittura involontaria.
Se si vuole davvero riscrivere il file, occorre aggiungere un punto
esclamativo al comando Ex, come in ":w!".
L'opzione \-R implica anche l'opzione \-n (vedere sopra).
L'opzione 'readonly' può essere annullata con ":set noro".
Vedere ":help 'readonly'".
.TP
\-s
Modo silenzioso. Solo quando invocato come "Ex" o quando l'opzione
"\-e" è stata data prima dell'opzione "\-s".
Eseguire Vim in Modo silenzioso. Solo quando invocato come "Ex" o quando
l'opzione "\-e" è stata specificata prima dell'opzione "\-s".
.TP
\-s {script_in_input}
Lo script file {script_in_input} è letto.
Eseguire lo script file {script_in_input}.
I caratteri nel file sono interpretati come se immessi da terminale.
Lo stesso risultato si può ottenere col comando ":source! {script_in_input}".
Se la fine del file di input viene raggiunta prima che Vim termini,
l'ulteriore input verrà preso dalla tastiera.
.TP
\-S {file}
I comandi contenuti in {file} sono eseguiti dopo la lettura del primo file.
Eseguire i comandi contenuti in {file} dopo la lettura del primo file.
Equivalente a \-c "source {file}".
{file} non può avere un nome che inizia per '\-'.
Se {file} è omesso si usa "Session.vim" (funziona solo se \-S è l'ultimo
argomento specificato).
.TP
\-T {terminale}
Dice a
Specificare a
.B Vim
quale tipo di terminale state usando.
il tipo di terminale che si sta usando.
Utile solo se il terminale non viene riconosciuto correttamente da Vim.
Dovrebbe essere un terminale noto a
.B Vim
(predefinito) o definito nei file termcap o terminfo.
.TP
\-u {vimrc}
Usa i comandi nel file {vimrc} per inizializzazioni.
Usare i comandi nel file {vimrc} per inizializzazioni.
Tutte le altre inizializzazioni non sono eseguite.
Usare quest'opzione per editare qualche file di tipo speciale.
Si possono anche omettere tutte le inizializzazioni dando come nome "NONE".
Vedere ":help initialization" da vim per ulteriori dettagli.
.TP
\-U {gvimrc}
Usa i comandi nel file {gvimrc} per inizializzazioni GUI.
Usare i comandi nel file {gvimrc} per inizializzare la GUI.
Tutte le altre inizializzazioni GUI non sono eseguite.
Si possono anche omettere tutte le inizializzazioni GUI dando come nome "NONE".
Si possono anche omettere tutte le inizializzazioni GUI dando come nome
"NONE".
Vedere ":help gui\-init" da vim per ulteriori dettagli.
.TP
\-v
Inizia
Iniziare
.B Vim
in Modo Vi, come se il programma eseguibile fosse "vi". Questo ha
effetto solo quando Vim viene invocato con il nome "ex".
.TP
\-V[N]
Verboso. Vim manda messaggi relativi ai file di script che esegue
e quando legge o scrive un file viminfo. Il numero opzionale N è il valore
dell'opzione 'verbose'. Il valore predefinito è 10.
Verboso. Fare inviare a Vim messaggi relativi ai file di script eseguiti
e alla lettura/scrittura di un file viminfo. Il numero opzionale N è il
valore dell'opzione 'verbose'. Il valore predefinito è 10.
.TP
\-V[N]{nome_file}
Come \-V imposta 'verbosefile' a {nome_file}. Il risultato è che i messaggi
non sono visualizzati, ma scritti sul file {nome_file}. Il {nome_file} non
deve iniziare con un numero.
Come \-V, e si imposta 'verbosefile' a {nome_file}. Il risultato è che i
messaggi non sono visualizzati, ma scritti sul file {nome_file}. Il
{nome_file} non deve iniziare con un numero.
.TP
\-w{numero}
Imposta l'opzione 'window' a {numero}.
Impostare l'opzione 'window' a {numero}.
.TP
\-w {script_file}
Ogni carattere immesso viene registrato nel file {script_file},
Registrare ogni carattere immesso nel file {script_file},
finché non si esce da
.B Vim.
Utile se si vuole creare uno script file da usare con "vim \-s" o
@@ -402,7 +408,7 @@ nella scrittura dei file. Verrà chiesta una chiave di cifratura.
.TP
\-X
Non connettersi al server X. Vim parte più rapidamente,
ma il titolo della finestra e la clipboard non sono usati.
ma il titolo della finestra e gli appunti non sono disponibili.
.TP
\-Y
Non connettersi al compositore Wayland.
@@ -410,17 +416,19 @@ Non connettersi al compositore Wayland.
\-y
Eseguire
.B Vim
in Modo Easy (semplificato), come se l'eseguibile invocato sia "evim" o "eview".
in Modo Easy (semplificato), come se l'eseguibile invocato sia "evim" o
"eview".
Fa sì che
.B Vim
si comporti come un editor che usa solo il mouse e i caratteri.
.TP
\-Z
Modo ristretto. Vim si comporta come se invocato con un nome che inizia per "r".
Eseguire Vim in Modo ristretto. Vim si comporta come se invocato con un nome
che inizia per "r".
.TP
\-\-
Specifica la fine delle opzioni.
Argomenti specificati dopo questo sono considerati nomi file.
In questo modo si specifica la fine delle opzioni.
Argomenti aggiunti dopo questo sono considerati nomi file.
Si può usare per editare un file il cui nome inizi per '-'.
.TP
\-\-clean
@@ -428,40 +436,43 @@ Richiede di non usare alcun file di personalizzazione (vimrc, plugin, etc.).
Utile per verificare se un problema persiste invocando Vim "originale".
.TP
\-\-cmd {comando}
Come "\-c", ma il comando è eseguito subito PRIMA
di eseguire qualsiasi file vimrc.
Si possono usare fino a 10 di questi comandi, indipendentemente dai comandi "\-c".
Come "\-c", ma eseguire il comando subito PRIMA di eseguire qualsiasi file
vimrc.
Si possono usare fino a 10 di questi comandi, indipendentemente dai comandi
"\-c".
.TP
\-\-echo\-wid
Solo per GUI GTK: Visualizza ID di Window su stdout.
Solo per GUI GTK: Visualizzare ID di Window su stdout.
.TP
\-\-gui-dialog-file {nome}
Quando si usa la GUI, invece di visualizzare un dialogo, il titolo e il
messaggio del dialogo sono scritti sul file {nome}. Il file viene creato o,
se già esistente, viene esteso. Quest'opzione serve solo in fase di test,
per evitare di restare bloccati da un dialogo che non si riesce a visualizzare.
per evitare di restare bloccati da un dialogo che non si riesce a
visualizzare.
Se si sta lavorando senza la GUI l'argomento viene ignorato.
.TP
\-\-help, \-h, \-?
Un po' di aiuto su opzioni e argomenti che si possono dare invocando Vim.
Visualizzare opzioni e argomenti che si possono specificare invocando Vim.
Subito dopo
.B Vim
esce.
.TP
\-\-literal
Considera i nomi passati come argomenti letterali, senza espandere metacaratteri.
Considerare i nomi passati come argomenti letterali, senza espandere
metacaratteri.
Non ha effetto in Unix, dove la shell espande comunque i metacaratteri.
.TP
\-\-log {nome_file}
Se
.B Vim
è stato compilato con le funzionalità eval e channel, inizia a registrare
e scrive le registrazioni a {nome_file}. Ciò equivale a chiamare
è stato compilato con le funzionalità eval e channel, iniziare a registrare
e scrivere le registrazioni a {nome_file}. Ciò equivale a chiamare
.I ch_logfile({nome_file}, 'ao')
in una fase molto iniziale dell'avvio del programma.
.TP
\-\-nofork
Direttamente [Foreground]. Per la versione GUI,
Eseguire Vim irettamente [Foreground]. Per la versione GUI,
.B Vim
non crea [fork] una nuova finestra, indipendente dalla shell di invocazione.
.TP
@@ -471,17 +482,19 @@ Non caricare plugin. Implicito se si specifica \-u NONE.
\-\-not\-a\-term
Da usare per specificare a
.B Vim
che l'utente è consapevole che l'input e l'output non avvengono con un terminale
vero e proprio. Ciò serve per evitare il messaggio di avvertimento e il ritardo
di due secondi che avverrebbero in assenza di questo argomento.
che l'utente è consapevole che l'input e l'output non avvengono con un
terminale vero e proprio. Ciò serve per evitare il messaggio di avvertimento
e il ritardo di due secondi, ossia il comportamento previsto in assenza di
questo argomento.
.TP
\-\-remote
Connettersi a un server Vim e chiedere di editare i file elencati come altri
argomenti. Se non si trova un server viene dato un messaggio e i file sono
editati nel Vim corrente.
Connettersi a un server Vim a cui chiedere di editare i file elencati come
altri argomenti. Se non si trova un server viene dato un messaggio e i file
sono editati nel Vim corrente.
.TP
\-\-remote\-expr {expr}
Connettersi a un server Vim, valutare {expr} e stampare il risultato su stdout.
\-\-remote\-expr {espressione}
Connettersi a un server Vim, valutare {espressione} e stampare il risultato su
stdout.
.TP
\-\-remote\-send {chiavi}
Connettersi a un server Vim e spedirgli {chiavi}.
@@ -490,16 +503,16 @@ Connettersi a un server Vim e spedirgli {chiavi}.
Come \-\-remote, ma senza avvisare se non si trova un server.
.TP
\-\-remote-wait
Come \-\-remote, ma Vim non termina finché i file non sono stati editati.
Come \-\-remote, ma non terminare Vim finché i file non sono stati editati.
.TP
\-\-remote\-wait\-silent
Come \-\-remote\-wait, ma senza avvisare se non si trova un server.
.TP
\-\-serverlist
Elenca i nomi di tutti i server Vim disponibili.
Elencare i nomi di tutti i server Vim disponibili.
.TP
\-\-servername {nome}
Usa {nome} come nome del server usato per il Vim corrente, a meno che sia
Usare {nome} come nome del server usato per il Vim corrente, a meno che sia
usato con l'argomento \-\-remote, nel qual caso indica il server a cui
connettersi.
Quando si sta usando il server a socket [socketserver backend], se il nome
@@ -512,19 +525,20 @@ rispettivamente, o "socket" o "x11". Disponibile solo se Vim è stato
compilato con le due funzionalità socketserver e X11.
.TP
\-\-socketid {id}
Solo per GUI GTK: Usa meccanismo GtkPlug per eseguire gVim in un'altra finestra.
Solo per GUI GTK: Usare meccanismo GtkPlug per eseguire gVim in un'altra
finestra.
.TP
\-\-startuptime {nome_file}
Durante la fase iniziale, scrive messaggi di log al file {nome_file}.
Durante la fase iniziale, scrivere messaggi di log al file {nome_file}.
.TP
\-\-ttyfail
Quando stdin o stdout non sono un terminale (tty) esce subito da Vim.
Quando stdin o stdout non sono un terminale (tty) uscire subito da Vim.
.TP
\-\-version
Stampa la versione di Vim ed esce.
Stampare la versione di Vim e uscire.
.TP
\-\-windowid {id}
Solo per GUI Win32: Chiede a gVim di provare a user l'ID di window {id}
Solo per GUI Win32: Chiedere a gVim di provare a user l'ID di window {id}
come padre, in modo da venir eseguito all'interno della finestra specificata.
.SH AIUTO ONLINE
Battere ":help" in
@@ -532,10 +546,11 @@ Battere ":help" in
per iniziare.
Battere ":help argomento" per ricevere aiuto su uno specifico argomento.
Per esempio: ":help ZZ" per ricevere aiuto sul comando "ZZ".
Usare <Tab> e CTRL\-D per completare gli argomenti (":help cmdline\-completion").
Usare <Tab> e CTRL\-D per completare gli argomenti
(":help cmdline\-completion").
Ci sono "tag" nei file di help per passare da un argomento a un altro
(simili a legami ipertestuali, vedere ":help").
Tutti i file di documentazione possono essere navigati così. Ad es.:
Tutti i file di documentazione possono essere navigati così. P.es.:
":help syntax.txt".
.SH FILE
.TP 15
@@ -546,11 +561,11 @@ I file di documentazione di
Usare ":help doc\-file\-list" per avere la lista completa.
.br
.I vim??
è il numero di versione corto, p.es., vim91 per indicare
.B Vim 9.1
è il numero di versione corto, p.es., vim92 per indicare
.B Vim 9.2
.TP
/usr/local/share/vim/vim??/doc/tags
Il file di tags usato per trovare informazioni nei file di documentazione.
Il file di tag usato per trovare informazioni nei file di documentazione.
.TP
/usr/local/share/vim/vim??/syntax/syntax.vim
Inizializzazioni sintattiche a livello di sistema.
@@ -586,18 +601,21 @@ Inizializzazioni del menù
a livello di sistema.
.TP
/usr/local/share/vim/vim??/bugreport.vim
Script Vim per generare una segnalazione di errore. Vedere ":help bugs".
Script Vim per generare una segnalazione di errore.
Vedere ":help bugs".
.TP
/usr/local/share/vim/vim??/filetype.vim
Script Vim per determinare il tipo di un file dal suo nome. Vedere ":help 'filetype'".
Script Vim per determinare il tipo di un file dal suo nome.
Vedere ":help 'filetype'".
.TP
/usr/local/share/vim/vim??/scripts.vim
Script Vim per determinare il tipo di un file dal suo contenuto. Vedere ":help 'filetype'".
Script Vim per determinare il tipo di un file dal suo contenuto.
Vedere ":help 'filetype'".
.TP
/usr/local/share/vim/vim??/print/*.ps
File usati per stampa PostScript.
.PP
Per informazioni aggiornate [in inglese \- NdT] vedere la home page di Vim:
Per informazioni aggiornate [in inglese] vedere la home page di Vim:
.br
<URL:http://www.vim.org/>
.SH VEDERE ANCHE
@@ -614,12 +632,12 @@ Vedere ":help credits" in
Tony Andrews e G.R. (Fred) Walter.
In verità, poco o nulla è rimasto del loro codice originale.
.SH BUG
Probabilmente.
È probabile che ce ne siano.
Vedere ":help todo" per una lista di problemi noti.
.PP
Si noti che un certo numero di comportamenti che possono essere considerati errori
da qualcuno, sono in effetti causati da una riproduzione fin troppo fedele del
comportamento di Vi. Se si ritiene che altre cose siano errori "perché Vi si comporta
diversamente", si dia prima un'occhiata al file vi_diff.txt (o si immetta
:help vi_diff.txt da Vim).
Un'occhiata va data anche alle opzioni 'compatible' e 'cpoptions.
Si noti che un certo numero di comportamenti che possono essere visti come
errori, sono in effetti causati da una riproduzione fin troppo fedele del
comportamento di Vi. Se si ritiene che altre cose siano errori "perché Vi si
comporta diversamente", si dia prima un'occhiata al file vi_diff.txt
(o si immetta :help vi_diff.txt da Vim).
Un'occhiata va data anche alle opzioni 'compatible' e 'cpoptions'.

View File

@@ -515,7 +515,7 @@ GTK GUI only: Use the GtkPlug mechanism to run gVim in another window.
During startup write timing messages to the file {fname}.
.TP
\-\-ttyfail
When stdin or stdout is not a a terminal (tty) then exit right away.
When stdin or stdout is not a terminal (tty) then exit right away.
.TP
\-\-version
Print version information and exit.

View File

@@ -396,7 +396,7 @@ OPTIONS
--startuptime {file}
During startup write timing messages to the file {fname}.
--ttyfail When stdin or stdout is not a a terminal (tty) then exit
--ttyfail When stdin or stdout is not a terminal (tty) then exit
right away.
--version Print version information and exit.

View File

@@ -1,4 +1,4 @@
*vim9.txt* For Vim version 9.2. Last change: 2026 Feb 14
*vim9.txt* For Vim version 9.2. Last change: 2026 May 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2355,11 +2355,6 @@ in Vim9 script.
let &laststatus=v:true
vim9cmd &laststatus = true
<
- Not using a string where an argument requires a string (|E1174|) >vim
echo substitute('Hallo', 'a', 'e', v:true)
vim9cmd echo substitute('Hallo', 'a', 'e', true) # E1174: String...
<
One consequence is that the item type of a list or dict given to |map()| must
not change when its type is either declared or inferred. For example, this

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

@@ -1,4 +1,4 @@
*windows.txt* For Vim version 9.2. Last change: 2026 Mar 01
*windows.txt* For Vim version 9.2. Last change: 2026 May 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -960,6 +960,9 @@ settings. The option is a comma-separated list of values:
the value is "on", it must be set after border.
height maximum height of the popup
highlight highlight group of the popup (default is Pmenu)
opacity opacity percentage 0-100 (default 100, fully opaque).
When less than 100, content beneath the popup shows
through.
resize show resize handle: "on" (default) or "off"
shadow "off" (default) or "on" using |hl-PmenuShadow|
width maximum width of the popup
@@ -968,6 +971,7 @@ Example: >
:set previewpopup=height:10,width:60
:set previewpopup=border:single,borderhilight:PmenuBorder
:set previewpopup=border:custom:─;│;─;│;┌;┐;┘;└
:set previewpopup=border:round,opacity:80
A few peculiarities:
- If the file is in a buffer already, it will be re-used. This will allow for

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 Apr 08
" 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),
@@ -1617,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

@@ -2,6 +2,8 @@
" Language: Cucumber
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2016 Aug 29
" 2026 May 26 by Vim Project: prevent Code Injection
" https://github.com/vim/vim/security/advisories/GHSA-4473-94jm-w5x9
" Only do this when not done yet for this buffer
if (exists("b:did_ftplugin"))
@@ -96,7 +98,8 @@ function! s:stepmatch(receiver,target)
catch
endtry
if has("ruby") && pattern !~ '\\\@<!#{'
ruby VIM.command("return #{if (begin; Kernel.eval('/'+VIM.evaluate('pattern')+'/'); rescue SyntaxError; end) === VIM.evaluate('a:target') then 1 else 0 end}")
" Use Regexp.new, so the pattern stays untrusted data and cannot inject Ruby
ruby VIM.command("return #{if (begin; Regexp.new(VIM.evaluate('pattern')); rescue RegexpError; end) === VIM.evaluate('a:target') then 1 else 0 end}")
else
return 0
endif

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

@@ -2,6 +2,7 @@
" Language: Justfile
" Maintainer: Peter Benjamin <@pbnj>
" Last Change: 2025 Jan 19
" 2026 May 17 by Vim Project: add 'suffixesadd' #20197
" Credits: The original author, Noah Bogart <https://github.com/NoahTheDuke/vim-just/>
" Only do this when not done yet for this buffer
@@ -13,5 +14,6 @@ let b:did_ftplugin = 1
setlocal iskeyword+=-
setlocal comments=n:#
setlocal commentstring=#\ %s
setlocal suffixesadd=.just
let b:undo_ftplugin = "setlocal iskeyword< comments< commentstring<"
let b:undo_ftplugin = "setlocal iskeyword< comments< commentstring< suffixesadd<"

View File

@@ -1,7 +1,8 @@
" Vim filetype plugin file
" Language: Nvidia PTX (Parellel Thread Execution)
" Language: Nvidia PTX (Parallel Thread Execution)
" Maintainer: Yinzuo Jiang <jiangyinzuo@foxmail.com>
" Last Change: 2024-12-05
" 2026 May 04 by Vim Project: fix typo
if exists("b:did_ftplugin")
finish

View File

@@ -4,6 +4,7 @@
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Last Change: 2024 Sep 19 (simplify keywordprg #15696)
" 2024 Jul 22 by Vim project (use :hor term #17822)
" 2026 May 04 by Vim Project: fix typo
if exists("b:did_ftplugin")
finish
@@ -26,7 +27,7 @@ if exists("loaded_matchit") && !exists("b:match_words")
endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "Readline Intialization Files (inputrc, .inputrc)\tinputrc;*.inputrc\n"
let b:browsefilter = "Readline Initialization Files (inputrc, .inputrc)\tinputrc;*.inputrc\n"
if has("win32")
let b:browsefilter ..= "All Files (*.*)\t*\n"
else

View File

@@ -2,6 +2,7 @@
" Maintainer: Raul Segura Acevedo <raulseguraaceved@netscape.net> (Invalid email address)
" Doug Kearns <dougkearns@gmail.com>
" Last Change: 2022 Apr 06
" 2026 May 04 by Vim Project: fix typo
if exists("b:did_indent")
"finish
@@ -71,7 +72,7 @@ fun! CdlGetIndent(lnum)
" One 'closing' element at the beginning of the line has already reduced the
" indent, but 'else', 'elseif' & 'then' increment it for the next line.
" '=' at the beginning already has the right indent (increased for
" asignments).
" assignments).
let f = -1
let inicio = matchend(line, '^\c\s*\(else\a*\|then\|endif\|/[*/]\|[);={]\)')
if inicio > 0

View File

@@ -1,2 +1,2 @@
" Placeholder for backwards compatilibity: .jsx used to stand for JavaScript.
" Placeholder for backwards compatibility: .jsx used to stand for JavaScript.
runtime! indent/javascript.vim

View File

@@ -4,8 +4,9 @@
" Last Change: 2023-09-11
" 2024 Jul 04 by Vim Project: use shiftwidth() instead of hard-coding shifted values #15138
" 2025 Dec 29 by Vim Project: clean up
" 2025 Dec 31 by Vim Project: correcly indent after nested array literal #19042
" 2025 Dec 31 by Vim Project: correctly indent after nested array literal #19042
" 2026 Jan 28 by Vim Project: fix indentation when a string literal contains 'if' #19265
" 2026 May 04 by Vim Project: fix typo
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
" Note: upstream seems umaintained: https://github.com/rust-lang/rust.vim/issues/502

View File

@@ -3,10 +3,11 @@
" Maintainer: Christian Brabandt <cb@256bit.org>
" Original Author: Nikolai Weibull <now@bitwi.se>
" Previous Maintainer: Peter Aronoff <telemachus@arpinum.org>
" Latest Revision: 2019-10-24
" Latest Revision: 20260504
" License: Vim (see :h license)
" Repository: https://github.com/chrisbra/vim-sh-indent
" Changelog:
" 20260504 - fix typo
" 20250906 - indent function closing properly on multiline commands
" 20250318 - Detect local arrays in functions
" 20241411 - Detect dash character in function keyword for
@@ -233,7 +234,7 @@ function! s:is_array(line)
endfunction
function! s:is_in_block(line)
" checks whether a:line is whithin a
" checks whether a:line is within a
" block e.g. a shell function
" foo() {
" ..

View File

@@ -2,6 +2,7 @@
" Language: Stylus
" Maintainer: Marc Harter
" Last Change: 2010 May 21
" 2026 May 04 by Vim Project: fix typo
" Based On: sass.vim from Tim Pope
"
if exists("b:did_indent")
@@ -97,7 +98,7 @@ function! GetStylusIndent()
let line = substitute(getline(lnum),'[\s()]\+$','','') " get last line strip ending whitespace
let cline = substitute(substitute(getline(v:lnum),'\s\+$','',''),'^\s\+','','') " get current line, trimmed
let lastcol = strlen(line) " get last col in prev line
let line = substitute(line,'^\s\+','','') " then remove preceeding whitespace
let line = substitute(line,'^\s\+','','') " then remove preceding whitespace
let indent = indent(lnum) " get indent on prev line
let cindent = indent(v:lnum) " get indent on current line
let increase = indent + &sw " increase indent by the shift width

View File

@@ -1,2 +1,2 @@
" Placeholder for backwards compatilibity: .tsx used to stand for TypeScript.
" Placeholder for backwards compatibility: .tsx used to stand for TypeScript.
runtime! indent/typescript.vim

View File

@@ -1,7 +1,7 @@
" These commands create the option window.
"
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2026 Apr 07
" Last Change: 2026 May 17
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" If there already is an option window, jump to that one.
@@ -315,6 +315,8 @@ call append("$", "\t" .. s:global_or_local)
call <SID>OptionG("tc", &tc)
call <SID>AddOption("tagrelative", gettext("file names in a tags file are relative to the tags file"))
call <SID>BinOptionG("tr", &tr)
call <SID>AddOption("tagsecure", gettext("a :tag command cannot access remote files"))
call <SID>BinOptionG("tsc", &tsc)
call <SID>AddOption("tagstack", gettext("a :tag command will use the tagstack"))
call <SID>BinOptionG("tgst", &tgst)
call <SID>AddOption("showfulltag", gettext("when completing tags in Insert mode show more info"))
@@ -351,6 +353,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")
@@ -833,10 +837,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)
@@ -1108,6 +1108,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 May 11
def HighlightedYank()
@@ -28,12 +28,42 @@ 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
export def HighlightedPut()
if !get(g:, "hlput_enable", false)
return
endif
var hlgroup = get(g:, "hlput_hlgroup", "IncSearch")
var duration = min([get(g:, "hlput_duration", 300), 3000])
var [beg, end] = [getpos("'["), getpos("']")]
var type = v:event.regtype ?? 'v'
var pos = getregionpos(beg, end, {type: type, exclusive: false})
var m = matchaddpos(hlgroup, pos->mapnew((_, v) => {
var col_beg = v[0][2] + v[0][3]
var col_end = v[1][2] + v[1][3] + 1
return [v[0][1], col_beg, col_end - col_beg]
}))
var winid = win_getid()
timer_start(duration, (_) => {
if winbufnr(winid) != -1
m->matchdelete(winid)
endif
})
enddef
augroup hlyank
autocmd!
autocmd TextYankPost * HighlightedYank()
autocmd TextPutPost * HighlightedPut()
augroup END
# vim:sts=2:sw=2:et:

View File

@@ -1,29 +1,7 @@
" Creator: Charles E Campbell
" Previous Maintainer: Luca Saccarola <github.e41mv@aleeas.com>
" Maintainer: This runtime file is looking for a new maintainer.
" Last Change:
" 2025 Aug 07 by Vim Project (use correct "=~#" for netrw_stylesize option #17901)
" 2025 Aug 07 by Vim Project (netrw#BrowseX() distinguishes remote files #17794)
" 2025 Aug 22 by Vim Project netrw#Explore handle terminal correctly #18069
" 2025 Sep 05 by Vim Project ensure netrw#fs#Dirname() returns trailing slash #18199
" 2025 Sep 11 by Vim Project only keep cursor position in tree mode #18275
" 2025 Sep 17 by Vim Project tighten the regex to handle remote compressed archives #18318
" 2025 Sep 18 by Vim Project 'equalalways' not always respected #18358
" 2025 Oct 01 by Vim Project fix navigate to parent folder #18464
" 2025 Oct 26 by Vim Project fix parsing of remote user names #18611
" 2025 Oct 27 by Vim Project align comment after #18611
" 2025 Nov 01 by Vim Project fix NetrwChgPerm #18674
" 2025 Nov 13 by Vim Project don't wipe unnamed buffers #18740
" 2025 Nov 18 by Vim Project use UNC paths when using scp and Windows paths #18764
" 2025 Nov 28 by Vim Project fix undefined variable in *NetrwMenu #18829
" 2025 Dec 26 by Vim Project fix use of g:netrw_cygwin #19015
" 2026 Jan 19 by Vim Project do not create swapfiles #18854
" 2026 Feb 15 by Vim Project fix global variable initialization for MS-Windows #19287
" 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
" Last Change: 2026 May 17
" 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
@@ -398,7 +376,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= "│ "
@@ -529,8 +506,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 !~ '/$'
@@ -1819,14 +1796,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
@@ -2958,7 +2935,7 @@ function s:NetrwBookHistSave()
while ( first || cnt != g:netrw_dirhistcnt )
let lastline= lastline + 1
if exists("g:netrw_dirhist_{cnt}")
call setline(lastline,'let g:netrw_dirhist_'.cnt."='".g:netrw_dirhist_{cnt}."'")
call setline(lastline,'let g:netrw_dirhist_'.cnt.'='.string(g:netrw_dirhist_{cnt}))
endif
let first = 0
let cnt = ( cnt - 1 ) % g:netrw_dirhistmax
@@ -4833,6 +4810,12 @@ endfunction
" s:NetrwMaps: {{{2
function s:NetrwMaps(islocal)
" remove B flag from 'cpo' so that \<CR>, \<Bar>, etc. inside
" interpolated path names play back as literal text rather than
" the actual key — without this, a crafted directory name can
" inject keystrokes into the cmdline the mapping is typing
let _cpo = &cpo
set cpo-=B
" mouse <Plug> maps: {{{3
if g:netrw_mousemaps && g:netrw_retmap
@@ -5077,6 +5060,7 @@ function s:NetrwMaps(islocal)
" support user-specified maps
call netrw#UserMaps(0)
endif " }}}3
let &cpo = _cpo
endfunction
" s:NetrwCommands: set up commands {{{2
@@ -5176,7 +5160,7 @@ function s:NetrwMarkFile(islocal,fname)
else
" remove filename from buffer's markfilelist
call filter(s:netrwmarkfilelist_{curbufnr},'v:val != a:fname')
call filter(s:netrwmarkfilelist_{curbufnr}, {_, v -> v !=# a:fname})
if s:netrwmarkfilelist_{curbufnr} == []
" local markfilelist is empty; remove it entirely
call s:NetrwUnmarkList(curbufnr,curdir)
@@ -5197,7 +5181,6 @@ function s:NetrwMarkFile(islocal,fname)
else
" initialize new markfilelist
let s:netrwmarkfilelist_{curbufnr}= []
call add(s:netrwmarkfilelist_{curbufnr},substitute(a:fname,'[|@]$','',''))
@@ -5217,7 +5200,7 @@ function s:NetrwMarkFile(islocal,fname)
call add(s:netrwmarkfilelist,netrw#fs#ComposePath(b:netrw_curdir,a:fname))
else
" remove new filename from global markfilelist
call filter(s:netrwmarkfilelist,'v:val != "'.dname.'"')
call filter(s:netrwmarkfilelist, {_, v -> v !=# dname})
if s:netrwmarkfilelist == []
unlet s:netrwmarkfilelist
endif
@@ -5304,6 +5287,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
@@ -5638,6 +5623,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))
@@ -6341,7 +6328,7 @@ function s:NetrwUnMarkFile(islocal)
endif
let ibuf= 1
while ibuf < bufnr("$")
while ibuf <= bufnr("$")
if exists("s:netrwmarkfilelist_".ibuf)
unlet s:netrwmarkfilelist_{ibuf}
unlet s:netrwmarkfilemtch_{ibuf}
@@ -7236,7 +7223,7 @@ function s:NetrwTreeDisplay(dir,depth)
" hide given patterns
let listhide= split(g:netrw_list_hide,',')
for pat in listhide
call filter(w:netrw_treedict[dir],'v:val !~ "'.escape(pat,'\\').'"')
call filter(w:netrw_treedict[dir], {_, v -> v !~# pat})
endfor
elseif g:netrw_hide == 2
@@ -8959,14 +8946,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
@@ -8995,22 +8985,30 @@ function s:MakeSshCmd(sshcmd)
return sshcmd
endfunction
" s:MakeBookmark: enters a bookmark into Netrw's bookmark system {{{2
" s:MakeBookmark: enters a bookmark into Netrw's bookmark system {{{2
" Note that bookmark paths should always be absolute.
function s:MakeBookmark(fname)
if !exists("g:netrw_bookmarklist")
let g:netrw_bookmarklist= []
let g:netrw_bookmarklist = []
endif
if index(g:netrw_bookmarklist,a:fname) == -1
" curdir not currently in g:netrw_bookmarklist, so include it
if isdirectory(s:NetrwFile(a:fname)) && a:fname !~ '/$'
call add(g:netrw_bookmarklist,a:fname.'/')
elseif a:fname !~ '/'
call add(g:netrw_bookmarklist,getcwd()."/".a:fname)
else
call add(g:netrw_bookmarklist,a:fname)
endif
" Normalize path to prevent duplicate entries
let bookmark_path = netrw#fs#AbsPath(s:NetrwFile(a:fname))
let ignore_case = 0
if has('win32')
let bookmark_path = substitute(bookmark_path, '\\', '/', 'ge')
let ignore_case = 1
endif
let bookmark_path = simplify(bookmark_path)
if isdirectory(bookmark_path) && bookmark_path !~ '/$'
let bookmark_path .= '/'
endif
if index(g:netrw_bookmarklist, bookmark_path, 0, ignore_case) == -1
" Not currently in the bookmarks list, so include it
call add(g:netrw_bookmarklist, bookmark_path)
call sort(g:netrw_bookmarklist)
endif

View File

@@ -1142,6 +1142,8 @@ One may easily "bookmark" the currently browsed directory by using >
mb
<
Note: Bookmarked paths are normalized and stored as absolute paths.
*.netrwbook*
Bookmarks are retained in between sessions of vim in a file called .netrwbook
as a |List|, which is typically stored in the first directory on the user's
@@ -2854,10 +2856,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

@@ -16,13 +16,20 @@ def OSCMessage(id: number)
sent_message = true
enddef
export def Paste(reg: string): tuple<string, list<string>>
var loop_timerid: number = -1
export def Paste(reg: string): any
# Check if user has indicated that the terminal does not support OSC 52 paste
# (or has disabled it)
if get(g:, 'osc52_disable_paste', 0)
return ("c", [])
endif
if loop_timerid != -1
# This will result in the register being unchanged
return null
endif
# Some terminals like Kitty respect the selection type parameter on both X11
# and Wayland. If the terminal doesn't then the selection type parameter
# should be ignored (no-op)
@@ -61,6 +68,14 @@ export def Paste(reg: string): tuple<string, list<string>>
endif
endtry
# A TextPutPost autocmd may cause this function to be called twice, which is
# technically intended behaviour, however it is not necessary for this plugin.
# To prevent this, return immediately if we have not returned back to the main
# loop since the last "paste" call.
loop_timerid = timer_start(0, (_) => {
loop_timerid = -1
})
if interrupt
echo "Interrupted while waiting for OSC 52 response"
return ("c", [""])

View File

@@ -35,6 +35,7 @@ augroup tar
au FileWriteCmd tarfile::*/* call tar#Write(expand("<amatch>"))
endif
au BufReadCmd *.cbt call tar#Browse(expand("<amatch>"))
au BufReadCmd *.lrp call tar#Browse(expand("<amatch>"))
au BufReadCmd *.tar call tar#Browse(expand("<amatch>"))
au BufReadCmd *.tar.bz2 call tar#Browse(expand("<amatch>"))

View File

@@ -6,6 +6,7 @@
" Last Change:
" 2025 Apr 02 by Vim Project: add *.whl to list of zip extensions (#17038)
" 2025 Oct 06 by MultisampledNight: add *.pkpass to list of zip extensions (#18501)
" 2026 May 16 by Vim Project: add .cbz extension (#20206)
" License: Vim License (see vim's :help license)
" Copyright: Copyright (C) 2005-2016 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
@@ -31,7 +32,7 @@ set cpo&vim
" ---------------------------------------------------------------------
" Options: {{{1
if !exists("g:zipPlugin_ext")
let g:zipPlugin_ext='*.aar,*.apk,*.celzip,*.crtx,*.docm,*.docx,*.dotm,*.dotx,*.ear,*.epub,*.gcsx,*.glox,*.gqsx,*.ja,*.jar,*.kmz,*.odb,*.odc,*.odf,*.odg,*.odi,*.odm,*.odp,*.ods,*.odt,*.otc,*.otf,*.otg,*.oth,*.oti,*.otp,*.ots,*.ott,*.oxt,*.pkpass,*.potm,*.potx,*.ppam,*.ppsm,*.ppsx,*.pptm,*.pptx,*.sldx,*.thmx,*.vdw,*.war,*.whl,*.wsz,*.xap,*.xlam,*.xlsb,*.xlsm,*.xlsx,*.xltm,*.xltx,*.xpi,*.zip'
let g:zipPlugin_ext='*.aar,*.apk,*.cbz,*.celzip,*.crtx,*.docm,*.docx,*.dotm,*.dotx,*.ear,*.epub,*.gcsx,*.glox,*.gqsx,*.ja,*.jar,*.kmz,*.odb,*.odc,*.odf,*.odg,*.odi,*.odm,*.odp,*.ods,*.odt,*.otc,*.otf,*.otg,*.oth,*.oti,*.otp,*.ots,*.ott,*.oxt,*.pkpass,*.potm,*.potx,*.ppam,*.ppsm,*.ppsx,*.pptm,*.pptx,*.sldx,*.thmx,*.vdw,*.war,*.whl,*.wsz,*.xap,*.xlam,*.xlsb,*.xlsm,*.xlsx,*.xltm,*.xltx,*.xpi,*.zip'
endif
" ---------------------------------------------------------------------

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

@@ -0,0 +1,470 @@
" Vim syntax file
" Language: Algol 68
" Version: 0.4
" Maintainer: Janis Papanagnou
" Previous Maintainer: NevilleD.ALGOL_68@sgr-a.net
" Last Change: 2026 May 02
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 "*\*\|&"
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

@@ -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

@@ -2,6 +2,7 @@
" Language: Debian autopkgtest control files
" Maintainer: Debian Vim Maintainers
" Last Change: 2025 Jul 05
" 2026 May 05 by Vim project: fix typos
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/autopkgtest.vim
"
" Specification of the autopkgtest format is available at:
@@ -31,10 +32,10 @@ syn match autopkgtestTests contained "[a-z0-9][a-z0-9+.-]\+\%(,\=\s*[a-z0-9][a-z
syn match autopkgtestArbitrary contained "[^#]*"
syn keyword autopkgtestRestrictions contained
\ allow-stderr
\ breaks-testbe
\ build-neede
\ breaks-testbed
\ build-needed
\ flaky
\ hint-testsuite-trigger
\ hint-testsuite-triggers
\ isolation-container
\ isolation-machine
\ needs-internet
@@ -43,10 +44,11 @@ syn keyword autopkgtestRestrictions contained
\ needs-sudo
\ rw-build-tree
\ skip-foreign-architecture
\ skip-not-installable
\ skippable
\ superficial
syn keyword autopkgtestDeprecatedRestrictions contained needs-recommends
syn keyword autopkgtestDeprecatedRestrictions contained
\ needs-recommends
\ skip-not-installable
syn match autopkgtestFeatures contained 'test-name=[^, ]*\%([, ]*[^, #]\)*,\='
syn match autopkgtestDepends contained '\%(@builddeps@\|@recommends@\|@\)'

View File

@@ -7,6 +7,7 @@
" 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.
@@ -59,7 +60,7 @@ 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

View File

@@ -5,8 +5,12 @@
" Previous Maintainer: Vincent Berthoux <twinside@gmail.com>
" File Types: .cabal
" Last Change: 22 Oct 2022
"
" 2026 Apr 29 by Léana: add missing haskell language editions
" 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 +29,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,19 +190,20 @@ 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*:.*$/
syn keyword cabalLanguage Haskell98 Haskell2010
" See the following link for all Haskell language editions supported by Cabal.
" https://cabal.readthedocs.io/en/stable/cabal-package-description-file.html#pkg-field-default-language
syn keyword cabalLanguage Haskell98 Haskell2010 GHC2021 GHC2024
" title region
syn match cabalName contained /:\@<=.*/
syn match cabalNameRegion
\ contains=cabalStatementRegion,cabalName
\ nextgroup=cabalStatementRegion
\ oneline
\ /^\c\s*name\s*:.*$/
" author region
@@ -206,7 +211,6 @@ syn match cabalAuthor contained /:\@<=.*/
syn match cabalAuthorRegion
\ contains=cabalStatementRegion,cabalStatement,cabalAuthor
\ nextgroup=cabalStatementRegion
\ oneline
\ /^\c\s*author\s*:.*$/
" maintainer region
@@ -214,7 +218,6 @@ syn match cabalMaintainer contained /:\@<=.*/
syn match cabalMaintainerRegion
\ contains=cabalStatementRegion,cabalStatement,cabalMaintainer
\ nextgroup=cabalStatementRegion
\ oneline
\ /^\c\s*maintainer\s*:.*$/
" license region
@@ -222,7 +225,6 @@ syn match cabalLicense contained /:\@<=.*/
syn match cabalLicenseRegion
\ contains=cabalStatementRegion,cabalStatement,cabalLicense
\ nextgroup=cabalStatementRegion
\ oneline
\ /^\c\s*license\s*:.*$/
" license-file region
@@ -230,7 +232,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 +239,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,8 @@
" 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
" 2026 May 17 by Vim Project Update comparison operators #20225
" quit when a syntax file was already loaded
if exists("b:current_syntax")
@@ -17,29 +19,28 @@ syn match djangoError "%}\|}}\|#}"
" Django template built-in tags and parameters
" 'comment' doesn't appear here because it gets special treatment
syn keyword djangoStatement contained autoescape csrf_token empty
" FIXME ==, !=, <, >, <=, and >= should be djangoStatements:
" syn keyword djangoStatement contained == != < > <= >=
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 localize endlocalize
syn keyword djangoStatement contained localtime endlocaltime timezone endtimezone
syn keyword djangoStatement contained get_current_timezone
" 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 +49,8 @@ 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
syn keyword djangoFilter contained localize unlocalize localtime utc timezone
" Keywords to highlight within comments
syn keyword djangoTodo contained TODO FIXME XXX
@@ -67,6 +70,9 @@ syn region djangoVarBlock start="{{" end="}}" contains=djangoFilter,djangoArgume
syn region djangoComment start="{%\s*comment\(\s\+.\{-}\)\?%}" end="{%\s*endcomment\s*%}" contains=djangoTodo
syn region djangoComBlock start="{#" end="#}" contains=djangoTodo
" Match comparison operators within Django statements.
syn match djangoOperator "==\|!=\|<=\|>=\|<\|>" contained containedin=djangoTagBlock
" Define the default highlighting.
" Only when an item doesn't have highlighting yet
@@ -81,6 +87,6 @@ hi def link djangoError Error
hi def link djangoComment Comment
hi def link djangoComBlock Comment
hi def link djangoTodo Todo
hi def link djangoOperator Operator
let b:current_syntax = "django"

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

@@ -2,6 +2,7 @@
" Language: Django HTML template
" Maintainer: Dave Hodder <dmh@dmh.org.uk>
" Last Change: 2014 Jul 13
" 2026 May 17 by Vim Project Add highlighting for comparison operators #20232
" quit when a syntax file was already loaded
if exists("b:current_syntax")
@@ -23,4 +24,8 @@ syn region djangoVarBlock start="{{" end="}}" contains=djangoFilter,djangoArgume
syn region djangoComment start="{%\s*comment\(\s\+.\{-}\)\?%}" end="{%\s*endcomment\s*%}" contains=djangoTodo containedin=ALLBUT,@djangoBlocks
syn region djangoComBlock start="{#" end="#}" contains=djangoTodo containedin=ALLBUT,@djangoBlocks
" Use djangoTagBlockNaive to limit the djangoOperator matched characters to avoid spill-over with HTML, JS and CSS.
syn region djangoTagBlockNaive start="{%" end="%}" contains=djangoTagBlock,djangoVarBlock,djangoComment,djangoComBlock
syn match djangoOperator "==\|!=\|<=\|>=\|<\|>" contained containedin=CONTAINS,@djangoTagBlockNaive
let b:current_syntax = "htmldjango"

View File

@@ -3,6 +3,7 @@
" Maintainer: Claudio Fleiner <claudio@fleiner.com>
" URL: http://www.fleiner.com/vim/syntax/javacc.vim
" Last Change: 2012 Oct 05
" 2026 May 11 by Vim project: check for existence of javaFuncDef before clearing it
" Uses java.vim, and adds a few special things for JavaCC Parser files.
" Those files usually have the extension *.jj
@@ -33,7 +34,9 @@ syn clear javaError2
" remove function definitions (they look different) (first define in
" in case it was not defined in java.vim)
"syn match javaFuncDef "--"
syn clear javaFuncDef
if hlexists('javaFuncDef')
syn clear javaFuncDef
endif
syn match javaFuncDef "[$_a-zA-Z][$_a-zA-Z0-9_. \[\]]*([^-+*/()]*)[ \t]*:" contains=javaType
syn keyword javaccPackages options DEBUG_PARSER DEBUG_LOOKAHEAD DEBUG_TOKEN_MANAGER

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

@@ -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

@@ -4,6 +4,7 @@
" Maintainer: Chase Knowlden <haroldknowlden@gmail.com>
" Changes: `git log` is your friend
" Last Change: 2023 Aug 16
" 2026 Apr 16 by Vim project: handle ?. optional chaining #19988
"
" This file is bassed on the original work done by Warwick Allison
" <warwick.allison@nokia.com> whose did about 99% of the work here.
@@ -44,6 +45,7 @@ syn match qmlObjectLiteralType "[A-Za-z][_A-Za-z0-9]*\s*\({\)\@="
syn region qmlTernaryColon start="?" end=":" contains=@qmlExpr,qmlBraces,qmlParens,qmlLineComment
syn match qmlBindingProperty "\<[A-Za-z][_A-Za-z.0-9]*\s*:"
syn match qmlNullishCoalescing "??"
syn match qmlOptionalChaining "?\."
syn keyword qmlConditional if else switch
syn keyword qmlRepeat while for do in

View File

@@ -3,28 +3,7 @@
" Maintainer: This runtime file is looking for a new maintainer.
" Previous Maintainers: Charles E. Campbell
" Lennart Schultz <Lennart.Schultz@ecmwf.int>
" Last Change: 2024 Mar 04 by Vim Project {{{1
" 2024 Nov 03 by Aliaksei Budavei <0x000c70 AT gmail DOT com> improved bracket expressions, #15941
" 2025 Jan 06 add $PS0 to bashSpecialVariables #16394
" 2025 Jan 18 add bash coproc, remove duplicate syn keywords #16467
" 2025 Mar 21 update shell capability detection #16939
" 2025 Apr 03 command substitution opening paren at EOL #17026
" 2025 Apr 10 improve shell detection #17084
" 2025 Apr 29 match escaped chars in test operands #17221
" 2025 May 06 improve single-quote string matching in parameter expansions
" 2025 May 06 match KornShell compound arrays
" 2025 May 10 improve wildcard character class lists
" 2025 May 21 improve supported KornShell features
" 2025 Jun 16 change how sh_fold_enabled is reset #17557
" 2025 Jul 18 properly delete :commands #17785
" 2025 Aug 23 bash: add support for ${ cmd;} and ${|cmd;} #18084
" 2025 Sep 23 simplify ksh logic, update sh statements #18355
" 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
" }}}
" Last Change: 2026 May 17 by Vim Project
" Version: 208
" Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
" For options and settings, please use: :help ft-sh-syntax
@@ -279,7 +258,7 @@ syn cluster shDerefList contains=shDeref,shDerefSimple,shDerefVar,shDerefSpecial
syn cluster shDerefVarList contains=shDerefOffset,shDerefOp,shDerefVarArray,shDerefOpError
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 shExprList2 contains=@shExprList1,@shCaseList,shTest,shFunctionNameError
syn cluster shFunctionCmds contains=shFor,shCaseEsac,shIf,shRepeat,shDblBrace,shDblParen
if exists("b:is_ksh88") || exists("b:is_mksh")
" Offer "shFunctionCmds" as is.
@@ -305,7 +284,7 @@ if exists("b:is_kornshell") || exists("b:is_bash")
endif
syn cluster shPPSLeftList contains=shAlias,shArithmetic,shBracketExpr,shCmdParenRegion,shCommandSub,shSubshare,shValsub,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shHereString,shRedir,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable
syn cluster shPPSRightList contains=shDeref,shDerefSimple,shEscape,shPosnParm
syn cluster shSubShList contains=shBracketExpr,@shCommandSubList,shCommandSubBQ,shSubshare,shValsub,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator
syn cluster shSubShList contains=shBracketExpr,@shCommandSubList,shCommandSubBQ,shSubshare,shValsub,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator,shFunctionNameError
syn cluster shTestList contains=shArithmetic,shBracketExpr,shCommandSub,shCommandSubBQ,shSubshare,shValsub,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shSpecialDQ,shExDoubleQuote,shExpr,shExSingleQuote,shNumber,shOperator,shSingleQuote,shTest,shTestOpr
syn cluster shNoZSList contains=shSpecialNoZS
syn cluster shForList contains=shTestOpr,shNumber,shDerefSimple,shDeref,shCommandSub,shCommandSubBQ,shSubshare,shValsub,shArithmetic
@@ -664,40 +643,48 @@ 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
syn match shFunctionParens "()" contained
if exists("b:is_bash")
syn keyword shFunctionKey coproc
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
syn match shFunctionCmdOne "\%#=1^\s*\zs\%(\%(\<\k\+\|[^()<>|&$;\t ]\+\)\+\)\@>\s*()\ze\_s*\%(\%(for\|case\|select\|if\|while\|until\)\>\|\[\[\s\|((\)" skipwhite skipnl nextgroup=@shFunctionCmds contains=shFunctionParens
syn match shFunctionCmdTwo "\%#=1\%(\%(\<\k\+\>\|[^()<>|&$;\t ]\+\)\+\)\@>\ze\s*\%(()\ze\)\=\_s*\%(\<\%(for\|case\|select\|if\|while\|until\)\>\|\[\[\s\|((\)" contained skipwhite skipnl nextgroup=@shFunctionCmds contains=shFunctionParens
syn match shFunctionOne "\%#=1^\s*\zs\%(\%(\<\k\+\|[^()<>|&$;\t ]\+\)\+\)\@>\s*()\ze\_s*{" skipwhite skipnl nextgroup=shFunctionExpr contains=shFunctionParens
syn match shFunctionTwo "\%#=1\%(\%(\<\k\+\|[^()<>|&$;\t ]\+\)\+\)\@>\ze\s*\%(()\ze\)\=\_s*{" contained skipwhite skipnl nextgroup=shFunctionExpr contains=shFunctionParens
syn match shFunctionThree "\%#=1^\s*\zs\%(\%(\<\k\+\|[^()<>|&$;\t ]\+\)\+\)\@>\s*()\ze\_s*((\@!" skipwhite skipnl nextgroup=shFunctionSubSh contains=shFunctionParens
syn match shFunctionFour "\%#=1\%(\%(\<\k\+\|[^()<>|&$;\t ]\+\)\+\)\@>\ze\s*\%(\%(()\ze\)\=\)\@>\_s*((\@!" contained skipwhite skipnl nextgroup=shFunctionSubSh contains=shFunctionParens
" Claim empty array assignments.
syn match shArrayEmptyDecl "\%#=1\ze\%(\<\h\w*=\)\@>()" transparent nextgroup=shVariable
if !exists("g:sh_no_error")
syn match shFunctionNameError "\%#=1\%(\%(\<\h\w*\)\@>=\)\%(\%(\w\+\)\@>=\=\)\+()" skipwhite skipnl nextgroup=shExpr,shSubSh
endif
elseif exists("b:is_ksh88")
" AT&T ksh88
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 shFunctionCmdOne "^\s*\zs\h\w*\s*()\ze\_s*\%(\%(for\|case\|select\|if\|while\|until\)\>\|\[\[\s\|((\)" skipwhite skipnl nextgroup=@shFunctionCmds contains=shFunctionParens
syn match shFunctionOne "^\s*\zs\h\w*\s*()\ze\_s*{" skipwhite skipnl nextgroup=shFunctionExpr contains=shFunctionParens
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
syn match shFunctionThree "^\s*\zs\h\w*\s*()\ze\_s*((\@!" skipwhite skipnl nextgroup=shFunctionSubSh contains=shFunctionParens
elseif exists("b:is_mksh")
" MirBSD ksh is the wild west of absurd and abstruse function names...
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
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 contains=shFunctionParens
syn match shFunctionOne "^\s*\zs[-A-Za-z_@!+.%,0-9:]*[-A-Za-z_.%,0-9:]\s*()\ze\_s*{" skipwhite skipnl nextgroup=shFunctionExpr contains=shFunctionParens
syn match shFunctionTwo "\%#=1\%(\%(\<\w\+\|[@!+.%,:-]\+\)*[-A-Za-z_.%,0-9:]\)\@>\ze\s*\%(()\ze\)\=\_s*{" contained skipwhite skipnl nextgroup=shFunctionExpr contains=shFunctionParens
syn match shFunctionThree "^\s*\zs[-A-Za-z_@!+.%,0-9:]*[-A-Za-z_.%,0-9:]\s*()\ze\_s*((\@!" skipwhite skipnl nextgroup=shFunctionSubSh contains=shFunctionParens
elseif exists("b:is_kornshell")
" ksh93
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 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 contains=shFunctionParens
syn match shFunctionOne "^\s*\zs[A-Za-z_.][A-Za-z_.0-9]*\s*()\ze\_s*{" skipwhite skipnl nextgroup=shFunctionExpr contains=shFunctionParens
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 shFunctionThree "^\s*\zs[A-Za-z_.][A-Za-z_.0-9]*\s*()\ze\_s*((\@!" skipwhite skipnl nextgroup=shFunctionSubSh contains=shFunctionParens
syn match shNamespaceOne "\<\h\w*\>\ze\_s*{" contained skipwhite skipnl nextgroup=shFunctionExpr
else
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
syn match shFunctionCmdOne "^\s*\zs\h\w*\s*()\ze\_s*\%(for\|case\|if\|while\|until\)\>" skipwhite skipnl nextgroup=@shFunctionCmds contains=shFunctionParens
syn match shFunctionCmdTwo "\<\h\w*\s*()\ze\_s*\%(for\|case\|if\|while\|until\)\>" contained skipwhite skipnl nextgroup=@shFunctionCmds contains=shFunctionParens
syn match shFunctionOne "^\s*\zs\h\w*\s*()\ze\_s*{" skipwhite skipnl nextgroup=shFunctionExpr contains=shFunctionParens
syn match shFunctionTwo "\<\h\w*\>\s*()\ze\_s*{" contained skipwhite skipnl nextgroup=shFunctionExpr contains=shFunctionParens
syn match shFunctionThree "^\s*\zs\h\w*\s*()\ze\_s*(" skipwhite skipnl nextgroup=shFunctionSubSh contains=shFunctionParens
syn match shFunctionFour "\<\h\w*\>\s*()\ze\_s*(" contained skipwhite skipnl nextgroup=shFunctionSubSh contains=shFunctionParens
endif
if !exists("g:sh_no_error")
@@ -751,13 +738,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")
@@ -964,6 +953,9 @@ if !exists("skip_sh_syntax_inits")
hi def link shInError Error
hi def link shParenError Error
hi def link shTestError Error
if exists("b:is_bash")
hi def link shFunctionNameError Error
endif
if exists("b:is_kornshell") || exists("b:is_posix")
hi def link shDTestError Error
endif
@@ -984,6 +976,7 @@ if !exists("skip_sh_syntax_inits")
hi def link shCtrlSeq Special
hi def link shExprRegion Delimiter
hi def link shFunctionKey Keyword
hi def link shFunctionParens Delimiter
hi def link shFunctionOne Function
hi def link shFunctionTwo shFunctionOne
hi def link shFunctionThree shFunctionOne

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

@@ -0,0 +1,20 @@
>#+0#0000e05#ffffff0| +0#0000000&@73
| +0#0000e05&@3|V|I|M|_|T|E|S|T|_|S|E|T|U|P| |l|e|t| |g|:|a|l|g|o|l|6|8|_|s|y|m|b|o|l|i|c|_|o|p|e|r|a|t|o|r|s| |=| |1| +0#0000000&@19
|#+0#0000e05&| +0#0000000&@73
|#+0#0000e05&| +0#0000000&@73
| +0#0000e05&@3|A|l|g|o|l| |6|8| |p|r|e|l|u|d|e| |i|d|e|n|t|i|f|i|e|r| |f|r|o|m| |t|h|e| |G|e|n|i|e| |s|o|u|r|c|e| |c|o|d|e| |f|i|l|e|s|.| +0#0000000&@9
| +0#0000e05&@3| +0#0000000&@70
| +0#0000e05&@3|P|r|o|v|i|d|e|d| |a|s| |a| |b|a|s|e| |t|o| |v|e|r|i|f|y| |t|h|e| |c|o|r@1|e|c|t| |s|y|n|t|a|x| |h|i|g|h|l|i|g|h|t|i|n|g| +0#0000000&@10
| +0#0000e05&@3|o|f| |t|h|e| |a|l|g|o|l|6|8|.|v|i|m| |s|y|n|t|a|x| |f|i|l|e| |f|o|r| |t|h|e| |V|i|m| |e|d|i|t|o|r|.| +0#0000000&@20
| +0#0000e05&@3| +0#0000000&@70
| +0#0000e05&@3|T|h|e|r|e|'|s| |f|o|u|r| |s|e|c|t|i|o|n|s|,| |e|a|c|h| |r|e|p|r|e|s|e|n|t|i|n|g| |a|n| |o|r|i|g|i|n|a|l| |f|i|l|e|,| +0#0000000&@12
| +0#0000e05&@3|t|h|a|t| |a|r|e| |e|n|c|l|o|s|e|d| |i|n| |t|h|e| |U|n|i|x|-|'|m|o|r|e|'| |f|o|r|m| |t|o| |s|t|a|n|d| |o|u|t|.| +0#0000000&@15
| +0#0000e05&@3| +0#0000000&@70
| +0#0000e05&@3|S|o|m|e| |i|n|f|o|r|m|a|l| |c|o|m@1|e|n|t|s| |f|r|o|m| |t|h|e| |s|o|u|r|c|e| |c|o|d|e| |l|e|f|t| |i|n|t|a|c|t| |a|s| +0#0000000&@12
| +0#0000e05&@3|a| |c|o|m@1|e|n|t| |i|n| |A|l|g|o|l| |6|8| |s|y|n|t|a|x|.| +0#0000000&@41
| +0#0000e05&@3| +0#0000000&@70
| +0#0000e05&@3|D|e|p|e|n|d|i|n|g| |o|n| |t|h|e| |l|a|n|g|u|a|g|e| |c|o|n|t|e|x|t| |t|h|e|r|e|'|s| |d|u|p|l|i|c|a|t|e|s| |i|n| |t|h|e| +0#0000000&@11
| +0#0000e05&@3|l|i|s|t|,| |t|h|a|t| |a|r|e| |k|e|p|t| |f|o|r| |c|l|a|r|i|t|y| |g|i|v|e|n| |t|h|e| |a|s@1|o|c|i|a|t|e|d| |i|n|f|o|r|m|a|l| +0#0000000&@9
| +0#0000e05&@3|c|o|m@1|e|n|t| |a|s@1|o|c|i|a|t|e|d| |w|i|t|h| |t|h|e|m|.| +0#0000000&@41
| +0#0000e05&@3| +0#0000000&@70
@57|1|,|1| @10|T|o|p|

View File

@@ -0,0 +1,20 @@
| +0#0000e05#ffffff0@3|a| |c|o|m@1|e|n|t| |i|n| |A|l|g|o|l| |6|8| |s|y|n|t|a|x|.| +0#0000000&@41
| +0#0000e05&@3| +0#0000000&@70
| +0#0000e05&@3|D|e|p|e|n|d|i|n|g| |o|n| |t|h|e| |l|a|n|g|u|a|g|e| |c|o|n|t|e|x|t| |t|h|e|r|e|'|s| |d|u|p|l|i|c|a|t|e|s| |i|n| |t|h|e| +0#0000000&@11
| +0#0000e05&@3|l|i|s|t|,| |t|h|a|t| |a|r|e| |k|e|p|t| |f|o|r| |c|l|a|r|i|t|y| |g|i|v|e|n| |t|h|e| |a|s@1|o|c|i|a|t|e|d| |i|n|f|o|r|m|a|l| +0#0000000&@9
| +0#0000e05&@3|c|o|m@1|e|n|t| |a|s@1|o|c|i|a|t|e|d| |w|i|t|h| |t|h|e|m|.| +0#0000000&@41
| +0#0000e05&@2> | +0#0000000&@70
| +0#0000e05&@3|S|o|m|e| |e|n|t|r|i|e|s| |d|e|l|i|b|e|r|a|t|e|l|y| |c|o|n|t|a|i|n| |t|w|o| |i|d|e|n|t|i|f|i|e|r| |v|a|r|i|a|n|t|s| |t|h|a|t| +0#0000000&@8
| +0#0000e05&@3|m|a|y| |b|e| |u|s|e|d| |a|s| |a|l|t|e|r|n|a|t|i|v|e| |f|o|r|m| |i|n| |a|n| |A|l|g|o|l| |6|8| |G|e|n|i|e| |p|r|o|g|r|a|m|.| +0#0000000&@9
| +0#0000e05&@3| +0#0000000&@70
| +0#0000e05&@3|T|h|e| |i|d|e|n|t|i|f|i|e|r|s| |a|r|e| |p|r|e|s|e|n|t|e|d| |i|n| |t|w|o| |v|a|r|i|a|n|t|s| |s|e|p|a|r|a|t|e|d| |b|y| |a| +0#0000000&@10
| +0#0000e05&@3|t|a|b|u|l|a|t|o|r|;| |f|i|r|s|t| |w|i|t|h| |s|p|a|c|e|s|,| |t|h|e|n| |i|n| |c|a|n|o|n|i|c|a|l| |f|o|r|m| |w|i|t|h|o|u|t| +0#0000000&@10
| +0#0000e05&@3|s|p|a|c|e|s|.| |V|a|r|i|a|n|t|s| |w|i|t|h| |s|p|a|c|e|s| |a|r|e| |s|u|p@1|o|r|t|e|d| |b|y| |t|h|e| |V|i|m| |s|y|n|t|a|x| +0#0000000&@10
| +0#0000e05&@3|f|i|l|e| |a|s| |t|h|e| |A|l|g|o|l| |6|8| |l|a|n|g|u|a|g|e| |d|o|e|s|.| +0#0000000&@35
| +0#0000e05&@3|B|u|t| |n|o|t|e| |t|h|a|t| |w|h|i|l|e| |A|l|g|o|l| |6|8| |a|l@1|o|w|s| |a|r|b|i|t|r|a|r|y| |s|p|a|c|i|n|g| |w|i|t|h|i|n| +0#0000000&@10
| +0#0000e05&@3|i|d|e|n|t|i|f|i|e|r|s| |-| |e|v|e|n| |a|s| |e|x|t|r|e|m|e| |a|s| |w|r|i|t|i|n|g| |o|n|e| |c|h|a|r|a|c|t|e|r| |p|e|r| +0#0000000&@12
| +0#0000e05&@3|l|i|n|e|!| |-| |t|h|e| |V|i|m| |s|y|n|t|a|x| |f|i|l|e| |f|o|r| |A|l|g|o|l| |6|8| |h|a|d| |d|e|l|i|b|e|r|a|t|e|l|y| +0#0000000&@13
| +0#0000e05&@3|b|e@1|n| |d|e|f|i|n|e|d| |i|n| |a| |w|a|y| |r|e|s|t|r|i|c|t|i|n|g| |t|h|e| |h|i|g|h|l|i|g|h|t|e|d| |o|p|t|i|o|n|s|;| +0#0000000&@12
| +0#0000e05&@3|s|p|a|c|i|n|g| |c|a|n| |u|s|u|a|l@1|y| |b|e| |i|n|s|e|r|t|e|d| |w|h|e|r|e| |"|n|a|t|u|r|a|l| |w|o|r|d|s|"| |w|o|u|l|d| +0#0000000&@11
| +0#0000e05&@3|a|l@1|o|w| |a| |s|e|p|a|r|a|t|i|o|n| |(|s|a|y| |f|o|r| |'|i|n|t|w|i|d|t|h|'| |y|o|u| |m|a|y| |w|r|i|t|e|,| |e|.|g|.|,| +0#0000000&@11
@57|1|9|,|4| @10|0|%|

View File

@@ -0,0 +1,20 @@
| +0#0000e05#ffffff0@3|a|l@1|o|w| |a| |s|e|p|a|r|a|t|i|o|n| |(|s|a|y| |f|o|r| |'|i|n|t|w|i|d|t|h|'| |y|o|u| |m|a|y| |w|r|i|t|e|,| |e|.|g|.|,| +0#0000000&@11
| +0#0000e05&@3|'|i|n|t| |w|i|d|t|h|'| |b|u|t| |n|o|t| |'|i|n|t| |w|i|d| |t|h|'|;| |t|h|e| |l|a|t@1|e|r| |w|o|u|l|d| |n|o|t| |g|e|t| +0#0000000&@12
| +0#0000e05&@3|h|i|g|h|l|i|g|h|t|e|d|)|.| +0#0000000&@57
| +0#0000e05&@3| +0#0000000&@70
| +0#0000e05&@3|M|o|d|e|l|i|n|e|s| |a|r|e| |s|e|t| |t|o| |s|i|m|p|l|y| |i|n|s|p|e|c|t| |t|h|e| |c|o|r@1|e|c|t| |h|i|g|h|l|i|g|h|t|i|n|g| +0#0000000&@10
| +0#0000e05&@3>i|n| |t|h|i|s| |f|i|l|e|.| +0#0000000&@57
| +0#0000e05&@3| +0#0000000&@70
| +0#0000e05&@3|J|a|n|i|s| |P|a|p|a|n|a|g|n|o|u|,| |2|0|2|6|-|0|4|-|2|3| +0#0000000&@42
|#+0#0000e05&| +0#0000000&@73
@75
|#+0#0000e05&|:@12| +0#0000000&@60
|p+0#0000e05&|r|e|l|u|d|e|.|c| +0#0000000&@65
|:+0#0000e05&@12|#| +0#0000000&@60
@75
|#+0#0000e05&| |P|r|i|m|i|t|i|v|e| |A|6|8| |m|o|i|d|s|.| |#| +0#0000000&@50
@2|V+0#00e0003&|O|I|D| +0#0000000&@41|V+0#00e0003&|O|I|D| +0#0000000&@22
|#+0#0000e05&| |S|t|a|n|d|a|r|d| |p|r|e|c|i|s|i|o|n|.| |#| +0#0000000&@51
@2|I+0#00e0003&|N|T| +0#0000000&@42|I+0#00e0003&|N|T| +0#0000000&@23
@2|R+0#00e0003&|E|A|L| +0#0000000&@41|R+0#00e0003&|E|A|L| +0#0000000&@22
@57|3|7|,|5| @10|1|%|

View File

@@ -0,0 +1,20 @@
| +0&#ffffff0@1|R+0#00e0003&|E|A|L| +0#0000000&@41|R+0#00e0003&|E|A|L| +0#0000000&@22
@2|C+0#00e0003&|O|M|P|L|E|X| +0#0000000&@38|C+0#00e0003&|O|M|P|L|E|X| +0#0000000&@19
@2|C+0#00e0003&|O|M|P|L| +0#0000000&@40|C+0#00e0003&|O|M|P|L| +0#0000000&@21
@2|B+0#00e0003&|I|T|S| +0#0000000&@41|B+0#00e0003&|I|T|S| +0#0000000&@22
@2|B+0#00e0003&|Y|T|E|S| +0#0000000&@40|B+0#00e0003&|Y|T|E|S| +0#0000000&@21
>#+0#0000e05&| |M|u|l|t|i|p|l|e| |p|r|e|c|i|s|i|o|n|.| |#| +0#0000000&@51
@2|I+0#00e0003&|N|T| +0#0000000&@42|I+0#00e0003&|N|T| +0#0000000&@23
@2|R+0#00e0003&|E|A|L| +0#0000000&@41|R+0#00e0003&|E|A|L| +0#0000000&@22
@2|C+0#00e0003&|O|M|P|L|E|X| +0#0000000&@38|C+0#00e0003&|O|M|P|L|E|X| +0#0000000&@19
@2|C+0#00e0003&|O|M|P|L| +0#0000000&@40|C+0#00e0003&|O|M|P|L| +0#0000000&@21
@2|B+0#00e0003&|I|T|S| +0#0000000&@41|B+0#00e0003&|I|T|S| +0#0000000&@22
@2|B+0#00e0003&|Y|T|E|S| +0#0000000&@40|B+0#00e0003&|Y|T|E|S| +0#0000000&@21
@2|R+0#00e0003&|E|A|L| +0#0000000&@41|R+0#00e0003&|E|A|L| +0#0000000&@22
@2|I+0#00e0003&|N|T| +0#0000000&@42|I+0#00e0003&|N|T| +0#0000000&@23
@2|C+0#00e0003&|O|M|P|L|E|X| +0#0000000&@38|C+0#00e0003&|O|M|P|L|E|X| +0#0000000&@19
@2|C+0#00e0003&|O|M|P|L| +0#0000000&@40|C+0#00e0003&|O|M|P|L| +0#0000000&@21
@2|B+0#00e0003&|I|T|S| +0#0000000&@41|B+0#00e0003&|I|T|S| +0#0000000&@22
|#+0#0000e05&| |O|t|h|e|r|.| |#| +0#0000000&@64
@2|B+0#00e0003&|O@1|L| +0#0000000&@41|B+0#00e0003&|O@1|L| +0#0000000&@22
@57|5@1|,|1| @10|2|%|

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