Compare commits

..

196 Commits

Author SHA1 Message Date
Foxe Chen
cbcc5babba patch 9.1.2012: Vim9: cannot initialize class member with protected var
Problem:  Vim9: cannot initialize class member with protected var
Solution: Allow this to work if this happens within the same class
          (Foxe Chen)

closes: #18949

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-23 20:17:30 +00:00
Stanislaw Gruszka
5e577c7aa8 runtime(ftplugin): set different formatoptions for bpftrace
Problem:   Comment formatting does not work by default for bpftrace.
Solution:  Change default 'formatoptions' similarly as C and many other
           languages.

closes: #18996

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-23 20:15:14 +00:00
Christian Brabandt
bb10f71402 patch 9.1.2011: crash when unreferencing gtk icon theme
Problem:  crash when unreferencing gtk icon theme
          (noamhalevy-wq, after v9.1.1583)
Solution: Remove the g_object_unref() call.

gtk_icon_theme_get_default() returns a singleton that should NOT be
unreferenced. From GTK documentation:

> A unique GtkIconTheme associated with the default screen. This icon
theme is associated with the screen and can be used as long as the
screen is open. Do not ref or unref it.

fixes: #18997

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-22 18:59:50 +00:00
John Marriott
a90e80411a patch 9.1.2010: Missing out-of-memory checks in vim9class.c
Problem:  Missing out-of-memory checks in vim9class.c
          (after v9.1.2000)
Solution: Return FAIL early (John Marriott)

closes: #18991

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-22 18:49:43 +00:00
Stanislaw Gruszka
7982966f3e runtime(bpftrace): add base syntax plugin
Problem:  No syntax highlighting for bpftrace files.
Solution: Add basic syntax rules, which cover comments, keywords, strings,
          numbers, macros and probes (the bpftrace specific items).

closes: #18999

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-22 18:46:44 +00:00
Muraoka Taro
de37e7430a patch 9.1.2009: tests: "Xm4" test directory may not be deleted
Problem:  tests: "Xm4" test directory may not be deleted
Solution: Use "R" flag with mkdir() call to have the directory
          recursively deleted at the end of function Test_m4_format()
          (Muraoka Taro)

Test_m4_format in test_filetype.vim creates the "Xm4" directory with the
'D' flag. Then it creates two files in the "Xm4" directory. One of them,
"alocal.m4," was created with the 'D' flag, so it will disappear after
the test is complete. However, the other, "configure.ac," was created
without any flags, so it will remain even after the test is complete.
Because the parent directory "Xm4" was created with the 'D' flag, the
latter "configure.ac" remains and is not empty, so it will not be
deleted.

This forces the directory to be deleted regardless of its contents. As a
result, the two files "alocal.m4" and "configure.ac" created in the
directory are no longer needed, so they have been deleted.

closes: #18995

Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-22 18:33:50 +00:00
Ambrus Tóth
9c9982240a patch 9.1.2008: filetype: hylo files are not recognized
Problem:  filetype: hylo files are not recognized
Solution: Detect *.hylo files as hylo filetype (Ambrus Tóth)

References:
- https://hylo-lang.org/

closes: #18994

Signed-off-by: Ambrus Tóth <ping@ambrus.dev>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-22 18:26:52 +00:00
Ivan Pešić
b571034a8f translation(sr): Update Serbian message translation
closes: #18993

Signed-off-by: Ivan Pešić <27575106+eevan78@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-22 18:21:01 +00:00
Stanislaw Gruszka
f2814754c0 patch 9.1.2007: filetype: bpftrace hashbang lines are not recognized
Problem:    bpftrace files are not recognized from the hashbang line.
Solution:   Add a hashbang check (Stanislaw Gruszka)

closes: #18992

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-22 18:17:36 +00:00
Muraoka Taro
86855ea8ee patch 9.1.2006: MS-Windows: ANSI colors not correct in terminal
Problem:  ANSI escape colors are not displayed correctly in
          non-termguicolors in vim (cli) on Windows. The red and blue
          channels seem to be swapped.
Cause:    When converting VTerm ANSI index colors to cterm colors in
          terminal.c, the Windows case equivalent to NR-16 (:help
          cterm-colors) is ignored.
Solution: Created and used a table to convert ANSI indexed colors to
          cterm's NR-16 representation (Windows only). This table
          corresponds to the inverse conversion of cterm_ansi_idx in
          term.c. The values in both tables are exactly the same, but
          the meanings are opposite, so they are separate tables
          (Muraoka Taro).

closes: #18931

Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-21 19:45:02 +00:00
Doug Kearns
3913f13a7d runtime(doc): Improve :help builtin-function-list table formatting
- Start each field at the correct tabstop - on a new line if required.
- Use "Type1/Type2" for return types rather than "Type1 or Type2",
  matching the dominant style.
- Convert hyperlinked Ex commands to command markup, `:cmd`.
- Wrap overlong lines.

closes: #18438

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-21 19:37:10 +00:00
Mao-Yining
49e0f833dd patch 9.1.2005: MS-Windows: Missing fullscreen support for GUI version
Problem:  MS-Windows: Missing fullscreen support for GUI version
Solution: Add "s" flag to guioptions (Mao-Yining)

- Implement fullscreen mode controlled by the 'go-s' flag in 'guioptions'
- Update documentation with usage examples and platform-specific details

See :help 'go-s' and :help gui-w32-fullscreen for complete documentation.

closes: #18836

Signed-off-by: Mao-Yining <101858210+mao-yining@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-21 19:33:53 +00:00
Muraoka Taro
bd686d85dc patch 9.1.2004: MS-Windows: executable() cannot find file in directory with single char
Problem:  MS-Windows: If a directory with a single character name is
          included in the PATH environment variable without a trailing
          path separator, executable() will not be able to find the
          executable file under it.
Solution: The second argument of the after_pathsep() function is now
          passed the next pointer where a path separator may exist
          (Muraoka Taro).

As a specific example, the default installation path for PowerShell v7
is "C:\Program Files\PowerShell\7", but if you set this as is in the
PATH environment variable, Vim will not be able to find the pwsh.exe
command. In this case, Vim will try to search for "C:\Program
Files\PowerShell\7pwsh.exe".

Cause: The after_pathsep() function determines whether the location
passed as its second argument immediately follows a path separator.
However, in the code where the problem occurred, the second argument was
passed a location that might contain a path separator. As a result, it
was mistakenly determined that a path separator was present in cases
where the final directory name was a single character and not followed
by a path separator, and the path to search was incorrect.

closes: #18979

Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-21 19:19:39 +00:00
Konfekt
e09ff34129 runtime(ty): include ty compiler plugin
closes: #18960

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-21 19:17:14 +00:00
Muraoka Taro
fa2fca1ebf patch 9.1.2003: tests: Test_glob_symlinks may fail on Window
Problem:  tests: Test_glob_symlinks may fail on Windows with UCRT
          runtime
Solution: Comment out the code, do not use _wstat().
          (author)

For Test_glob_symlinks() to succeed, vim_stat() (which is actually
mswin_stat_impl()) must fail on empty symlinks.  When the dynamically
linked C runtime is linked, _wstat() succeeds even on empty symbolic
links. As a result, Test_glob_symlinks() fails.

For details, see here:
https://github.com/koron/vc-stat-behavior-verification

closes: #18962

Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-21 19:09:20 +00:00
Yegappan Lakshmanan
c1d77520b8 patch 9.1.2002: Vim9: heap-use-after-free when when accessing protect class member
Problem:  Vim9: heap-use-after-free when when accessing protect class
          member (Foxe Chen)
Solution: Set cl->class_type_list and return directly, add tests for
          using protected class method and variable from another class
          (Yegappan Lakshmanan).

closes: #18971

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-21 19:03:31 +00:00
Mao-Yining
8de7fd0c20 refactor(vim9): use 'start' open urls on win32
- Use `:!start` directly, discard the using of `explorer.exe`.
- Update the document in `eval.txt`.

closes: #18985

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-21 18:59:48 +00:00
Mao-Yining
3255b8a556 runtime(vim9): Reset pwsh and powershell in Open()
relates: #17995
closes:  #18986

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-21 18:45:26 +00:00
gagik
d57b4a3681 translation(hy): Update Armenian language translation
closes: #18990

Signed-off-by: gagik <hakgagik@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-21 18:42:18 +00:00
Mateo Gjika
83fd754150 runtime(openPlugin): start :Launch process in the background in GUI mode
fixes:  #18977
closes: #18981

Signed-off-by: Mateo Gjika <104777599+mateoxh@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-21 09:47:38 +00:00
Mao-Yining
2387c49f6e translation(zh_CN): Add license disclaimer
Added disclaimer to clarify that the Chinese translation is for
reference only and is not legally binding. The original English version
of the license is the sole authoritative text. No liability is accepted
for any ambiguities or errors arising from the translation.

closes: #18980

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-20 18:29:16 +00:00
Muraoka Taro
6ec7d40b7c runtime(getscript): GLVS plugin fails with wget.exe with PowerShell
Problem:  Only Windows: The GLVS plugin fails in a PowerShell Desktop if
          wget.exe is installed. The PowerShell Desktop has an alias
          called wget which hides wget.exe.
Solution: Force .exe extension if wget.exe is available.

closes: #18987

Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-20 18:13:18 +00:00
Doug Kearns
a820a4540d runtime(doc): Fix "Vim script" formatting at :help clipboard-providers
closes: #18966

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-20 17:39:32 +00:00
glepnir
b43f9ded7e patch 9.1.2001: cursor may end up in wrong window after :botright copen
Problem:  After :botright copen and closing the quikfix window, the
          cursor ends up in the wrong window. The problem is fr_child
          always points to the first (leftmost for FR_ROW, topmost for
          FR_COL) child frame. When do :vsplit, the new window is
          created on the left, and frame_insert() updates the parent's
          fr_child to point to this new left window.
Solution: Create a snapshot before open the quickfix window and restore
          it when close it (glepnir).

closes: #18961

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-20 17:26:39 +00:00
Christian Brabandt
64799a5080 runtime(doc): clarify the behavior of CTRL-Z
fixes: #18975

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-20 16:54:07 +00:00
zoumi
1a4a1b9fa6 runtime(zip): Use :lcd instead of :cd in zip.vim
closes: #18967

Signed-off-by: zoumi <zoumi@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-20 16:25:16 +00:00
John Marriott
87c6eb804f patch 9.1.2000: Vim9: object member used char_u pointers
Problem:  Vim9: class and object member names are stored as char_u *
          pointer requiring repeated strlen() calls and making it harder
          to use length-aware string operations consistently.
Solution: Store ocm_name as a string_T instead of char_u *
          (John Marriott).

In addition in vim9class.c:
1: change some calls from ga_concat() to ga_concat_len() where the
   length is known.
2: in ex_class() remove unneeded variable name.
3. in intf_method_present() remove unneeded variable cl_name.
4: in update_member_method_lookup_table() move some assignments from
   inner loops into outer loops.
5: in member_lookup() remove unneeded else.
6: in is_duplicate_variable() and is_duplicate_enum() rearrange the
   string comparisons to first check the lengths match.

closes: #18973

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-20 16:00:17 +00:00
gagik
94097e0831 translation(hy): Update Armenian language translation
closes: #18969

Signed-off-by: gagik <hakgagik@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-20 15:55:40 +00:00
Mao-Yining
923fc09c81 translation(zh_CN): Update the Simplify Chinese translation
closes: #18978

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-20 15:45:36 +00:00
zeertzjq
fe8c8b1e85 runtime(doc): fix outdated :function help
Since patch 7.4.264 a leading "g:" is skipped.

closes: #18976

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-20 15:24:57 +00:00
Foxe Chen
5fb29bb7e7 runtime(osc52): Update documentation, send DA1 query when loading package
closes: #18944

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-18 22:15:05 +01:00
Foxe Chen
96ce55331f patch 9.1.1999: clipboard provider does not respect 'clipboard' option
Problem:  clipboard provider does not respect 'clipboard' option
          (Satoru Kitaguchi, after v9.1.1972)
Solution: make clipboard provider register respect "unnamed/unnamedplus"
          from the 'clipboard' option value

fixes:  #18930
closes: #18952

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-18 21:47:34 +01:00
Christian Brabandt
757b42ab07 runtime(tutor): Chapter 2: consistently use upper case letter, fix typo after 1e3e1ba067
Chapter 2: Fix missing "R" after 1e3e1ba067 when using register from insert
mode. While at it, consistently use upper case letter for CTRL-R in the
new-tutor.

related: #18950

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-18 21:22:06 +01:00
yilisharcs
fe0bafc728 runtime(compiler): improve rust errorformat
This commit adds match patterns for:
- warnings with error codes (warning[E0123]: foobar)
- valid nightly unicode entries

closes: #18957

Signed-off-by: yilisharcs <yilisharcs@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-18 21:14:12 +01:00
zeertzjq
cedb1a3171 patch 9.1.1998: tests: not enough tests for :setlocal omnifunc
Problem:  Not enough tests for :setlocal omnifunc (after 9.1.1991).
Solution: Move the last :new after :setlocal. Also test with 'complete'
          (zeertzjq).

closes: #18958

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-18 21:02:48 +01:00
Christian Brabandt
93d9d196ed runtime(doc): use codepoint consistently
fixes: #18944

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-17 23:24:57 +01:00
Christian Brabandt
1e3e1ba067 runtime(tutor): Update Chapter 2, remove mentioning surround plugin
fixes: #18950

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-17 23:14:56 +01:00
John Marriott
de701aee9f patch 9.1.1997: Missing out-of-memory check in vim9class.c
Problem:  Missing out-of-memory check in vim9class.c in calls to
          vim_strnsave().
Solution: Refactor is_duplicate_variable() and is_duplicate_enum() and
          make use of string_T struct instead (John Marriott).

closes: #18947

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-17 22:31:59 +01:00
yilisharcs
bd5e882a91 runtime(compiler): Match gcc.vim make error format
Problem:  gcc.vim interprets "make: *** [Makefile" in the error message
          "make: *** [Makefile:2: all] Error 1" as a valid filename.
Solution: Add pattern to extract the filename correctly. Note that this
	  doesn't remove the dangling "]" from the output ("all]").

closes: #18956

Signed-off-by: yilisharcs <yilisharcs@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-17 22:29:24 +01:00
Christian Brabandt
bf1b41e387 patch 9.1.1996: tests: test_cmdline.vim leaves swapfiles behind
Problem:  tests: test_cmdline.vim leaves swapfiles behind
Solution: Close open buffers using :bw! instead of :close!

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-17 22:16:31 +01:00
Aliaksei Budavei
05531d0079 patch 9.1.1995: tests: flaky test_cmdline.vim causes test failures
Problem:  Data races between test buffers are currently addressed by
          relying on arbitrary execution delays or blissfully dismissed.
Solution: Prefer more deterministic synchronisation between test buffers
          for test cases that generate screendump files with expected
          results (Aliaksei Budavei)

closes: #18920

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-17 22:13:10 +01:00
Aliaksei Budavei
6ac778723b patch 9.1.1994: CI: slow cursor positioning may cause flaky test failures
Problem:  More deterministic synchronisation can be established between
          processes running test cases and collecting visual effects to
          a screendump file for future verification by anticipating
          the availability of known parts of such a file and asserting
          the location of the cursor.
Solution: Provide a convenience test function that waits a specified
          time for cursor positioning (Aliaksei Budavei)

related: #18920

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-17 22:13:00 +01:00
Christian Brabandt
fdd21ca377 runtime(doc): fix wrong help tag reference in eval.txt
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-17 21:59:56 +01:00
Christian Brabandt
59a16f75b5 patch 9.1.1993: MS-Windows: compile error because of implicit type conversions
Problem:  MS-Windows: compile error because of implicit size conversions
          (after v9.1.1983)
Solution: Change type casts

closes: #18946

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-17 21:52:01 +01:00
Foxe Chen
b74c86416e patch 9.1.1992: Vim9: heap buffer overflow with COMPAREANY instruction
Problem:  Vim9: heap buffer overflow with COMPAREANY instruction
Solution: Verify the type and error out in case of different types
          (Foxe Chen)

closes: #18945

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-17 21:47:53 +01:00
zeertzjq
3e82b0ebfe patch 9.1.1991: :setlocal changes effective global 'omnifunc'
Problem:  :setlocal changes effective global 'omnifunc' (Maxim Kim)
Solution: Don't change global callback when using :setlocal (zeertzjq).

fixes:  #18948
closes: #18951

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-17 21:34:23 +01:00
Muraoka Taro
bbbc23ac2f patch 9.1.1990: tests: Test_term_gettty() fails when using conpty on Windows
Problem:  tests: Test_term_gettty() fails when using conpty on Windows,
          CI uses winpty, so this test passes.
Solution: Skip the test Test_term_gettty(). Since conpty communicates
          via anonymous pipes, there is no name that can be obtained
          with term_gettty() (Muraoka Taro)

closes: #18954

Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-17 20:52:32 +01:00
Christian Brabandt
ca12f62d0a patch 9.1.1989: Vim intro screen shows register message
Problem:  Vim intro screen shows register message (after v9.1.1893)
Solution: Remove the register message, registering is no longer useful
          and possible.

fixes:  #18933
closes: #18934

Signed-off-by:
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-16 20:39:31 +01:00
Foxe Chen
b9e45e82ba patch 9.1.1988: osc52 package can be further improved
Problem:  osc52 package can be further improved (after v9.1.1984).
Solution: Improve plugin, update test and check for clipboard_provider
          feature (Foxe Chen).

closes: #18935

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-16 20:35:53 +01:00
zeertzjq
c4b3aefd0d patch 9.1.1987: assert_equal() prepends unnecessary ':' when typed
Problem:  assert_equal() prepends unnecessary ':' when typed
          (after 9.0.1758).
Solution: Don't change a NULL stacktrace to an empty string (zeertzjq).

closes: #18936

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-16 20:07:27 +01:00
Foxe Chen
beeea8a1ce patch 9.1.1986: clipboard provider does not work when redirecting messages
Problem:  clipboard provider does not work when redirecting messages
          (BenYip, after v9.1.1972)
Solution: Adjust ifdefs in ex_redir()

fixes:  #18937
closes: #18939

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-16 20:02:20 +01:00
Victorhck
bbf616a9d6 runtime(tutor): Improve Spanish translations
This change does the following:
- fix lesson number in tutor 1
- added and explanation about how get vimtutor lesson 2
- fix credits to authors in lesson 2

closes: #18940

Signed-off-by: Victorhck <victorhck@mailbox.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-16 19:56:59 +01:00
Muraoka Taro
878d00bb3a patch 9.1.1985: tests: test_sound.vim fails on Windows
Problem:  tests: test_sound.vim fails when run locally on Windows
Solution: Skip Test_play_silent in Windows non-GUI environments.

Cause: There are two causes:

1) The global variable g:id is undefined, causing an undefined
   reference. Due to the execution order of test cases, g:id is defined in
   Test_play_event. However, on Windows, this test is skipped, so g:id is
   not defined. It is referenced in Test_play_silent's WaitForAssert()
   without being defined, resulting in an undefined error.

   Solution: Define g:id at the beginning of Test_play_silent.

2) In the non-GUI Windows version of vim, there is no message loop,
   so the callback when play file sound ends does not occur, and
   Test_play_silent's WaitForAssert times out and fails. In CI,
   sound_playfile() returns 0, so Test_play_silent is skipped. The
   reason for this is unknown, but it may be because CI is running on
   Windows Server or something like that.

   Solution: Skip Test_play_silent in Windows non-GUI environments.

Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>

closes: #18941
2025-12-16 19:51:26 +01:00
Foxe Chen
02b8ec7da5 patch 9.1.1984: terminal OSC52 support can be improved
Problem:  terminal OSC52 support to access the clipboard can be improved
Solution: Include and package the optional osc52 package, note: this
          requires a Vim with clipboard provider feature (Foxe Chen).

related: #14995
closes: #18575

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-15 21:52:32 +01:00
John Marriott
2019321e0b patch 9.1.1983: Vim9: class_name definition can be improved
Problem:  Vim9: class_name definition can be improved
Solution: Use string_T to store class_name, avoid using STRLEN() calls,
          simplify code, remove unused definition of struct
          oc_newmember_S (John Marriott)

Use struct string_T to store the field class_name in struct class_T,
which means we can just use the .length field in struct string_T
instead of measuring it.

In addition:
1. In eval.c use string_T to store class_name and s in function
   class_tv2string().
2. In vim9type.c change some calls from ga_concat() to ga_concat_len()
   where the length is known.
3. In vim9class.c remove unused struct definition oc_newmember_S.
   Change some calls from ga_concat() to ga_concat_len() where the
   length is known.
4. In scriptfile.c use string_T to store type_name, class_name and
   es_name in function estack_sfile().
5. In function estack_sfile() simplify construction of the grow array ga
   and change some calls from ga_concat() to ga_concat_len() when the
   length is known.

closes: #18925

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-15 21:09:29 +01:00
Foxe Chen
eb5995a876 patch 9.1.1982: Use after free with redraw_listener_add()
Problem:  Use after free with redraw_listener_add() (after: v9.1.1976)
Solution: Copy Callbacks into listener struct (Foxe Chen)

closes: #18926

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-15 19:58:54 +01:00
MURAOKA Taro
35de719c0c patch 9.1.1981: tests: test suite may stop on error in gen_opt_test.vim
Problem:  tests: test suite may stop on error in gen_opt_test.vim
Solution: Use a different output file for log files (Muraoka Taro)

When running newtests, it may unexpectedly stop just before
test_options_all.

Cause: When generating the opt_test.vim file for test_options_all, the
failure is detected by the existence of test.log. Therefore, if a test
performed before test_options_all fails and test.log is created, it is
mistakenly thought that the generation of opt_tet.vim has failed, and
the test suite stops there.

So let's change the filename created when utils/gen_opt_test.vim fails
from test.log to gen_opt_test.log, so that it can be detected
independently from other test failures.

closes: #18928

Signed-off-by: MURAOKA Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-15 19:51:55 +01:00
dependabot[bot]
e1ea10a0a1 CI: Bump actions/cache from 4 to 5
Bumps [actions/cache](https://github.com/actions/cache) from 4 to 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/v4...v5)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

closes: #18927

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-15 19:49:29 +01:00
Ivan Pešić
6bfc468c9f translation(sr): Update the Serbian translation
closes: #18929

Signed-off-by: Ivan Pešić <27575106+eevan78@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-15 19:48:00 +01:00
Christian Brabandt
64eeff5784 runtime(fvwm): Update fvwm keywords
fixes: #18924

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-14 17:46:44 +01:00
Gordian Dziwis
6c027b25f1 patch 9.1.1980: filetype: N-Quads files are not recognized
Problem:  filetype: N-Quads files are not recognized
Solution: Detect *.nq files as nq filetype

Reference:
- https://www.w3.org/TR/n-quads/

closes: #18923

Signed-off-by: Gordian Dziwis <gordian@dziw.is>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-14 16:53:30 +01:00
Doug Kearns
4c141bae3b patch 9.1.1979: :helpclose allows range and counts
Problem:  :helpclose incorrectly accepts a range and a count.
Solution: Remove EX_COUNT and EX_RANGE from the command definition.
          (Doug Kearns)

closes: #18917

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-14 16:41:03 +01:00
Mao-Yining
a2b45646ab runtime(doc): Update version9.txt for v9.1.1966
closes: #18919

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-14 16:35:04 +01:00
Hirohito Higashi
5193375b10 patch 9.1.1978: tests: Test_smoothscroll_number() may fail
Problem:  tests: Test_smoothscroll_number() may fail because of
          'showcmd'
Solution: Send redraw command (Hirohito Higashi)

closes: #18921

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-14 16:23:18 +01:00
Christian Brabandt
b5cf53b8b1 patch 9.1.1977: MS-Windows: missing dependency on optiondefs.h in Make_cyg_ming.mak
Problem:  MS-Windows: missing dependency on optiondefs.h in Mingw and
          Cygwin Makefile (Mao-Yining)
Solution: Update $INCL variable

fixes: #18915

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-13 18:43:27 +01:00
Foxe Chen
4438b8e071 patch 9.1.1976: Cannot define callbacks for redraw events
Problem:  When using listeners, there is no way to run callbacks at
          specific points in the redraw cycle.
Solution: Add redraw_listener_add() and redraw_listener_remove() and
          allow specifying callbacks for redraw start and end
          (Foxe Chen).

closes: #18902

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-13 18:23:54 +01:00
Mao-Yining
3a113e04de nsis: add Chinese translation to nsis installer
closes: #18912

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-13 17:50:47 +01:00
Hirohito Higashi
e9a9833263 runtime(doc): Tweak documentation style in eval.txt and options.txt
closes: #18914

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-13 17:45:36 +01:00
Gourmet
ef7a577b27 runtime(doc): Remove outdated agide.org link
The agide.org domain no longer hosts Vim-related tools and now points to
unrelated content. Remove the outdated reference to avoid confusion.

closes: #18916

Signed-off-by: Gourmet <110063472+ItalianG0urmet@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-13 17:42:59 +01:00
Foxe Chen
3d06113c8c patch 9.1.1975: blob2str() may call STRNCPY() with a NULL pointer
Problem:  blob2str() may call strcpy with a NULL pointer
Solution: Check for NULL before calling STRNCPY()

closes: #18907

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-12 08:52:07 +01:00
zeertzjq
353103e59a patch 9.1.1974: tests: missing cleanup in Test_bwipe_during_save()
Problem:  tests: missing cleanup in Test_bwipe_during_save().
Solution: Reset &charconvert.

closes: #18908

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-12 08:47:18 +01:00
Foxe Chen
131d878aaa patch 9.1.1973: some minor problems with clipboard provider code
Problem:  some minor problems with clipboard provider code
          (after v9.1.1972)
Solution: Fix minor issues (Foxe Chen)

- allow empty register type for paste function to mean automatic
- fix internal inc_clip_provider() and dec_clip_provider() functions not
  setting the pause count correctly
- don't call paste function when yanking

closes: #18909

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-12 08:44:14 +01:00
Foxe Chen
fcd3958dcb patch 9.1.1972: No way to access the clipboard without X11/Wayland
Problem:  No way to access the clipboard without X11/Wayland.
Solution: Add the clipboard provider feature (Foxe Chen).

closes: #18781

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-11 21:13:35 +01:00
Christian Brabandt
98a0cbf05b patch 9.1.1971: crash with invalid positional argument 0 in printf()
Problem:  crash with invalid positional argument 0 in printf()
Solution: Reject positional arguments <= 0.

closes: #18898

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-11 20:51:03 +01:00
glepnir
fe1c57cd2c patch 9.1.1971: Crash when buffer gets deleted inside charconvert during save
Problem:  Crash when buffer gets deleted inside charconvert during save
Solution: Check for `b_saving` inside `can_unload_buffer()`, so we don’t try to
          unload a buffer while it’s still being saved (glepnir).

closes: #18901

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-11 20:48:43 +01:00
phanium
fa3bdc2501 patch 9.1.1970: visual end column returns wrong value after block edit
Problem:  visual end column returns wrong value after block edit
Solution: update visual end column after block insert (phanium)

fixes:  #18900
closes: #18903

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: phanium <91544758+phanen@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-11 20:39:27 +01:00
Doug Kearns
bfb9f5c40e runtime(doc): Rename NoDefaultCurrentDirectoryInExePath tag
- Add leading "$" to match other environment variable tags.
- Clarify :help $NoDefaultCurrentDirectoryInExePath.

closes: #18895

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-11 20:33:51 +01:00
zeertzjq
50325c3d59 patch 9.1.1969: Wrong cursor position after formatting with long 'formatprg'
Problem:  Wrong cursor position after formatting with long 'formatprg'.
Solution: Don't show hit-enter prompt when there are stuffed characters.

Previously a stuffed character at the hit-enter prompt will dismiss the
prompt immediately and be put in the typeahead buffer, which leads to
incorrect behavior as the typeahead buffer is processed after the stuff
buffers. Using vungetc() when KeyStuffed is TRUE can fix this problem,
but since the hit-enter prompt isn't visible anyway (and is likely not
desired here), just skip the prompt instead, which also avoids a wait
when using "wait" instead of "hit-enter" in 'messagesopt'.

fixes:  #18905
closes: #18906

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-11 20:28:48 +01:00
Christian Brabandt
44d480e0c3 patch 9.1.1968: tests: test_python3.vim leaves swapfiles behind
Problem:  tests: test_python3.vim leaves swapfiles behind
Solution: Close open buffers using :bw! instead of :close!

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-11 20:26:06 +01:00
lsq
a52b11d057 patch 9.1.1967: if_python: 64bit numbers truncated
Problem:  if_python: 64bit numbers truncated
Solution: cast python result to long long (lsq)

fixes:  #18899
closes: #18904

Signed-off-by: lsq <lsqypj@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-11 19:59:13 +01:00
Mao-Yining
e758eac336 patch 9.1.1966: MS-Windows: dark mode in gui is not supported
Problem:  MS-Windows: dark mode in gui is not supported
Solution: Inplement the 'd' flag in 'guioptions'
          (Mao-Yining).

related: #12282
closes: #18877

Co-Authored-By: LemonBoy <thatlemon@gmail.com>
Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-09 15:23:39 +01:00
Doug Kearns
927ad166a4 runtime(vim): Update base syntax, match full :help command
closes: #18833

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-09 13:40:59 +01:00
Bjoern Foersterling
ecce3497fa patch 9.1.1965: q can accidentally start recording at more prompt
Problem:  When exiting at the end of the more prompt (at the hit enter
          prompt) by hitting q the recording mode will be started.
          (Jakub Łuczyński)
Solution: Don't add the q key to the typeahead buffer
          in the function wait_return (Bjoern Foersterling)

fixes: #2589
closes: #18889

Signed-off-by: Bjoern Foersterling <bjoern.foersterling@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-09 13:27:00 +01:00
zeertzjq
e72eacceab patch 9.1.1964: Wrong display when using setline() at hit-enter prompt
Problem:  Wrong display when using setline() at hit-enter prompt
          (after 8.2.3204).
Solution: Only skip scrolling for changed lines in top area if it's
          scrolled down due to w_topline change. Also add more testing
          for what 8.2.3204 fixed (zeertzjq).

closes: #18887

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-09 13:10:12 +01:00
Yee Cheng Chin
4af6d9755c patch 9.1.1963: diff: missing diff size limit for xdiff
Problem:  diff: missing diff size limit for xdiff
Solution: Impose file size limit for internal diff (xdiff)
          (Yee Cheng Chin).

Git imposes a hard cap on file size for content that it passes to xdiff
(added to Git in dcd1742e56e, defined in xdiff-interface.h), due to
integer overflow concerns in xdiff. Vim doesn't specify such a limit
right now, which means it's possible for a user to diff a large file
(1GB+) and trigger these overflow issues.

Add the same size limit (1GB minus 1MB) to Vim and simply throws an
error when Vim encounters files larger than said limit. For now, reuse
the same error message regarding internal diff failures. There is no
need to add the same limit for external diff as it's up to each tool to
error check their input to decide what is appropriate or not.

closes: #18891

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-09 13:05:17 +01:00
Sergio Alejandro Vargas
f958d35723 runtime(julia): Update Julia runtime files
Port changes from JuliaEditorSupport/julia-vim made during 2022-2025.
Most notably:

- 88f178c Do not reset shiftwidth/expandtab at undo
- f17257a Allow else block in try/catch
- 7946ce3 Support public statements (added in Julia v1.11.0-DEV.469)

Signed-off-by: Sergio Alejandro Vargas <savargasqu+git@unal.edu.co>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-09 12:55:17 +01:00
Aaron Jacobs
98ef8433b6 runtime(rust): use textwidth=100 for the Rust recommended style
The help text here said 99 was the recommended style for the standard
library, but I can't find a citation for this anywhere. In contrast the
Rust Style Guide hosted on rust-lang.org
[says](https://doc.rust-lang.org/stable/style-guide/#indentation-and-line-width)
the maximum line width is 100, and rustfmt
[agrees](37aa2135b5/src/tools/rustfmt/src/config/options.rs (L570)).

Having the two disagree causes an annoying off-by-one error in vim: if
you configure vim to highlight too-long lines then it will occasionally
complain about a line that rustfmt refuses to fix.

closes: #18892

Signed-off-by: Aaron Jacobs <jacobsa@google.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-09 12:43:39 +01:00
Christian Brabandt
b22c145c22 runtime(doc): document change in Windows behavior for patch 9.1.1947
closes: #18886

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-09 12:36:15 +01:00
Doug Kearns
cf5c255260 patch 9.1.1962: filetype: Erlang application resource files are not recognized
Problem:  filetype: Erlang application resource files are not recognized
Solution: Add content-based filetype detection for application resource
          files matching extension '*.app' (Doug Kearns)

related: #18835
closes:  #18842

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-07 19:12:33 +01:00
zeertzjq
2b3566d89e patch 9.1.1961: :0tab behaves like :tab for :stag when 'swb' contains "newtab"
Problem:  :0tab behaves like :tab for :stag when 'switchbuf' contains
          "newtab" (after 9.1.1949).
Solution: Don't override cmod_tab if it's already non-zero (zeertzjq).

closes: #18859

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-07 19:07:37 +01:00
glepnir
7a0d0a022a patch 9.1.1960: Wrong position of info popup
Problem:  When the popup menu is displayed above the cursor and the
          selected item has no room below for the info popup,
          popup_adjust_position() places the popup in the available
          space above. The calculation added some extra lines, causing
          the popup to be misaligned.
Solution: For info popups, undo that extra spacing so the popup stays
          aligned with the selected item (glepnir)

closes: #18860

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-07 19:06:20 +01:00
glepnir
826d10296f patch 9.1.1959: Wrong wrapping of long output using :echowindow
Problem:  Outputting long strings using :echowindow wraps one character
          per line and display in reverse order (Hirohito Higashi)
Solution: Use full width for :echowindow, reset msg_col after wrapping,
          and increment lnum correctly when creating new lines (glepnir)

fixes: #18750
closes: #18874

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-07 18:48:22 +01:00
zeertzjq
2da433cff7 patch 9.1.1958: Wrong display with sign_unplace() and setline() in CursorMoved
Problem:  Wrong display when scrolling with 'scrolloff' and calling
          sign_unplace() and setline() in CursorMoved (after 8.2.3204).
Solution: Still scroll for changed lines below the top area when the top
          is scrolled down (zeertzjq)

closes: #18878

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-07 18:45:19 +01:00
Stanislaw Gruszka
b60b33a9dc patch 9.1.1957: filetype: bpftrace files are not recognized
Problem:  filetype: bpftrace files are not recognized
Solution: Detect *.bt files as btftrace filetype,
          include a btftrace filetype plugin (Stanislaw Gruszka)

closes: #18866

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-06 10:40:44 +01:00
Maxim Kim
c7c16e4130 runtime(odin): support underscore-separated numeric literals
Add support for underscore-separated numeric literals in Odin syntax
highlighting. This allows proper highlighting of numbers like 1_000_000,
0xFF_AA_BB, and 0b1010_1111 as specified in the Odin language.

>  Numerical literals are written similar to most other programming
>  languages. A useful feature in Odin is that underscores are allowed
>  for better readability: 1_000_000_000 (one billion).
>  https://odin-lang.org/docs/overview/#numbers

closes: #18852

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-06 10:36:30 +01:00
Mao-Yining
911ecdcd0e runtime(doc): fix return value in 'exists' and 'exists_compiled()'
closes: #18867

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-06 10:33:45 +01:00
Christian Brabandt
f8c550fea0 patch 9.1.1956: tests: test_sort.vim leaves swapfiles behind
Problem:  tests: test_sort.vim leaves swapfiles behind
Solution: Close open buffers using :bw! instead of :close!

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-06 10:28:33 +01:00
Yegappan Lakshmanan
04794efe12 patch 9.1.1955: sort() does not handle large numbers correctly
Problem:  sort() does not handle large numbers correctly
          (Igbanam Ogbuluijah)
Solution: Don't truncate the return value of tv_get_number_chk()
          (Yegappan Lakshmanan)

closes: #18868

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-06 10:22:07 +01:00
Yegappan Lakshmanan
f4a299700e patch 9.1.1954: Setting a byte in a blob, accepts values outside 0-255
Problem:  Setting a byte in a blob, accepts values outside 0-255
Solution: When setting a byte in a blob, check for valid values
          (Yegappan Lakshmanan)

closes: #18870

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-06 10:13:00 +01:00
Mao-Yining
d30e76389c patch 9.1.1953: gui_mch_set_titlebar_colors() is excessively called
Problem:  gui_mch_set_titlebar_colors() doesn't need to be called when
          'go+=C' is not set.
Solution: Switch the default value to false.

closes: #18872

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-06 10:04:06 +01:00
Josef Litoš
b46cbecb1d runtime(swayconfig): separate identifier groups + cleanup
- cleanup of PR for tearing and other output options
  - removed `allow_tearing` from global keywords (it's only an output option)
  - moved `...clockwise` directives from general to transform options
  - separated `icc` highlight to correctly detect and highlight paths
  - updated output bg to use the same approach as `icc` for file path
- separated all identifier-matchers into their own groups
- added support for bar identifiers

closes: #18851

Signed-off-by: Josef Litoš <54900518+litoj@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-03 21:10:02 +00:00
Josef Litoš
20d35f9eb9 runtime(i3config): highlight identifiers separately
- mapped all identifier-highlighting groups to a new group `i3ConfigIdent`
- i3config bar is now split into keyword and block matches
- support `xft:` namespace in fonts
- Update maintainer information in i3config.vim

related: #18851

Signed-off-by: Josef Litoš <54900518+litoj@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-03 21:09:19 +00:00
Christian Brabandt
23f23e611f patch 9.1.1952: tests: need better tests for tf files
Problem:  tests: need better tests for tf files
Solution: Add better filetype test for terraform/tf filetype

closes: #18339

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-03 21:01:37 +00:00
Doug Kearns
89f422df41 runtime(quarto): add missing loaded guard
closes: #18630

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-03 20:30:59 +00:00
Rob B
8d8c9074c3 runtime(python): Highlight t-strings
- Highlight t-strings
- Update comments
- Add tests

closes: #18679

Signed-off-by: Rob B <github@0x7e.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-03 20:25:41 +00:00
Doug Kearns
85fc83f849 runtime(sml): Update syntax, improve special constant matching
- Match \dE\d real literal form
- Match all string escape sequences
- Add related tests

closes: #18723

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-03 20:21:49 +00:00
D. Ben Knoble
ffc7f8c9da runtime(hog): set undo_ftplugin correctly, delete trailing whitespace
closes: #18727

Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-03 20:15:06 +00:00
zeertzjq
2c164f02c6 patch 9.1.1951: tests: Test_windows_external_cmd_in_cwd() only run in huge builds
Problem:  tests: Test_windows_external_cmd_in_cwd() is only run in huge
          builds (after 9.1.1947).
Solution: Move it to test_system.vim so that it is run in normal builds.

closes: #18853

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-03 20:10:07 +00:00
Christian Brabandt
05a56aabee patch 9.1.1950: tests: Test_tagjump.vim leaves swapfiles behind
Problem:  tests: Test_tagjump.vim leaves swapfiles behind
Solution: Close open buffers using :bw! instead of :close!

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-03 19:27:08 +00:00
Yegappan Lakshmanan
efc7509be2 patch 9.1.1949: :stag does not use 'swichtbuf' option
Problem:  :stag does not use 'swichtbuf' option, though the
          documentation states differently
          (Christian Brabandt)
Solution: Respect 'switchbuf' option (Yegappan Lakshmanan).

related: #18845
closes: #18856

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-03 19:22:13 +00:00
Peter Kenny
2d54d9934d runtime(doc): Update vim9.txt Section 1
closes: #18855

Signed-off-by: Peter Kenny <github.com@k1w1.cyou>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-03 19:13:34 +00:00
Christian Brabandt
4d87c9742a patch 9.1.1948: Windows: Vim adds current directory to search path
Problem:  Windows: Vim always adds the current directory to search path.
          This should only happen when using cmd.exe as 'shell'. For
          example, powershell won't run binaries from the current
          directory.
Solution: Only add current directory to system path, when using cmd.exe
          as 'shell'.

related: #10341
related: 083ec6d9a3

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-02 21:46:34 +00:00
Christian Brabandt
083ec6d9a3 patch 9.1.1947: [security]: Windows: Vim may execute commands from current directory
Problem:  [security]: Windows: Vim may execute commands from current
          directory (Simon Zuckerbraun)
Solution: Set the $NoDefaultCurrentDirectoryInExePath before running
          external commands.

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-g77q-xrww-p834

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-02 21:22:02 +00:00
Peter Kenny
c0f2d2f140 patch 9.1.1946: Cannot open the help in the current window
Problem:  Cannot open the help in the current window
Solution: Promote the example from tips.txt to a proper package and
          include the helpcurwin package, add tests for it
          (Peter Kenny)

closes: #18840

Signed-off-by: Peter Kenny <github.com@k1w1.cyou>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-02 20:42:53 +00:00
Christian Brabandt
397ad21268 patch 9.1.1945: tests: Test_getbufwintabinfo() leaves swapfiles behind
Problem:  tests: Test_getbufwintabinfo() leaves swapfiles behind
Solution: Close all open buffers using %bw!

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-02 19:59:54 +00:00
Hirohito Higashi
a04ab5f04c patch 9.1.1944: getwininfo() does not return if statusline is visible
Problem:  gewininfo() does not return if statusline is visible
Solution: Add status_height to the dict items returned by
          getwininfo() (Hirohito Higashi)

closes: #18841

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-02 19:58:01 +00:00
Christian Brabandt
c3cfdefdee runtime(doc): clarify the use of v:errormsg
fixes: #18825

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-01 20:02:10 +00:00
zeertzjq
a474de64df patch 9.1.1943: Memory leak with :breakadd expr
Problem:  Memory leak with :breakadd expr
Solution: Free debug_oldval and debug_newval before assigning to them.
          Verify the existing (though confusing) :breakadd expr behavior
          (zeertzjq).

It seems that :breakadd expr doesn't work as documented at all. This PR
only fixes the memory leak. The tests are for the existing behavior.

closes: #18844

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-01 19:43:05 +00:00
CatsDeservePets
cce452f52d runtime(lf): update syntax to support lf version r39
closes: #18846

Signed-off-by: CatsDeservePets <145048791+CatsDeservePets@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-01 18:49:24 +00:00
Doug Kearns
a4c43a6cf5 runtime(vim): Update base syntax, match full :language command
closes: #18808

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-30 15:44:36 +00:00
Doug Kearns
e5c5378cd2 patch 9.1.1942: Vim9: Assignment to read-only registers @: and @% is allowed
Problem:  Assignment to read-only registers @: and @% is allowed during
          compilation.
Solution: Abort compilation and emit an E354 error when assigning to
          these registers (Doug Kearns).

Fix the E354 error emitted when attempting to declare @: with :var so
that it references the correct register, @:,  rather than the garbage
string "^@".

closes: #18806

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-30 15:26:22 +00:00
Christian Brabandt
791478b30a patch 9.1.1941: tests: Test_execute_register() leaves swapfile behind
Problem:  tests: Test_execute_register() leaves swapfile behind
Solution: Use :bw instead of :close to close the buffer completely

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-30 15:22:40 +00:00
Corey Hickey
aa133f8b3e patch 9.1.1940: clipboard registers "+" and "*" synced without "autoselect"
Problem:  clipboard registers "+" and "*" synced without "autoselect"
Solution: Remove code that explicitly syncs those clipboard registers
          (Corey Hickey)

Before this change, writes to '+' get copied to '*', but only under
certain conditions. By default, this does not happen, because clipboard
"autoselect" (via :set clipboard+=autoselect) is enabled. Disabling
"autoselect" (an option which should only apply to visual mode) results
in normal-mode writes such as "+yy also going to the '*' register.

This behavior is undocumented and untested; remove the behavior in order
to make Vim's handling of these two registers be consistent.

This frees up the did_star variable to be removed.

Add a test to check that the registers are independent.

fixes: #18830
closes: #18831

Signed-off-by: Corey Hickey <bugfood-c@fatooh.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-30 15:16:16 +00:00
Christian Brabandt
6e9694df10 patch 9.1.1939: tests: test_matchfuzzy() leaves swapfiles behind
Problem:  tests: test_matchfuzzy() leaves swapfiles behind
Solution: Close loaded buffers using "%bw"

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-30 15:09:53 +00:00
Corey Hickey
d4f9de889b patch 9.1.1938: tests: excessive wait in Test_matchfuzzy_initialized
Problem:  tests: excessive wait in Test_matchfuzzy_initialized
Solution: Use term_wait() instead of the TermWait() wrapper
          (Corey Hickey)

Test_matchfuzzy_initialized is a terminal test, which are specified to be
"flaky" and automatically retried. The TermWait wrapper multiplies the
specified wait time by higher values for later retries, maxing out at
10x the specified value. This makes tries #3 to #6 sleep for 20 seconds
each, which makes the test very slow to work with. The specified intent
of the test (as noted in a comment eight lines above here) is to
sleep for 2s.

closes: #18822

Signed-off-by: Corey Hickey <bugfood-c@fatooh.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-30 15:07:40 +00:00
Corey Hickey
a3925d783a patch 9.1.1937: tests: Test_matchfuzzy_initialized() fails
Problem:  tests: Test_matchfuzzy_initialized() fails
Solution: Send a dummy key (Corey Hickey)

Test_matchfuzzy_initialized seems to expect that the 'lvimgrep' will be
interrupted by sending a SIGINT. If the search finishes beforehand,
though, then the SIGINT triggers vim to tell the user how to quit.

Vim does not show this message immediately, though; instead, vim shows
the message next time it is active. When StopVimInTerminal() sends a key
sequence intended to cause vim to quit, this activates vim to show the
message instead of quitting.

I do not understand every detail of the problem fully--if I type the
characters from StopVimInTerminal() into a post-SIGTERM terminal
directly, that seems to work ok; there seems to be a timing issue due to
sending all the characters at once.

This fix does make the test work reliably for me, and the test still
works even if I limit my CPU frequency so that the search is interrupted
by the SIGINT.

fixes: #18821
related: #18822

Signed-off-by: Corey Hickey <bugfood-c@fatooh.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-30 15:02:39 +00:00
Jon Parise
b087c5452b patch 9.1.1936: filetype: Erlang lexical files are not recognized
Problem:  filetype: Erlang lexical files are not recognized
Solution: Detect *.xrl files as leex filetype, include syntax and
          filetype plugins (Jon Parise).

leex is the lexical analyzer generator for Erlang. Its input file format
follows a section-based structure and uses the `.xrl` file extension.

This initial work includes file detection, an ftplugin (which inherits
the Erlang configuration), and a syntax definition.

Reference:
-  https://www.erlang.org/doc/apps/parsetools/leex.html

related: #18819
closes: #18832

Signed-off-by: Jon Parise <jon@indelible.org>
Signed-off-by: Csaba Hoch <csaba.hoch@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-30 14:45:48 +00:00
Jon Parise
2b2580e61a patch 9.1.1935: filetype: not all Erlang files are recognized
Problem:  filetype: not all Erlang files are recognized
Solution: Detect *.app.src and rebar.config files as erlang filetype
          (John Parise).

*.app.src files contain Erlang application definitions. (There are also
*.app files, which are similar but more often build artifacts, and that
file extension is too ambiguous to be recognized by default.)

Reference:
- https://www.erlang.org/doc/system/applications.html

Rebar is the Erlang build tool. rebar.config uses Erlang syntax.

Reference:
- https://rebar3.org/docs/configuration/configuration/

closes: #18835

Signed-off-by: Jon Parise <jon@indelible.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-30 10:02:45 +00:00
Peter Kenny
8b9b422111 runtime(doc): Update and clarify vim9.txt Section 3
closes: #18779

Signed-off-by: Peter Kenny <github.com@k1w1.cyou>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-30 09:40:04 +00:00
Doug Kearns
49f731d243 runtime(doc): Improve :help :catch command specification
The pattern argument is optional.  See :help :sort for another example.

closes: #18834

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-30 09:23:16 +00:00
Christian Brabandt
ab090993ad runtime(netrw): fix undefined variable curwin in s:NetrwMenu()
fixes: #18829

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-28 22:37:06 +00:00
Bruno Belanyi
3ba6a97fea patch 9.1.1934: filetype: not all starlark files are recognized
Problem:  filetype: not all starlark files are recognized
Solution: Detect *.sky files as starlark filetype (Bruno Belanyi)

References:
- https://docs.bazel.build/versions/0.17.1/skylark/spec.html

closes: #18807

Signed-off-by: Bruno Belanyi <bruno@belanyi.fr>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-28 20:48:55 +00:00
Rochish Manda
4bb44b287c runtime(doc): Change termdebug_config debug value to v:true in terminal.txt
closes: #18820

Signed-off-by: Rochish Manda <28740792+Rochish-Manda@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-28 20:42:13 +00:00
Shin Rag
afd46fd9c9 runtime(doc): Correct typo in usr_30.txt regarding softtabstop
Fix typo in explanation of softtabstop and shiftwidth.

closes: #18823

Signed-off-by: Shin Rag <62047911+aquanjsw@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-28 20:37:16 +00:00
Mao-Yining
7f60105cba runtime(doc): fix typo in "appendbufline()", builtin.txt
closes: #18824

Signed-off-by: Mao-Yining <101858210+mao-yining@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-28 20:34:38 +00:00
C.D. MacEachern
bc1a82245c runtime(defaults): Update comment for reverting C comment strings
Add `g:` prefix, so the example works in vim9script as well (errors
without it).

closes: #18827

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: C.D. MacEachern <craig.daniel.maceachern@gmail.com>
2025-11-28 20:25:41 +00:00
Paul Ollis
9ade3f5894 runtime(doc): Clarification in listener_add() doc
Make it clear that the overall end value can be greater than
line('$') + 1.

fixes: #18664
closes: #18828

Signed-off-by: Paul Ollis <paul@cleversheep.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-28 20:21:29 +00:00
Girish Palya
cbcbff8712 patch 9.1.1933: completion: complete_match() is not useful
Problem:  completion: complete_match() Vim script function and
          'isexpand' option are not that useful and confusing
          (after v9.1.1341)
Solution: Remove function and option and clean up code and documentation
          (Girish Palya).

complete_match() and 'isexpand' add no real functionality to Vim. They
duplicate what `strridx()` already does, yet pretend to be part of the
completion system. They have nothing to do with the completion mechanism.

* `f_complete_match()` in `insexpand.c` does not call any completion code.
   It’s just a `STRNCMP()` wrapper with fluff logic.
* `'isexpand'` exists only as a proxy argument to that function.
   It does nothing on its own and amounts to misuse of a new option.

The following Vim script function can be used to implement the same
functionality:

```vim
  func CompleteMatch(triggers, sep=',')
    let line = getline('.')->strpart(0, col('.') - 1)
    let result = []
    for trig in split(a:triggers, a:sep)
      let idx = strridx(line, trig)
      if l:idx >= 0
        call add(result, [idx + 1, trig])
      endif
    endfor
    return result
  endfunc
```

related: #16716
fixes: #18563
closes: #18790

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-27 21:28:05 +00:00
Foxe Chen
c531501748 patch 9.1.1932: OSC terminal response hard to detect
Problem:  OSC terminal response hard to detect
Solution: Add the <OSC> and <xOSC> pseudo keys
          (Foxe Chen).

related: #18660
closes: #18799

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-27 20:53:36 +00:00
zeertzjq
b217ffbef2 runtime(doc): remove outdated help about 'completeopt' "fuzzy"
closes: #18815

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-27 20:27:13 +00:00
Christian Brabandt
1b51fd5eb5 translation: regenerate po/vim.pot after v9.1.1930
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-27 20:25:22 +00:00
Girish Palya
057ea1232a patch 9.1.1931: completion: wrong item selected with fuzzy and noinsert
Problem:  completion: wrong item selected with fuzzy and noinsert
          (Evgeni Chasnovski)
Solution: Reset selected item after fuzzy sort
          (Girish Palya)

fixes: #18802
closes: #18816

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-27 20:20:38 +00:00
Girish Palya
33fbfe003c patch 9.1.1930: completion: 'completefuzzycollect' is too obscure
Problem:  completion: 'completefuzzycollect' option is too obscure
Solution: Deprecate the option, but don't error out for existing scripts,
          behave like 'completefuzzycollect' is set when fuzzy
          completion is enabled (Girish Palya).

fixes: #18498
closes: #18788

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-26 21:00:16 +00:00
Robertus Chris
25a736e323 runtime(i3config/swayconfig): add all option for i3config only
Since i3 version 4.24, popup_during_fullscreen has new
option `all`. So add the `all` option for popup_during_fullscreen to
prevent `all` option highlighted as error.

However, sway won't implement `all` option for popup_during_fullscreen,
so let's remove the extra options from the syntax cluster in swayconfig
syntax script after sourcing the i3config.

Reference:
- https://i3wm.org/docs/userguide.html#_popups_during_fullscreen_mode
- https://github.com/swaywm/sway/issues/8746

closes: #18760

Signed-off-by: Robertus Chris <robertusdchris@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-26 20:37:09 +00:00
Maxim Kim
0e1ab0adb8 patch 9.1.1929: completion: spell completion wrong with fuzzy
Problem:  completion: spell completion wrong with fuzzy
Solution: Disable fuzzy sort for spell completion
          (Maxim Kim)

fixes #18800
closes: #18809

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-26 20:23:44 +00:00
Brent Pappas
712b650332 runtime(doc): Fix typo in "Jumping to Changes", usr_08.txt
- Change "Prepended" (past tense) to "Prepend" (present tense,
  imperative).
- Add short examples clarifying the behavior of prepending a count to
  commands that jump to changes in diff mode.

closes: #18810

Signed-off-by: Brent Pappas <pappasbrent@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-26 20:12:28 +00:00
Foxe Chen
ef8588f8ea CI: retire socketserver runner
closes: #18811

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-26 20:06:03 +00:00
Stefan Haubenthal
40699e3990 patch 9.1.1928: xxd: exit_with_usage() can be simplified
Problem:  xxd: exit_with_usage() can be simplified
Solution: Clean up exit_with_usage() formatting slightly
          (Stefan Haubenthal)

closes: #18813

Signed-off-by: Stefan Haubenthal <polluks@sdf.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-26 20:02:16 +00:00
Foxe Chen
efa3b1f86d patch 9.1.1927: Wayland: clipboard code too complex
Problem:  Wayland: clipboard code too complex
Solution: Simplify clipboard related code around W23/W24
          (Foxe Chen).

Improve Wayland and clipboard related code:

- improve documentation
- remove unused code
- fix error handling
- remove warning per Clipboard_T

closes: #18794

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-25 22:04:58 +00:00
dependabot[bot]
c11fbe51e6 CI: Bump actions/checkout from 5 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

closes: #18803

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-25 21:50:30 +00:00
Philip H.
23d4e496f6 Update link to XDG base specification in option.c comment
closes: #18789

Co-authored-by: dkearns <dougkearns@gmail.com>
Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-23 19:35:12 +00:00
Alex Plate
2190036c8c runtime(doc): Add environment variable expansion note to options
Add "Environment variables are expanded |:set_env|" documentation to
options that have the P_EXPAND flag but were missing this note.

Updated options:
- 'cdpath'
- 'dictionary'
- 'mkspellmem'
- 'packpath'
- 'runtimepath'
- 'spellfile'
- 'spellsuggest'
- 'thesaurus'
- 'ttytype'
- 'undodir'
- 'verbosefile'
- 'viewdir'
- 'viminfofile'

These options support environment variable expansion in their values
(e.g., $HOME, $USER) but the documentation didn't explicitly mention
this capability. This brings their documentation in line with other
options like backupdir, directory, and makeprg that already include
this note.

closes: #18791

Signed-off-by: Alex Plate <AlexPl292@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-23 19:30:19 +00:00
Yee Cheng Chin
cf7c0038a4 patch 9.1.1926: xdiff: Coverity warning with MAX_CNT/UINT_MAX usage
Problem:  xdiff: Coverity warning with MAX_CNT/UINT_MAX usage
          (after v9.1.1921)
Solution: Replace XDL_MIN macro to a manual check.
          (Yee Cheng Chin)

In the recent xdiff upstream sync (#18765), MAX_CNT in xhistogram was
switched back to using UINT_MAX to match upstream. This exposed an issue
in xdiff that using using min() to compare against the max integer will
not work as the number will just overflow. Switch the check to be done
in a saturating add that respects integer overflow.

related: #18765
closes: #18792

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-23 19:24:10 +00:00
zeertzjq
898ac80be6 runtime(new-tutor): update vim-02-beginner following 48940d9
closes: #18793

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-23 19:19:35 +00:00
Hirohito Higashi
24af3eca68 patch 9.1.1925: make depend does not include osdef.h
Problem:  make depend does not add osdef.h for the dependencies
          (Drew Vogel)
Solution: Move ifdef PROTO (Hirohito Higashi).

fixes: #18777
closes: #18796

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-23 18:43:25 +00:00
Victorhck
48940d94f6 runtime(tutor): Improve style for chapter 2
closes: #18786

Signed-off-by: Victorhck <victorhck@mailbox.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-21 18:46:27 +00:00
Victorhck
58fafb6549 runtime(tutor): Add Spanish translation for chapter 2
related: #18786

Signed-off-by: Victorhck <victorhck@mailbox.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-21 18:45:21 +00:00
Victorhck
9cd512c7f5 runtime(tutor): Improve Spanish translation of chapter 1
related: #18786

Signed-off-by: Victorhck <victorhck@mailbox.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-21 18:43:43 +00:00
Doug Kearns
ea14bb7df9 runtime(haskell): Add syntax test
Add a test for issue #18776 (allow spaces in backticked operators).

closes: #18783

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-21 18:22:37 +00:00
Doug Kearns
8da886269a runtime(vim): Update base syntax, match full :history command
closes: #18784

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-21 18:18:51 +00:00
Doug Kearns
e5ab63a066 CI: Fix triage labelling of maintainer runtime files
A directory name alone does not generate matches for its contents.

closes: #18785

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-21 18:16:15 +00:00
Doug Kearns
a08030c9f7 patch 9.1.1924: 'commentstring' requires +folding feature
Problem:  'commentstring' requires the +folding feature but is used in
	  contexts other than folding.
Solution: Remove the +folding feature guards from 'commentstring' and
          make it available in all builds (Doug Kearns).

closes: #18731

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-20 21:16:48 +00:00
Doug Kearns
2447131e00 patch 9.1.1923: wrong error when assigning to read-only register
Problem:  When assigning to @. in a :let command an incorrect "E15"
          error is emitted.
Solution: Emit the correct "E354" error. (Doug Kearns).

An incorrect "E488" error was also emitted in Vim9 script assignments.

It appears that the code deleted in this commit was added to work around
a limitation in the returned value from find_name_end() that no longer
exists.

See commit 76b92b2830 (tag: v7.0b).

closes: #18757

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-20 20:59:10 +00:00
Doug Kearns
ea86e53c2b runtime(vim): Update base syntax, match :debug and :break* commands
Match full :debug, :breakadd, :breakdel and :breaklist commands.

closes: #18748

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-20 20:57:15 +00:00
Konfekt
74b4f9242e runtime(compiler): set errorformat where missing
As a matter of caution it sets it to the default gcc errorformat:

```
errorformat=%*[^"]"%f"%*\D%l: %m,"%f"%*\D%l: %m,%-Gg%\?make[%*\d]: *** [%f:%l:%m,%-Gg%\?make: *** [%f:%l:%m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%-GIn file included from %f:%l:%c:,%-GIn file included from %f:%l:%c\,,%-GIn file included from %f:%l:%c,%-GIn file included from %f:%l,%-G%*[ ]from %f:%l:%c,%-G%*[ ]from %f:%l:,%-G%*[ ]from %f:%l\,,%-G%*[ ]from %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,"%f"\, line %l%*\D%c%*[^ ] %m,%D%*\a[%*\d]: Entering directory %*[`']%f',%X%*\a[%*\d]: Leaving directory %*[`']%f',%D%*\a: Entering directory %*[`']%f',%X%*\a: Leaving directory %*[`']%f',%DMaking %*\a in %f,%f|%l| %m
```

so that the compiler keeps working after switching to others.

While likely only a subset is needed; such a subset has been proposed in
a commented errorformat;

checked to work for yamllint but ran out of steam for other compilers;

closes: #18754

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-20 20:54:31 +00:00
John Wellesz
d1288503aa runtime(php): Update indent script to 1.76 (from 1.75)
fixes: #18739 (editor hang on mixed syntax style)
closes: #18758

Signed-off-by: John Wellesz <john.wellesz@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-20 20:50:54 +00:00
Mirek Kratochvil
ddb88ab796 runtime(haskell): allow spaces in backticked operators in syntax script
This formatting (although rare) is actually accepted by GHC, but vim
does not highlight it. This patch adds the simplest possible regex to
support the behavior.

Inconveniently, this might trigger weird formatting on lines that
contain errors, e.g. if the first backtick is removed from:

    a `b` c `d` e

then `c` is going to be marked as an operator, which seems weird but is
valid.

closes: #18776

Signed-off-by: Mirek Kratochvil <exa.exa@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-20 20:47:01 +00:00
zeertzjq
d434f6c2a5 patch 9.1.1922: Wrong virtcol('$') with virtual text at EOL
Problem:  Wrong virtcol('$') with virtual text at EOL (rickhowe).
Solution: Also add 1 to end virtcol when there is virtual text.
          (zeertzjq)

fixes: #18761
closes: #18762

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-20 20:35:12 +00:00
Yee Cheng Chin
6aac706232 patch 9.1.1921: xdiff: included xdiff code is outdated
Problem:  xdiff: included xdiff code is outdated because it is based on
          git 2.40.0
Solution: Sync with xdiff from git 2.52 (Yee Cheng Chin).

Git [v2.52](https://github.com/git/git/releases/tag/v2.52.0) has just been
released. Merge from upstream to get the latest version of xdiff. Vim's xdiff
was last updated in #12181 (Patch v9.0.1418) from Git v2.33 to v2.40.

I have refined the strategy for merging from upstream a bit compared to last
time. I use the following commands to create an orphaned branch that extracts
the before/after xdiff source code from the Git codebase, and then perform a
subtree merge. The commits in the orphaned branch are reproducible
deterministically so a reviewer can reproduce the steps and it should result in
identical commit hashes (63264f229d and d741f0e230). The commands are as
follows (you could run in a separate Vim repo to keep things clean):

```bash
git remote add --no-tags git https://github.com/git/git.git
git fetch git

git switch --orphan xdiff-orig
git read-tree --reset -u 73876f4861:xdiff/  # Git v2.40.0
git rm -f xmerge.c                          # Vim doesn't use xmerge
(GIT_COMMITTER_NAME="dummy" GIT_COMMITTER_EMAIL="dummy" GIT_COMMITTER_DATE="1600000000 +0000" \
  git commit --no-gpg-sign --reuse-message=73876f4861)

git switch -c xdiff-new
git read-tree --reset -u 9a2fb147f2:xdiff/  # Git v2.52.0
git rm -f xmerge.c
(GIT_COMMITTER_NAME="dummy" GIT_COMMITTER_EMAIL="dummy" GIT_COMMITTER_DATE="1600000000 +0000" \
  git commit --no-gpg-sign --reuse-message=9a2fb147f2)

git switch master
git switch -c xdiff-upstream-v2.52.0
git merge -s ours --no-edit --allow-unrelated-histories xdiff-orig
git merge -Xsubtree=xdiff xdiff-new
```

The commit graph looks like so:

```
* a005e268bd 2025-11-17 17:11:26 Yee Cheng Chin (HEAD -> xdiff-upstream-v2.52.0) Update xdiff README
*   d353c6f2c8 2025-11-17 16:26:15 Yee Cheng Chin Merge branch 'xdiff-new' into xdiff-upstream-v2.52.0
|\
| * d741f0e230 2025-11-17 07:35:33 Junio C Hamano (xdiff-new) Git 2.52
* | c4f8b15dd9 2025-11-17 16:22:30 Yee Cheng Chin Merge branch 'xdiff-orig' into xdiff-upstream-v2.52.0
|\|
| * 63264f229d 2023-03-12 14:34:41 Junio C Hamano (xdiff-orig) Git 2.40
* 6437997d83 2025-11-16 18:30:42 Girish Palya   (tag: v9.1.1918, origin/master, origin/HEAD, master) patch 9.1.1918: completion: crash with fuzzy completion
```

For reviewing I recommend using the following commands which simplifies the diff to only what we care about:
- `git show --remerge-diff d353c6f2c8`: This shows how my merge actually
  resolved the merge conflicts.
- `vimdiff <(git diff-tree -U0 63264f229d master:src/xdiff/) \
   <(git diff-tree -U0 d741f0e230 xdiff-upstream-v2.52.0:src/xdiff) \
   -c "silent windo %s/^index.*/index/" \
   -c "silent windo %s/^@@ [-+, 0-9]* @@/@@/"`:
This shows how the patch (downstream changes done in Vim on top of Git) has
changed. Note that some local changes for fixing compiler warnings are now gone
because they are fixed upstream.

- d39e28e68c
  added a dependency (`signed_add_overflows`) to Git code base. I replaced it
  with a custom one since it's not hard to implement.
- Upstream had fixed a lot of compiler warnings with signed/unsigned integers,
  so the compiler warning fixes that were done in Vim downstream were removed.
- Replace new `BUG()` calls with `xdl_bug()` where we use Vim's assertion
  mechanisms instead.

- Performance improvement due to optimizations in the line hashing function
  (41d97837ab and
   a4bbe8af0b).
  - From personal unscientific testing (Apple M1 Max, macOS 15), when using the
    new xdiff, for simple/normal diff's this could result in **11%/29%** overall
    diff speed improvement. For larger more pathologically complicated diff this
    results in a more modest **4%/7%** improvement.
  - The two improvement numbers above are for compiling Vim with `-O3 -flto` vs
    `-O2`. The more optimized version of Vim results in lower performance
    improvement as it was already doing inlining via link-time-optimization
    before.
  - Just for reference, the command I used to test this was the following (use
    either test case and comment out the other one):
    ```bash
    # Simple/normal diff test case
    (COMMIT=0d9160e11ce; git show ${COMMIT}:src/diff.c > test1.txt; git show ${COMMIT}~:src/diff.c > test2.txt)
    # Larger diff test case
    (COMMIT=9670f61d468; git show ${COMMIT}:src/auto/configure > test1.txt; git show ${COMMIT}~:src/auto/configure > test2.txt)

    # Build Vim with old/new xdiff, then copy ./src/vim to ./src/vim_orig / ./src/vim_new respectively.
    hyperfine --warmup 4 --runs 20 -L vimcmd vim_orig,vim_new \
        "./src/{vimcmd} -u NONE -U NONE -es -V1 -c \"let g:f1=readfile('test1.txt')\" -c \"let g:f2=readfile('test2.txt')\" -c \"for i in range(1,200) | call diff(g:f1, g:f2) | endfor\" -c 'q'"
    ```

closes: #18765

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-20 20:21:49 +00:00
zeertzjq
eb33c2eb28 patch 9.1.1920: tests: not enough testing for wildtrigger() pum redrawing
Problem:  tests: not enough testing for wildtrigger() pum redrawing.
Solution: Also test redrawing when leaving cmdline mode (zeertzjq).

closes: #18773

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-20 19:52:18 +00:00
Philip H.
55c65c3e40 CI: Switch to macOS 26 runner
closes: #18775

Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-20 19:50:00 +00:00
Harry
7fe4b8c1bd runtime(c): Update signal constants in syntax script
closes: #18763

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Harry <166658338+harrystevens4@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-18 20:50:39 +00:00
Hirohito Higashi
ed4af756c2 patch 9.1.1919: tabpanel: cannot handle mouse clicks in command line
Problem:  tabpanel: cannot handle mouse clicks in command line
          (char101, after v9.1.1898)
Solution: Update the condition that checks if the mouse pointer is on
          the command line (Hirohito Higashi)

closes: #18771

Co-authored-by: Charles <char101@ui.ac.id>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-18 20:10:14 +00:00
Miguel Barro
040a47a470 runtime(netrw): Use proper UNC notation for temp files
closes: #18764

Signed-off-by: Guybrush <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-18 20:06:06 +00:00
Konfekt
c2cc63ec7d runtime(compiler): expand errorformats in maven compiler
matches malformed POM error messages and tries to catch other tools
as well.

closes: #18768

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-18 19:49:01 +00:00
Doug Kearns
d284277be9 runtime(doc): Remove :runtime completion (#11447) todo item
This was fixed in commit a6759381a5.

closes: #18769

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-18 19:44:16 +00:00
Girish Palya
6437997d83 patch 9.1.1918: completion: crash with fuzzy completion
Problem:  completion: crash with fuzzy completion
          (Christian Brabandt)
Solution: When completion candidates are gathered from a different
          window, and when completing `<c-p>`, linked list should be
          sorted only after all items are collected (Girish Palya).

fixes: #18752
closes: #18756

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-16 18:30:42 +00:00
Antonio Giovanni Colombo
4b4a893614 translation(it): Update Italian translation
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-16 17:31:43 +00:00
Yegappan Lakshmanan
a650485ed5 patch 9.1.1917: Vim9: incorrect type inference with mkdir()
Problem:  Vim9: incorrect type inference with mkdir()
          (dezza)
Solution: Before compiling a RHS expression in an assignment, save the
          new local variable contents (Yegappan Lakshmanan)

fixes: #18751
closes: #18751

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-15 17:41:28 +00:00
Christian Brabandt
61b73b89a3 patch 9.1.1916: WinEnter autocommand confuses Vim when closing tabpage
Problem:  WinEnter autocommand may confuse Vim when closing tabpage
          (hokorobi)
Solution: Verify that curwin did not change in close_others()

fixes: #18722
closes: #18733

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-15 17:32:50 +00:00
Konfekt
fb8ebf1ee0 runtime(compiler): Remove version check in rustc compiler
closes: #18347

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-15 17:18:41 +00:00
Konfekt
d0dd5614db runtime(compiler): add biome linter
closes: #18685

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-15 10:39:57 +00:00
Doug Kearns
f46616f0c4 runtime(vim): Update base syntax and generator, match :cd commands
Match :cd commands explicitly.

fixes: #17964
closes: #18736

Reported by Maxim Kim.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-15 10:17:17 +00:00
Doug Kearns
de7049ede1 patch 9.1.1915: :breaklist accepts unprocessed arguments.
Problem:  :breaklist accepts unprocessed arguments.
Solution: Remove EX_EXTRA flag from the Ex command definition.
          (Doug Kearns)

The command should emit an "E488: Trailing characters" error rather than
silently accept arguments.

closes: #18746

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-15 10:13:25 +00:00
Andrey Starodubtsev
d5821638e2 runtime(new-tutor): escape tutor filename
If Vim is installed into the Windows "Program Files" directory the tutor
path name contains spaces and must therefore be quoted before passing to
:drop.

closes: #18742

Signed-off-by: Andrey Starodubtsev <andrey.starodubtsev@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-13 21:49:20 +00:00
Christian Brabandt
384685fade patch 9.1.1914: runtime(netrw): wipes unnamed buffers
Problem:  runtime(netrw): LocalBrowseCheck() wipes unnamed buffers when
          g:netrw_fastbrowse=0 (Carlos Falgueras García)
Solution: Check that bufname() is not empty

fixes: #18740
closes: #18741

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-13 21:11:51 +00:00
Christian Brabandt
b8119920eb patch 9.1.1913: Error message with :unlet! and non-existing dictionary item
Problem:  Error message with :unlet! and non-existing dictionary item
          (Coacher)
Solution: Set GLV_QUIET when using unlet with bang attribute

fixes: #18516
closes: #18734

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-13 21:06:43 +00:00
Doug Kearns
eb732ed26d runtime(doc): Wrap overlength lines in uganda.txt
Wrap overlength lines and normalise URL indentation.

closes: #18737

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-13 21:01:42 +00:00
Doug Kearns
8644c3b7e6 runtime(help): Update syntax, match tables at :help :digraph-table
Match the digraph tables to avoid false positive matches for helpSpecial
etc.  No syntax groups should match in these tables.

closes: #18738

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-13 20:59:44 +00:00
Christian Brabandt
8cb4505ec6 patch 9.1.1912: tests: test_plugin_comment fails
Problem:  tests: test_plugin_comment fails, because it depends on nroff
          filetype for .mom file (after v9.1.1909)
Solution: Explicitly set filetype to nroff

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-12 21:34:52 +00:00
Christian Brabandt
c44e5ae529 patch 9.1.1911: build failure on Solaris with gcc 5
Problem:  build failure on Solaris Sparc with gcc 5
          (idgn23, after v9.1.1736)
Solution: Correctly initialize the key_name variable.

fixes: #18693

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-12 20:04:18 +00:00
Aliaksei Budavei
d667946928 patch 9.1.1910: tests: test failures in Test_term_gettitle() in CI
Problem:  tests: test failures in Test_term_gettitle() in CI
Solution: CI: Allow for title buffering in Test_term_gettitle()
          (Aliaksei Budavei)

closes: #18693

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-12 19:49:00 +00:00
Callum Andrew
23e12c0b7e patch 9.1.1909: filetype: .mom files recognized as nroff files
Problem:  filetype: .mom files recognized as nroff files
Solution: Detect *.mom files as groff filetype instead
          (Callum Andrew)

Reference:
- mom macros are written specifically for groff:
  https://www.schaffter.ca/mom/

closes: #18718

Signed-off-by: Callum Andrew <dev@candrew.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-12 19:45:41 +00:00
Vadim Yanitskiy
e9d296e52a runtime(erlang): recognize -if/-elif as erlangPreCondit in syntax script
The -if(Condition)/-elif(Condition) are compiler macros that evaluate
the following lines only if Condition evaluates to true.  This patch
enables syntax highlighting for these macros.

https://www.erlang.org/doc/system/macros.html#conditional-compilation

closes: #18729

Signed-off-by: Vadim Yanitskiy <fixeria@osmocom.org>
Signed-off-by: Csaba Hoch <csaba.hoch@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-12 19:36:46 +00:00
Doug Kearns
9ab6a22c90 runtime(doc): Improve :help :ls description formatting
Quote the special buffer names for consistency (see :help bufname()) and
so that they're not incorrectly highlighted as optional command
arguments.

closes: #18730

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-12 19:33:01 +00:00
Doug Kearns
4f19d2768a runtime(vim): Update base syntax, match :prompt command args
closes: #18732

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-11-12 19:17:11 +00:00
343 changed files with 15537 additions and 4530 deletions

6
.github/MAINTAINERS vendored
View File

@@ -45,6 +45,7 @@ runtime/colors/torte.vim @habamax @romainl @neutaaaaan
runtime/colors/wildcharm.vim @habamax @romainl @neutaaaaan
runtime/colors/zaibatsu.vim @habamax @romainl @neutaaaaan
runtime/colors/zellner.vim @habamax @romainl @neutaaaaan
runtime/compiler/biome.vim @Konfekt
runtime/compiler/checkstyle.vim @dkearns
runtime/compiler/cm3.vim @dkearns
runtime/compiler/cucumber.vim @tpope
@@ -129,6 +130,7 @@ runtime/ftplugin/basic.vim @dkearns
runtime/ftplugin/brighterscript.vim @ribru17
runtime/ftplugin/brightscript.vim @ribru17
runtime/ftplugin/bst.vim @tpope
runtime/ftplugin/bpftrace.vim @sgruszka
runtime/ftplugin/c3.vim @ttytm
runtime/ftplugin/cabal.vim @ribru17
runtime/ftplugin/cedar.vim @ribru17
@@ -220,6 +222,7 @@ runtime/ftplugin/kivy.vim @ribru17
runtime/ftplugin/kotlin.vim @udalov
runtime/ftplugin/lc.vim @ribru17
runtime/ftplugin/ldapconf.vim @ribru17
runtime/ftplugin/leex.vim @jparise
runtime/ftplugin/leo.vim @ribru17
runtime/ftplugin/less.vim @genoma
runtime/ftplugin/lex.vim @ribru17
@@ -376,6 +379,7 @@ runtime/indent/kdl.vim @imsnif @jiangyinzuo
runtime/indent/kotlin.vim @udalov
runtime/indent/krl.vim @KnoP-01
runtime/indent/ld.vim @dkearns
runtime/indent/lf.vim @andis-sprinkis
runtime/indent/less.vim @genoma
runtime/indent/liquid.vim @tpope
runtime/indent/lua.vim @marcuscf
@@ -450,6 +454,7 @@ runtime/syntax/asy.vim @avidseeker
runtime/syntax/autohotkey.vim @mmikeww
runtime/syntax/awk.vim @dkearns
runtime/syntax/basic.vim @dkearns
runtime/syntax/bpftrace.vim @sgruszka
runtime/syntax/bst.vim @tpope
runtime/syntax/bzl.vim @dbarnett
runtime/syntax/bzr.vim @hdima
@@ -549,6 +554,7 @@ runtime/syntax/kivy.vim @prophittcorey
runtime/syntax/kotlin.vim @udalov
runtime/syntax/kdl.vim @imsnif @jiangyinzuo
runtime/syntax/krl.vim @KnoP-01
runtime/syntax/leex.vim @jparise
runtime/syntax/less.vim @genoma
runtime/syntax/lf.vim @andis-sprinkis
runtime/syntax/liquid.vim @tpope

9
.github/labeler.yml vendored
View File

@@ -128,9 +128,12 @@ runtime:
- all:
- changed-files:
- any-glob-to-any-file:
- 'runtime/ftplugin'
- 'runtime/syntax'
- 'runtime/indent'
- 'runtime/autoload/**/*.vim'
- 'runtime/colors/**/*.vim'
- 'runtime/compiler/**/*.vim'
- 'runtime/ftplugin/**/*.vim'
- 'runtime/indent/**/*.vim'
- 'runtime/syntax/**/*.vim'
- 'runtime/pack/dist/opt/termdebug/plugin/termdebug.vim'
termdebug:

View File

@@ -87,14 +87,11 @@ jobs:
extra: [vimtags, proto]
- features: huge
compiler: gcc
extra: [no_x11]
- features: huge
compiler: gcc
extra: [socketserver]
extra: [no_x11_wl]
steps:
- name: Checkout repository from github
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: Check Filelist (for packaging)
run: |
@@ -245,11 +242,8 @@ jobs:
;;
esac
if ${{ contains(matrix.extra, 'no_x11') }}; then
CONFOPT="${CONFOPT} --without-x --disable-gui"
fi
if ${{ contains(matrix.extra, 'socketserver') }}; then
CONFOPT="${CONFOPT} --enable-socketserver"
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"
@@ -406,11 +400,11 @@ jobs:
fail-fast: false
matrix:
features: [tiny, normal, huge]
runner: [macos-15-intel, macos-15]
runner: [macos-15-intel, macos-26]
steps:
- name: Checkout repository from github
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: Install packages
if: matrix.features == 'huge'
@@ -594,7 +588,7 @@ jobs:
release: false
- name: Checkout repository from github
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: Create a list of download URLs
shell: cmd
@@ -607,7 +601,7 @@ jobs:
echo %GETTEXT64_URL%>> urls.txt
- name: Cache downloaded files
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: downloads
key: ${{ runner.os }}-${{ matrix.arch }}-${{ hashFiles('urls.txt') }}

View File

@@ -44,7 +44,7 @@ jobs:
steps:
- name: Checkout repository from github
uses: actions/checkout@v5
uses: actions/checkout@v6
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL

View File

@@ -19,7 +19,7 @@ jobs:
steps:
- name: Checkout repository from github
if: env.TOKEN
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: Download Coverity
if: env.TOKEN

View File

@@ -8,7 +8,7 @@ jobs:
lychee:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: Run Lychee
uses: lycheeverse/lychee-action@v2
with:

View File

@@ -829,6 +829,10 @@ RT_ALL = \
runtime/pack/dist/opt/editorconfig/doc/editorconfig.txt \
runtime/pack/dist/opt/editorconfig/ftdetect/editorconfig.vim \
runtime/pack/dist/opt/editorconfig/plugin/editorconfig.vim \
runtime/pack/dist/opt/helpcurwin/autoload/helpcurwin.vim \
runtime/pack/dist/opt/helpcurwin/doc/helpcurwin.txt \
runtime/pack/dist/opt/helpcurwin/doc/tags \
runtime/pack/dist/opt/helpcurwin/plugin/helpcurwin.vim \
runtime/pack/dist/opt/helptoc/autoload/helptoc.vim \
runtime/pack/dist/opt/helptoc/doc/helptoc.txt \
runtime/pack/dist/opt/helptoc/doc/tags \
@@ -852,7 +856,11 @@ RT_ALL = \
runtime/pack/dist/opt/netrw/autoload/netrw_gitignore.vim \
runtime/pack/dist/opt/netrw/doc/netrw.txt \
runtime/pack/dist/opt/netrw/plugin/netrwPlugin.vim \
runtime/pack/dist/opt/netrw/syntax/netrw.vim
runtime/pack/dist/opt/netrw/syntax/netrw.vim \
runtime/pack/dist/opt/osc52/plugin/osc52.vim \
runtime/pack/dist/opt/osc52/autoload/osc52.vim \
runtime/pack/dist/opt/osc52/doc/osc52.txt \
runtime/pack/dist/opt/osc52/doc/tags
# Runtime files for all distributions without CR/LF translation.
RT_ALL_BIN = \

60
lang/LICENSE.zh_cn.txt Normal file
View File

@@ -0,0 +1,60 @@
注意: 本译文仅供参考。若因译文错漏引发任何问题译者概不承担责任。VIM 许可证的
完整英文版本为唯一法律依据。如有任何疑问,以英文原文为准。
VIM 许可证
I) 可以任意发布没有修改的 Vim 的拷贝,但是必须保证包含本许可证。您也可以发布
未经修改的部分 Vim同样也必须包含这份许可证。发布由未经修改的 Vim 源代码
所编译出的 Vim 可执行文件,外加您自己的应用实例和 Vim 脚本也是允许的。
II) 在满足以下全部四个条件的前提下,您可以发布经过修改 (或扩充) 的 Vim 版本,
包括可执行文件 和/或 源代码:
1) 本许可证必须包含在内,并且不能被修改。
2) 经过修改的 Vim 必须以下述五种方式之一发布:
a) 如果您本人对 Vim 做了改动,您必须在发布版本里清楚地说明如何与您联系。
当 Vim 的维护者 (以任何方式) 向您索取您所发布的 Vim 时,您必须把所做
的改动包括源代码无偿地提供出来。维护者保留把这些改动加入 Vim 正式版本
的权利。至于维护者怎样处理这些改动,以及用什么许可证发布,可以协商。
如果没有协商,那么,本许可证,或者它更新的版本,同样适用于您做出的改
动。Vim 现在的几位维护者可见:
https://github.com/orgs/vim/people
如果维护者发生变动,会在合适的地方 (很可能是 vim.sf.net、www.vim.org
和/或 comp.editors) 公布,当完全不能与维护者联系时,发送变更的约定自
动终止。一旦维护者确认收到了您所做的修改,您就不必再次发送了。
b) 如果您得到的是一个修改过的 Vim并且它是在条件 a) 下发布的,那么您可
以不加改动地在条件 I) 下发布它;如果您又做了额外的改动,则这些改动受
到 a) 款条文的约束。
c) 在您发布的经过修改的 Vim 的每一份拷贝里,提供所有的变更部分,包括源代
码。提供的形式可以采用上下文风格的差异比较记录 (context diff)。您可以
为添加的新代码选择许可证,但是这些更改和为其选择的许可证不能限制他人
对 Vim 正式版本作出自己的改动。
d) 在满足以下全部三个条件的前提下,您可以继续发布带有条件 c) 所提及之变
更的经过修改的 Vim而不必在发布时提供更改部分的源代码:
- 这些变更所附带的许可证允许您把这些变更无偿地并且没有任何限制地提供
给 Vim 的维护者,而且允许 Vim 的维护者无偿地并且没有任何限制地把这
些更改加入到 Vim 的正式版本中。
- 从您最后一次发布更改的 Vim 之日起,您要保存这些改动至少三年时间。在
这期间,维护者或别人 (以任何方式) 向您要求提供这些变更时,您必须提
供给他。
- 您要在发布版本中清楚地说明如何与您联系,这个联系方式必须保证自最后
一次发布相应的经过修改的 Vim 之日起至少三年有效,或尽可能长。
e) 当这些变更以 GPL (GNU General Public LicenseGNU 通用公共许可证) 发
布时,您可以在 GPL 版本 2或更高版本的 GPL 下发布修改过的 Vim。
3) 必须添加一条改动的信息。至少要放在 "version" 命令的输出和启动画面里,好
让用户知道自己用的是一个修改过的 Vim。当以 2)e) 条件发布时,只有不与变
更适用的许可证冲突,这个信息的添加才是必要的。
4) 在 2)a) 和 2)d) 条件里要求的联系方式不能随便更改或删除,除非是作者自己
作出的更正。
III) 如果您发布一个更改过的 Vim强烈建议您对变更部分使用 Vim 的许可证,并且对
维护者提供变更部分并开放源代码。最好的方式是通过电子邮件或者把文件放到服
务器上,通过电子邮件传送 URL。如果只修改了很少的部分 (例如,只是一个修改
过的 Makefile),那么传送一个上下文风格的差异比较记录 (context diff) 就可
以了。电子邮件的地址是 <maintainer@vim.org>
IV) 不允许从 Vim 的源代码的发行版本或其中部分的源代码里删除本许可证,即使来自
更改过的版本也是如此。您可能想用这份许可证代替以前版本的 Vim 里的许可证,
这可以由您自行决定。

122
lang/README.zh_cn.txt Normal file
View File

@@ -0,0 +1,122 @@
Vim: Vi IMproved 9.1 版本的 README.txt 文件
什 么 是 VIM
Vim 是经典 UNIX 编辑器 Vi 的一个极大改进版本。它新增了许多功能:多级撤销、语法高
亮、命令行历史、在线帮助、拼写检查、文件名补全、块操作、脚本语言等。同时也提供了
图形用户界面GUI。尽管如此Vi 兼容性依然得以保留,习惯使用 Vi 的用户操作时仍
会感到得心应手。与 Vi 的差异请参阅 "runtime/doc/vi_diff.txt"。
此编辑器对于编辑代码和其他纯文本文件非常有用。所有命令都通过常规键盘字符输入,因
此熟练盲打的用户能够高效工作。此外,用户可以将功能键映射到命令,并且可以使用鼠标。
Vim 也致力于提供一个(基本)符合 POSIX 标准的 vi 实现。当它以最小功能集(通常称
为 vim.tiny编译时被许多 Linux 发行版用作默认的 vi 编辑器。
Vim 可在 MS-Windows (7, 8, 10, 11)、macOS、Haiku、VMS 以及几乎所有 UNIX 变体上运
行。移植到其他系统应该不太困难。旧版本的 Vim 曾在 Amiga DOS、Atari MiNT、BeOS、
MS-DOS、MS-Windows 95/98/Me/NT/2000/XP/Vista、RISC OS 和 OS/2 上运行。这些版本的
维护现已终止。
获 取 途 径
通常你可以使用你喜欢的软件包管理器来安装 Vim。在 Mac 和 Linux 上,会预装一个简化
版的 Vim如果你需要更多功能仍需要安装完整的 Vim。
有针对 Unix、PC、Amiga 和其他一些系统的独立发行版。本 README.txt 文件随运行时存
档一起提供。该存档包含文档、语法文件以及其他运行时使用的文件。要运行 Vim你必须
获取二进制存档或源代码存档之一。您需要哪一种取决于您想要运行 Vim 的系统以及您是
否希望或必须自行编译。请查阅 "https://www.vim.org/download.php" 以了解当前可用的
发行版概览。
获取最新版 Vim 的常见方式:
* 从 github 检出 git 仓库https://github.com/vim/vim。
* 以存档形式获取源代码https://github.com/vim/vim/tags。
* 从 vim-win32-installer 仓库获取 Windows 可执行文件:
https://github.com/vim/vim-win32-installer/releases。
编 译
如果你获得的是二进制发行版,则无需编译 Vim。如果你获得的是源代码发行版编译 Vim
所需的所有内容都在 "src" 目录中。请参阅 src/INSTALL 文件中的说明。
安 装
请查阅以下文件之一以获取系统特定的安装说明。这些文件位于仓库中的 READMEdir 目录,
或者在你解压缩存档后的顶级目录中:
README_ami.txt Amiga
README_unix.txt Unix
README_dos.txt MS-DOS 和 MS-Windows
README_mac.txt Macintosh
README_haiku.txt Haiku
README_vms.txt VMS
根据你使用的发行版,可能还有其他 README_*.txt 文件。
文 档
Vim tutor 是为初学者设计的一小时培训课程。通常可以通过 "vimtutor" 命令启动。更多
信息请参阅 ":help tutor"。
最佳方式是在 Vim 中使用 ":help" 命令。如果您尚未安装可执行文件,请阅读
"runtime/doc/help.txt"。该文件包含指向其他文档文件的指引。用户手册采用书籍体例编
排,是学习使用 Vim 的推荐资料。具体请参阅 ":help user-manual"。
复 制 与 版 权
Vim 是慈善软件。您可以尽情使用和复制它,但鼓励您捐款以帮助乌干达的孤儿。请阅读
"runtime/doc/uganda.txt" 文件了解详情(在 Vim 中执行 ":help uganda")。
许可摘要:对于未经修改的 Vim 副本其使用或分发不受任何限制。Vim 的部分内容亦可
分发,但必须始终包含许可文本。对于修改版本,则需遵循若干限制条款。本许可证与 GPL
兼容,您可使用 GPL 库编译 Vim 并进行分发。
赞 助
修复错误与增添新功能均需投入大量时间与精力。为支持开发工作并激励开发者持续完善
Vim敬请通过捐赠表达您的认可。
您捐赠的资金将主要用于帮助乌干达的儿童。请参阅 "runtime/doc/uganda.txt"。但同时,
您的捐赠也将激励开发团队持续投入 Vim 的开发工作。
关于赞助的最新信息,请查看 Vim 网站:
https://www.vim.org/sponsor/
贡 献
如果您想帮助改进 Vim请参阅 CONTRIBUTING.md 文件。
信 息 与 支 持
如果您在 macOS 上,可以使用 MacVimhttps://macvim.org
关于 Vim 的最新消息可以在 Vim 主页上找到:
https://www.vim.org/
如果您遇到问题,请查阅 Vim 文档或使用技巧:
https://www.vim.org/docs.php
https://vim.fandom.com/wiki/Vim_Tips_Wiki
如果您仍有问题或其他疑问,请使用其中一个邮件列表与 Vim 用户和开发者讨论:
https://www.vim.org/maillist.php
如果其他方法都无效,请直接将错误报告发送到 vim-dev 邮件列表:
<vim-dev@vim.org>
主 要 作 者
Vim 主要由 Bram Moolenaar <Bram@vim.org> 创建,可通过 ":help Bram-Moolenaar" 命
令了解更多信息。
请将任何其他评论、补丁、鲜花和建议发送到 vim-dev 邮件列表:<vim-dev@vim.org>

View File

@@ -35,7 +35,7 @@ Preparatory stage
and for the 64-bit version — "winpty.dll" from x64/bin to "winpty64.dll".
Put the renamed file and "winpty-agent.exe" in "../.." (above the "vim91"
directory). However, you can specify a different directory by specifying
the appropriate makefile value. How to do this is described below.
the appropriate makefile value. How to do this is described below.
6. To use stronger encryption, add the Sodium library. You can get it here:
https://github.com/jedisct1/libsodium/releases/download/1.0.19-RELEASE/libsodium-1.0.19-msvc.zip
@@ -64,7 +64,7 @@ Preparatory stage
The default <GETTEXT directory> is "../..". However, you can specify a
different directory by specifying the appropriate makefile value. How to do
this is described below.
this is described below.
8. Install NSIS if you didn't do that already.
Download Unicode version the ShellExecAsUser plug-in for NSIS from:
@@ -80,7 +80,7 @@ Installer assembly stage
After the installer is created and you copy it to the desired location, run
the following command in the "/nsis" directory
nmake.exe -lf Make_mvc.mak clean
On UNIX-like systems, go to the "/nsis" directory and type the command
make -f Makefile [variables] all

View File

@@ -22,16 +22,14 @@ LangString ^UninstallCaption ${LANG_SIMPCHINESE} \
# Translated license file for the license page {{{1
##############################################################################
LicenseLangString page_lic_file 0 "..\lang\LICENSE.nsis.txt"
#LicenseLangString page_lic_file ${LANG_SIMPCHINESE} \
# "..\lang\LICENSE.zh_cn.nsis.txt"
LicenseLangString page_lic_file ${LANG_SIMPCHINESE} \
"..\lang\LICENSE.zh_cn.nsis.txt"
##############################################################################
# Translated README.txt file, which is opened after installation {{{1
##############################################################################
LangString vim_readme_file 0 "README.txt"
#LangString vim_readme_file ${LANG_SIMPCHINESE} "README.zh_cn.txt"
LangString vim_readme_file ${LANG_SIMPCHINESE} "README.zh_cn.txt"
##############################################################################
# MUI Configuration Strings {{{1

View File

@@ -3,7 +3,7 @@ vim9script
# Vim functions for file type detection
#
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2025 Nov 11
# Last Change: 2025 Dec 22
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
# These functions are moved here from runtime/filetype.vim to make startup
@@ -29,6 +29,28 @@ export def Check_inp()
endif
enddef
# Erlang Application Resource Files (*.app.src is matched by extension)
# See: https://erlang.org/doc/system/applications
export def FTapp()
if exists("g:filetype_app")
exe "setf " .. g:filetype_app
return
endif
const pat = '^\s*{\s*application\s*,\s*\(''\=\)' .. expand("%:t:r:r") .. '\1\s*,'
var line: string
for lnum in range(1, min([line("$"), 100]))
line = getline(lnum)
# skip Erlang comments, might be something else
if line =~ '^\s*%' || line =~ '^\s*$'
continue
elseif line =~ '^\s*{' &&
getline(lnum, lnum + 9)->filter((_, v) => v !~ '^\s*%')->join(' ') =~# pat
setf erlang
endif
return
endfor
enddef
# This function checks for the kind of assembly that is wanted by the user, or
# can be detected from the beginning of the file.
export def FTasm()
@@ -1736,6 +1758,8 @@ const ft_from_ext = {
# BSDL
"bsd": "bsdl",
"bsdl": "bsdl",
# Bpftrace
"bt": "bpftrace",
# C3
"c3": "c3",
"c3i": "c3",
@@ -2094,6 +2118,8 @@ const ft_from_ext = {
"tmpl": "template",
# Hurl
"hurl": "hurl",
# Hylo
"hylo": "hylo",
# Hyper Builder
"hb": "hb",
# Httest
@@ -2226,6 +2252,8 @@ const ft_from_ext = {
"ldg": "ledger",
"ledger": "ledger",
"journal": "ledger",
# Leex
"xrl": "leex",
# Leo
"leo": "leo",
# Less
@@ -2345,6 +2373,8 @@ const ft_from_ext = {
"norg": "norg",
# Novell netware batch files
"ncf": "ncf",
# N-Quads
"nq": "nq",
# Not Quite C
"nqc": "nqc",
# NSE - Nmap Script Engine - uses Lua syntax
@@ -2705,6 +2735,7 @@ const ft_from_ext = {
"nut": "squirrel",
# Starlark
"ipd": "starlark",
"sky": "starlark",
"star": "starlark",
"starlark": "starlark",
# OpenVPN configuration
@@ -3071,6 +3102,8 @@ const ft_from_name = {
".editorconfig": "editorconfig",
# Elinks configuration
"elinks.conf": "elinks",
# Erlang
"rebar.config": "erlang",
# Exim
"exim.conf": "exim",
# Exports

View File

@@ -4,7 +4,7 @@ vim9script
# Invoked from "scripts.vim" in 'runtimepath'
#
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2025 Aug 09
# Last Change: 2025 Dec 22
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
export def DetectFiletype()
@@ -233,6 +233,10 @@ export def Exe2filetype(name: string, line1: string): string
elseif name =~ '^execlineb\>'
return 'execline'
# Bpftrace
elseif name =~ '^bpftrace\>'
return 'bpftrace'
# Vim
elseif name =~ '^vim\>'
return 'vim'

View File

@@ -3,7 +3,7 @@ vim9script
# Vim runtime support library
#
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2025 Aug 15
# Last Change: 2025 Dec 21
export def IsSafeExecutable(filetype: string, executable: string): bool
if empty(exepath(executable))
@@ -60,15 +60,19 @@ if has('unix')
enddef
else
export def Launch(args: string)
const fork = has('gui_running') ? '' : '&'
const fork = has('gui_running') ? '&' : ''
execute $':silent ! nohup {args} {Redir()} {fork}' | redraw!
enddef
endif
elseif has('win32')
export def Launch(args: string)
const shell = (&shell =~? '\<cmd\.exe\>') ? '' : 'cmd.exe /c'
const quotes = empty(shell) ? '' : '""'
execute $'silent ! {shell} start {quotes} /b {args} {Redir()}' | redraw!
try
execute ':silent !start' args | redraw!
catch /^Vim(!):E371:/
echohl ErrorMsg
echom "dist#vim9#Launch(): can not start" args
echohl None
endtry
enddef
else
export def Launch(dummy: string)
@@ -81,7 +85,10 @@ var os_viewer = null_string
if has('win32unix')
# (cyg)start suffices
os_viewer = ''
# Windows / WSL
# Windows
elseif has('win32')
os_viewer = '' # Use :!start
# WSL
elseif executable('explorer.exe')
os_viewer = 'explorer.exe'
# Linux / BSD
@@ -126,6 +133,11 @@ export def Open(file: string)
&shellslash = false
defer setbufvar('%', '&shellslash', true)
endif
if &shell == 'pwsh' || &shell == 'powershell'
const shell = &shell
setlocal shell&
defer setbufvar('%', '&shell', shell)
endif
Launch($"{Viewer()} {shellescape(file, 1)}")
enddef

View File

@@ -14,6 +14,7 @@
" 2024 Nov 12 by Vim Project: fix problems on Windows (#16036)
" 2025 Feb 28 by Vim Project: add support for bzip3 (#16755)
" 2025 May 11 by Vim Project: check network connectivity (#17249)
" 2025 Dec 21 by Vim Project: make the wget check more robust (#18987)
" }}}
"
" GetLatestVimScripts: 642 1 :AutoInstall: getscript.vim
@@ -58,7 +59,10 @@ endif
" wget vs curl {{{2
if !exists("g:GetLatestVimScripts_wget")
if executable("wget")
if executable("wget.exe")
" enforce extension: windows powershell desktop version has a wget alias that hides wget.exe
let g:GetLatestVimScripts_wget= "wget.exe"
elseif executable("wget")
let g:GetLatestVimScripts_wget= "wget"
elseif executable("curl.exe")
" enforce extension: windows powershell desktop version has a curl alias that hides curl.exe
@@ -73,7 +77,7 @@ endif
" options that wget and curl require:
if !exists("g:GetLatestVimScripts_options")
if g:GetLatestVimScripts_wget == "wget"
if g:GetLatestVimScripts_wget =~ "wget"
let g:GetLatestVimScripts_options= "-q -O"
elseif g:GetLatestVimScripts_wget =~ "curl"
let g:GetLatestVimScripts_options= "-s -o"

View File

@@ -211,7 +211,7 @@ function! tutor#TutorCmd(tutor_name)
endif
call tutor#SetupVim()
exe "drop ".l:to_open
exe "drop ".fnameescape(l:to_open)
call tutor#EnableInteractive(v:true)
endfunction

View File

@@ -17,6 +17,7 @@
" 2025 Mar 11 by Vim Project: handle filenames with leading '-' correctly
" 2025 Jul 12 by Vim Project: drop ../ on write to prevent path traversal attacks
" 2025 Sep 22 by Vim Project: support PowerShell Core
" 2025 Dec 20 by Vim Project: use :lcd instead of :cd
" 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,
@@ -371,7 +372,7 @@ fun! zip#Write(fname)
call mkdir(tmpdir,"p")
" attempt to change to the indicated directory
if s:ChgDir(tmpdir,s:ERROR,"(zip#Write) cannot cd to temporary directory")
if s:ChgDir(tmpdir,s:ERROR,"(zip#Write) cannot lcd to temporary directory")
return
endif
@@ -380,7 +381,7 @@ fun! zip#Write(fname)
call delete("_ZIPVIM_", "rf")
endif
call mkdir("_ZIPVIM_")
cd _ZIPVIM_
lcd _ZIPVIM_
if has("unix")
let zipfile = substitute(a:fname,'zipfile://\(.\{-}\)::[^\\].*$','\1','')
@@ -455,7 +456,7 @@ fun! zip#Write(fname)
endif
" cleanup and restore current directory
cd ..
lcd ..
call delete("_ZIPVIM_", "rf")
call s:ChgDir(curdir,s:WARNING,"(zip#Write) unable to return to ".curdir."!")
call delete(tmpdir, "rf")
@@ -536,7 +537,7 @@ endfun
" s:ChgDir: {{{2
fun! s:ChgDir(newdir,errlvl,errmsg)
try
exe "cd ".fnameescape(a:newdir)
exe "lcd ".fnameescape(a:newdir)
catch /^Vim\%((\a\+)\)\=:E344/
redraw!
if a:errlvl == s:NOTE

View File

@@ -0,0 +1,23 @@
" Vim compiler file
" Compiler: Biome (= linter for JavaScript, TypeScript, JSX, TSX, JSON,
" JSONC, HTML, Vue, Svelte, Astro, CSS, GraphQL and GritQL files)
" Maintainer: @Konfekt
" Last Change: 2025 Nov 12
if exists("current_compiler") | finish | endif
let current_compiler = "biome"
let s:cpo_save = &cpo
set cpo&vim
exe 'CompilerSet makeprg=' .. escape('biome check --linter-enabled=true --formatter-enabled=false --assist-enabled=false --reporter=github '
\ .. get(b:, 'biome_makeprg_params', get(g:, 'biome_makeprg_params', '')), ' \|"')
CompilerSet errorformat=::%trror%.%#file=%f\\,line=%l\\,%.%#col=%c\\,%.%#::%m
CompilerSet errorformat+=::%tarning%.%#file=%f\\,line=%l\\,%.%#col=%c\\,%.%#::%m
CompilerSet errorformat+=::%totice%.%#file=%f\\,line=%l\\,%.%#col=%c\\,%.%#::%m
CompilerSet errorformat+=%-G\\s%#
CompilerSet errorformat+=%-Gcheck\ %.%#
CompilerSet errorformat+=%-G%.%#Some\ errors\ were\ emitted\ while\ running\ checks%.
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@@ -6,6 +6,7 @@
" by Daniel Hahler, 2019 Jul 12
" added line suggested by Anton Lindqvist 2016 Mar 31
" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition)
" 2025 Dec 17 by The Vim Project (correctly parse: 'make: *** [Makefile:2: all] Error 1')
if exists("current_compiler")
finish
@@ -16,6 +17,7 @@ let s:cpo_save = &cpo
set cpo&vim
CompilerSet errorformat=
\make:\ ***\ [%f:%l:\ %m,
\%*[^\"]\"%f\"%*\\D%l:%c:\ %m,
\%*[^\"]\"%f\"%*\\D%l:\ %m,
\\"%f\"%*\\D%l:%c:\ %m,

View File

@@ -7,24 +7,54 @@
" Original Source: https://github.com/mikelue/vim-maven-plugin/blob/master/compiler/maven.vim
" (distributed under same terms as LICENSE per
" https://github.com/mikelue/vim-maven-plugin/issues/13)
" Last Change: 2024 Nov 12
" Last Change: 2025 Nov 18
if exists("current_compiler")
finish
endif
let current_compiler = "maven"
" CompilerSet makeprg=mvn
execute $'CompilerSet makeprg=mvn\ --batch-mode\ {escape(get(b:, 'maven_makeprg_params', get(g:, 'maven_makeprg_params', '')), ' \|"')}'
" Error message for POM
CompilerSet errorformat=[FATAL]\ Non-parseable\ POM\ %f:\ %m%\\s%\\+@%.%#line\ %l\\,\ column\ %c%.%#,
CompilerSet errorformat+=[%tRROR]\ Malformed\ POM\ %f:\ %m%\\s%\\+@%.%#line\ %l\\,\ column\ %c%.%#
" Handle Non-parseable POM with '@<line>:<col>' embedded in the 'position:' clause.
CompilerSet errorformat+=[FATAL]\ Non-parseable\ POM\ %f:\ %m%\\s%\\+%.%#@%l:%c%.%#,
CompilerSet errorformat+=[%tRROR]\ Malformed\ POM\ %f:\ %m%\\s%\\+%.%#@%l:%c%.%#,
" Java related build messages
" JavaC messages with paths relative to module root:
" With column:
CompilerSet errorformat+=[%tARNING]\ %f:[%l\\,%c]\ %m
CompilerSet errorformat+=[%tRROR]\ %f:[%l\\,%c]\ %m
CompilerSet errorformat+=%A[%t%[A-Z]%#]\ %f:[%l\\,%c]\ %m,%Z
CompilerSet errorformat+=%A%f:[%l\\,%c]\ %m,%Z
" Without column:
CompilerSet errorformat+=[%tARNING]\ %f:[%l]\ %m
CompilerSet errorformat+=[%tRROR]\ %f:[%l]\ %m
CompilerSet errorformat+=%A[%t%[A-Z]%#]\ %f:[%l]\ %m,%Z
CompilerSet errorformat+=%A%f:[%l]\ %m,%Z
" Plug-in messages with absolute paths:
" with column:
CompilerSet errorformat+=[%tARNING]\ %f:%l:%c:\ %m
CompilerSet errorformat+=[%tRROR]\ %f:%l:%c:\ %m
CompilerSet errorformat+=%A[%t%[A-Z]%#]\ %f:%l:%c:\ %m,%Z
CompilerSet errorformat+=%A%f:%l:%c:\ %m,%Z
" without column:
CompilerSet errorformat+=[%tARNING]\ %f:%l:\ %m
CompilerSet errorformat+=[%tRROR]\ %f:%l:\ %m
CompilerSet errorformat+=%A[%t%[A-Z]%#]\ %f:%l:\ %m,%Z
CompilerSet errorformat+=%A%f:%l:\ %m,%Z
" SpotBugs
CompilerSet errorformat+=[%tRROR]\ %m%\\s%\\+\[%*[^]]]%\\s%\\+In\ %f\ %.%#,
CompilerSet errorformat+=[%tARNING]\ %m%\\s%\\+\[%*[^]]]%\\s%\\+In\ %f\ %.%#,
CompilerSet errorformat+=[%tRROR]\ %.%#\ [aA]t\ %f:\[lines\ %l-%\\d\\+]\ %.%#,
CompilerSet errorformat+=[%tARNING]\ %.%#\ [aA]t\ %f:\[lines\ %l-%\\d\\+]\ %.%#,
CompilerSet errorformat+=[%tRROR]\ %.%#\ [aA]t\ %f:\[line\ %l]\ %.%#,
CompilerSet errorformat+=[%tARNING]\ %.%#\ [aA]t\ %f:\[line\ %l]\ %.%#,
" jUnit related build messages
CompilerSet errorformat+=%+E\ \ %#test%m,%Z
@@ -36,5 +66,7 @@ CompilerSet errorformat+=%+Z%\\s%#at\ %f(%\\f%\\+:%l),
CompilerSet errorformat+=%+C%.%#
" Misc message removal
" CompilerSet errorformat+=%-GPicked\ up\ _JAVA_OPTIONS\ %.%#,
CompilerSet errorformat+=%-GAudit\ done.,
CompilerSet errorformat+=%-G[INFO]\ %.%#,
CompilerSet errorformat+=%-G[debug]\ %.%#

View File

@@ -3,6 +3,7 @@
" Maintainer: Wu, Zhenyu <wuzhenyu@ustc.edu>
" URL: https://rime.im
" Latest Revision: 2024-04-09
" Last Change: 2025 Nov 16 by The Vim Project (set errorformat)
if exists('b:current_compiler')
finish
@@ -25,6 +26,8 @@ for s:shared_data_dir in ['/sdcard/rime-data', '/run/current-system/sw/share/rim
endfor
execute 'CompilerSet makeprg=rime_deployer\ --build\ %:p:h:S\' s:shared_data_dir
unlet s:prefix s:shared_data_dir
" CompilerSet errorformat=%f:%l:%c:\ %m,%f:%l:\ %m
CompilerSet errorformat&
let &cpoptions = s:save_cpoptions
unlet s:save_cpoptions

View File

@@ -2,6 +2,8 @@
" Compiler: Rust Compiler
" Maintainer: Chris Morgan <me@chrismorgan.info>
" Latest Revision: 2023-09-11
" 2025 Nov 15 by Vim project: remove test for Vim patch 7.4.191
" 2025 Dec 18 by Vim project: detect more errors #18957
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
if exists("current_compiler")
@@ -17,11 +19,7 @@ set cpo&vim
if get(g:, 'rustc_makeprg_no_percent', 0)
CompilerSet makeprg=rustc
else
if has('patch-7.4.191')
CompilerSet makeprg=rustc\ \%:S
else
CompilerSet makeprg=rustc\ \"%\"
endif
CompilerSet makeprg=rustc\ \%:S
endif
" New errorformat (after nightly 2016/08/10)
@@ -32,8 +30,10 @@ CompilerSet errorformat=
\%Eerror:\ %m,
\%Eerror[E%n]:\ %m,
\%Wwarning:\ %m,
\%Wwarning[E%n]:\ %m,
\%Inote:\ %m,
\%C\ %#-->\ %f:%l:%c,
\%C\ %#╭▸\ %f:%l:%c,
\%E\ \ left:%m,%C\ right:%m\ %f:%l:%c,%Z
" Old errorformat (before nightly 2016/08/10)

19
runtime/compiler/ty.vim Normal file
View File

@@ -0,0 +1,19 @@
" Vim compiler file
" Compiler: Ty (Python Type Checker)
" Maintainer: @konfekt
" Last Change: 2024 Dec 18
if exists("current_compiler") | finish | endif
let current_compiler = "ty"
let s:cpo_save = &cpo
set cpo&vim
" CompilerSet makeprg=ty
exe 'CompilerSet makeprg=' .. escape(
\ get(b:, 'ty_makeprg', get(g:, 'ty_makeprg', 'ty --no-progress --color=never'))
\ ..' check --output-format=concise', ' \|"')
CompilerSet errorformat=%f:%l:%c:\ %m,%f:%l:\ %m,%f:%l:%c\ -\ %m,%f:
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@@ -2,6 +2,7 @@
" Language: vimdoc
" Maintainer: Wu, Zhenyu <wuzhenyu@ustc.edu>
" Latest Revision: 2024-04-13
" Last Change: 2025 Nov 16 by The Vim Project (set errorformat)
"
" If you can not find 'vimdoc' in the package manager of your distribution e.g
" 'pip', then you may need to build it from its source.
@@ -15,6 +16,8 @@ let s:save_cpoptions = &cpoptions
set cpoptions&vim
CompilerSet makeprg=vimdoc
" CompilerSet errorformat=%f:%l:%c:\ %m,%f:%l:\ %m
CompilerSet errorformat&
let &cpoptions = s:save_cpoptions
unlet s:save_cpoptions

View File

@@ -3,6 +3,7 @@
" Maintainer: Romain Lafourcade <romainlafourcade@gmail.com>
" Last Change: 2021 July 21
" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition)
" 2025 Nov 16 by The Vim Project (set errorformat)
if exists("current_compiler")
finish
@@ -10,4 +11,6 @@ endif
let current_compiler = "yamllint"
CompilerSet makeprg=yamllint\ -f\ parsable
" CompilerSet errorformat=%f:%l:%c:\ [%t%*[^]]]\ %m,%f:%l:%c:\ [%*[^]]]\ %m
CompilerSet errorformat&

View File

@@ -1,7 +1,7 @@
" Vim compiler file
" Compiler: Zig Compiler (zig build-exe)
" Upstream: https://github.com/ziglang/zig.vim
" Last Change: 2024 Apr 05 by The Vim Project (removed :CompilerSet definition)
" Last Change: 2025 Nov 16 by The Vim Project (set errorformat)
if exists('current_compiler')
finish
@@ -12,11 +12,9 @@ let current_compiler = 'zig_build_exe'
let s:save_cpo = &cpo
set cpo&vim
if has('patch-7.4.191')
CompilerSet makeprg=zig\ build-exe\ \%:S\ \$*
else
CompilerSet makeprg=zig\ build-exe\ \"%\"\ \$*
endif
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

View File

@@ -1,7 +1,7 @@
" Vim compiler file
" Compiler: Zig Compiler (zig test)
" Upstream: https://github.com/ziglang/zig.vim
" Last Change: 2024 Apr 05 by The Vim Project (removed :CompilerSet definition)
" Last Change: 2025 Nov 16 by The Vim Project (set errorformat)
if exists('current_compiler')
finish
@@ -12,11 +12,9 @@ let current_compiler = 'zig_test'
let s:save_cpo = &cpo
set cpo&vim
if has('patch-7.4.191')
CompilerSet makeprg=zig\ test\ \%:S\ \$*
else
CompilerSet makeprg=zig\ test\ \"%\"\ \$*
endif
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

View File

@@ -1,7 +1,7 @@
" The default vimrc file.
"
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2025 Sep 10
" Last Change: 2025 Nov 28
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
"
" This is loaded if no vimrc file was found.
@@ -136,7 +136,7 @@ if &t_Co > 2 || has("gui_running")
syntax on
" I like highlighting strings inside C comments.
" Revert with ":unlet c_comment_strings".
" Revert with ":unlet g:c_comment_strings".
let c_comment_strings=1
endif

View File

@@ -1,4 +1,4 @@
*builtin.txt* For Vim version 9.1. Last change: 2025 Nov 09
*builtin.txt* For Vim version 9.1. Last change: 2025 Dec 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -23,9 +23,11 @@ Use CTRL-] on the function name to jump to the full explanation.
USAGE RESULT DESCRIPTION ~
abs({expr}) Float or Number absolute value of {expr}
abs({expr}) Float/Number
absolute value of {expr}
acos({expr}) Float arc cosine of {expr}
add({object}, {item}) List/Blob append {item} to {object}
add({object}, {item}) List/Blob
append {item} to {object}
and({expr}, {expr}) Number bitwise AND
append({lnum}, {text}) Number append {text} below line {lnum}
appendbufline({buf}, {lnum}, {text})
@@ -33,7 +35,8 @@ appendbufline({buf}, {lnum}, {text})
in buffer {buf}
argc([{winid}]) Number number of files in the argument list
argidx() Number current index in the argument list
arglistid([{winnr} [, {tabnr}]]) Number argument list id
arglistid([{winnr} [, {tabnr}]])
Number argument list id
argv({nr} [, {winid}]) String {nr} entry of the argument list
argv([-1, {winid}]) List the argument list
asin({expr}) Float arc sine of {expr}
@@ -43,7 +46,7 @@ assert_equal({exp}, {act} [, {msg}])
assert_equalfile({fname-one}, {fname-two} [, {msg}])
Number assert file contents are equal
assert_exception({error} [, {msg}])
Number assert {error} is in v:exception
Number assert {error} is in |v:exception|
assert_fails({cmd} [, {error} [, {msg} [, {lnum} [, {context}]]]])
Number assert {cmd} fails
assert_false({actual} [, {msg}])
@@ -81,8 +84,8 @@ bufexists({buf}) Number |TRUE| if buffer {buf} exists
buflisted({buf}) Number |TRUE| if buffer {buf} is listed
bufload({buf}) Number load buffer {buf} if not loaded yet
bufloaded({buf}) Number |TRUE| if buffer {buf} is loaded
bufname([{buf}]) String Name of the buffer {buf}
bufnr([{buf} [, {create}]]) Number Number of the buffer {buf}
bufname([{buf}]) String name of the buffer {buf}
bufnr([{buf} [, {create}]]) Number number of the buffer {buf}
bufwinid({buf}) Number window ID of buffer {buf}
bufwinnr({buf}) Number window number of buffer {buf}
byte2line({byte}) Number line number at byte count {byte}
@@ -121,7 +124,8 @@ ch_setoptions({handle}, {options})
ch_status({handle} [, {options}])
String status of channel {handle}
changenr() Number current change number
char2nr({expr} [, {utf8}]) Number ASCII/UTF-8 value of first char in {expr}
char2nr({expr} [, {utf8}]) Number ASCII/UTF-8 value of first char in
{expr}
charclass({string}) Number character class of {string}
charcol({expr} [, {winid}]) Number column number of cursor or mark
charidx({string}, {idx} [, {countcc} [, {utf16}]])
@@ -136,7 +140,6 @@ complete({startcol}, {matches}) none set Insert mode completion
complete_add({expr}) Number add completion match
complete_check() Number check for key typed during completion
complete_info([{what}]) Dict get current completion information
complete_match([{lnum}, {col}]) List get completion column and trigger text
confirm({msg} [, {choices} [, {default} [, {type}]]])
Number number of choice picked by user
copy({expr}) any make a shallow copy of {expr}
@@ -181,10 +184,12 @@ expand({expr} [, {nosuf} [, {list}]])
expandcmd({string} [, {options}])
String expand {string} like with `:edit`
extend({expr1}, {expr2} [, {expr3}])
List/Dict insert items of {expr2} into {expr1}
List/Dict
insert items of {expr2} into {expr1}
extendnew({expr1}, {expr2} [, {expr3}])
List/Dict like |extend()| but creates a new
List or Dictionary
List/Dict
like |extend()| but creates a new List
or Dictionary
feedkeys({string} [, {mode}]) Number add key sequence to typeahead buffer
filecopy({from}, {to}) Number |TRUE| if copying file {from} to {to}
worked
@@ -195,7 +200,8 @@ filter({expr1}, {expr2}) List/Dict/Blob/String
{expr2} is 0
finddir({name} [, {path} [, {count}]])
findfile({name} [, {path} [, {count}]])
String/List find dir/file {name} in {path}
String/List
find dir/file {name} in {path}
flatten({list} [, {maxdepth}]) List flatten {list} up to {maxdepth} levels
flattennew({list} [, {maxdepth}])
List flatten a copy of {list}
@@ -217,7 +223,8 @@ funcref({name} [, {arglist}] [, {dict}])
Funcref reference to function {name}
function({name} [, {arglist}] [, {dict}])
Funcref named reference to function {name}
garbagecollect([{atexit}]) none free memory, breaking cyclic references
garbagecollect([{atexit}]) none free memory, breaking cyclic
references
get({list}, {idx} [, {def}]) any get item {idx} from {list} or {def}
get({dict}, {key} [, {def}]) any get item {key} from {dict} or {def}
get({func}, {what}) any get property of funcref/partial {func}
@@ -230,7 +237,7 @@ getbufvar({buf}, {varname} [, {def}])
getcellpixels() List get character cell pixel size
getcellwidths() List get character cell width overrides
getchangelist([{buf}]) List list of change list items
getchar([{expr} [, {opts}]]) Number or String
getchar([{expr} [, {opts}]]) Number/String
get one character from the user
getcharmod() Number modifiers for the last typed character
getcharpos({expr}) List position of cursor, mark, etc.
@@ -246,7 +253,8 @@ getcmdprompt() String return the current command-line prompt
getcmdscreenpos() Number return cursor screen position in
command-line
getcmdtype() String return current command-line type
getcmdwintype() String return current command-line window type
getcmdwintype() String return current command-line window
type
getcompletion({pat}, {type} [, {filtered}])
List list of cmdline completion matches
getcompletiontype({pat}) String return the type of the command-line
@@ -264,7 +272,8 @@ getimstatus() Number |TRUE| if the IME status is active
getjumplist([{winnr} [, {tabnr}]])
List list of jump list items
getline({lnum}) String line {lnum} of current buffer
getline({lnum}, {end}) List lines {lnum} to {end} of current buffer
getline({lnum}, {end}) List lines {lnum} to {end} of current
buffer
getloclist({nr}) List list of location list items
getloclist({nr}, {what}) Dict get specific location list properties
getmarklist([{buf}]) List list of global/local marks
@@ -276,7 +285,8 @@ getpos({expr}) List position of cursor, mark, etc.
getqflist() List list of quickfix items
getqflist({what}) Dict get specific quickfix list properties
getreg([{regname} [, 1 [, {list}]]])
String or List contents of a register
String/List
contents of a register
getreginfo([{regname}]) Dict information about a register
getregion({pos1}, {pos2} [, {opts}])
List get the text from {pos1} to {pos2}
@@ -287,7 +297,8 @@ getscriptinfo([{opts}]) List list of sourced scripts
getstacktrace() List get current stack trace of Vim scripts
gettabinfo([{expr}]) List list of tab pages
gettabvar({nr}, {varname} [, {def}])
any variable {varname} in tab {nr} or {def}
any variable {varname} in tab {nr} or
{def}
gettabwinvar({tabnr}, {winnr}, {name} [, {def}])
any {name} in {winnr} in tab page {tabnr}
gettagstack([{nr}]) Dict get the tag stack of window {nr}
@@ -306,8 +317,8 @@ globpath({path}, {expr} [, {nosuf} [, {list} [, {alllinks}]]])
has({feature} [, {check}]) Number |TRUE| if feature {feature} supported
has_key({dict}, {key}) Number |TRUE| if {dict} has entry {key}
haslocaldir([{winnr} [, {tabnr}]])
Number |TRUE| if the window executed |:lcd|
or |:tcd|
Number |TRUE| if the window executed `:lcd` or
`:tcd`
hasmapto({what} [, {mode} [, {abbr}]])
Number |TRUE| if mapping to {what} exists
histadd({history}, {item}) Number add an item to a history
@@ -333,9 +344,13 @@ inputdialog({prompt} [, {text} [, {cancelreturn}]])
inputlist({textlist}) Number let the user pick from a choice list
inputrestore() Number restore typeahead
inputsave() Number save and clear typeahead
inputsecret({prompt} [, {text}]) String like input() but hiding the text
insert({object}, {item} [, {idx}]) List insert {item} in {object} [before {idx}]
instanceof({object}, {class}) Number |TRUE| if {object} is an instance of {class}
inputsecret({prompt} [, {text}])
String like input() but hiding the text
insert({object}, {item} [, {idx}])
List insert {item} in {object}
[before {idx}]
instanceof({object}, {class}) Number |TRUE| if {object} is an instance of
{class}
interrupt() none interrupt script execution
invert({expr}) Number bitwise invert
isabsolutepath({path}) Number |TRUE| if {path} is an absolute path
@@ -347,7 +362,8 @@ isnan({expr}) Number |TRUE| if {expr} is NaN
items({expr}) List key/index-value pairs in {expr}
job_getchannel({job}) Channel get the channel handle for {job}
job_info([{job}]) Dict get information about {job}
job_setoptions({job}, {options}) none set options for {job}
job_setoptions({job}, {options})
none set options for {job}
job_start({command} [, {options}])
Job start a job
job_status({job}) String get the status of {job}
@@ -359,9 +375,10 @@ json_decode({string}) any decode JSON
json_encode({expr}) String encode JSON
keys({dict}) List keys in {dict}
keytrans({string}) String translate internal keycodes to a form
that can be used by |:map|
that can be used by `:map`
len({expr}) Number the length of {expr}
libcall({lib}, {func}, {arg}) String call {func} in library {lib} with {arg}
libcall({lib}, {func}, {arg}) String call {func} in library {lib} with
{arg}
libcallnr({lib}, {func}, {arg}) Number idem, but return a Number
line({expr} [, {winid}]) Number line nr of cursor, last line or mark
line2byte({lnum}) Number byte count of line {lnum}
@@ -380,7 +397,7 @@ luaeval({expr} [, {expr}]) any evaluate |Lua| expression
map({expr1}, {expr2}) List/Dict/Blob/String
change each item in {expr1} to {expr2}
maparg({name} [, {mode} [, {abbr} [, {dict}]]])
String or Dict
String/Dict
rhs of mapping {name} in mode {mode}
mapcheck({name} [, {mode} [, {abbr}]])
String check for mappings matching {name}
@@ -395,7 +412,7 @@ matchadd({group}, {pattern} [, {priority} [, {id} [, {dict}]]])
Number highlight {pattern} with {group}
matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]])
Number highlight positions with {group}
matcharg({nr}) List arguments of |:match|
matcharg({nr}) List arguments of `:match`
matchbufline({buf}, {pat}, {lnum}, {end}, [, {dict})
List all the {pat} matches in buffer {buf}
matchdelete({id} [, {win}]) Number delete match identified by {id}
@@ -406,7 +423,8 @@ matchfuzzy({list}, {str} [, {dict}])
matchfuzzypos({list}, {str} [, {dict}])
List fuzzy match {str} in {list}
matchlist({expr}, {pat} [, {start} [, {count}]])
List match and submatches of {pat} in {expr}
List match and submatches of {pat} in
{expr}
matchstr({expr}, {pat} [, {start} [, {count}]])
String {count}'th match of {pat} in {expr}
matchstrlist({list}, {pat} [, {dict})
@@ -423,11 +441,13 @@ mzeval({expr}) any evaluate |MzScheme| expression
nextnonblank({lnum}) Number line nr of non-blank line >= {lnum}
ngettext({single}, {plural}, {number}[, {domain}])
String translate text based on {number}
nr2char({expr} [, {utf8}]) String single char with ASCII/UTF-8 value {expr}
nr2char({expr} [, {utf8}]) String single char with ASCII/UTF-8 value
{expr}
or({expr}, {expr}) Number bitwise OR
pathshorten({expr} [, {len}]) String shorten directory names in a path
perleval({expr}) any evaluate |Perl| expression
popup_atcursor({what}, {options}) Number create popup window near the cursor
popup_atcursor({what}, {options})
Number create popup window near the cursor
popup_beval({what}, {options}) Number create popup window for 'ballooneval'
popup_clear() none close all popup windows
popup_close({id} [, {result}]) none close popup window {id}
@@ -447,7 +467,8 @@ popup_menu({what}, {options}) Number create a popup window used as a menu
popup_move({id}, {options}) none set position of popup window {id}
popup_notification({what}, {options})
Number create a notification popup window
popup_setbuf({id}, {buf}) Bool set the buffer for the popup window {id}
popup_setbuf({id}, {buf}) Bool set the buffer for the popup window
{id}
popup_setoptions({id}, {options})
none set options for popup window {id}
popup_settext({id}, {text}) none set the text of popup window {id}
@@ -457,10 +478,13 @@ preinserted() Number whether text is inserted after cursor
prevnonblank({lnum}) Number line nr of non-blank line <= {lnum}
printf({fmt}, {expr1}...) String format text
prompt_getprompt({buf}) String get prompt text
prompt_setcallback({buf}, {expr}) none set prompt callback function
prompt_setinterrupt({buf}, {text}) none set prompt interrupt function
prompt_setcallback({buf}, {expr})
none set prompt callback function
prompt_setinterrupt({buf}, {text})
none set prompt interrupt function
prompt_setprompt({buf}, {text}) none set prompt text
prop_add({lnum}, {col}, {props}) none add one text property
prop_add({lnum}, {col}, {props})
none add one text property
prop_add_list({props}, [[{lnum}, {col}, {end-lnum}, {end-col}], ...])
none add multiple text properties
prop_clear({lnum} [, {lnum-end} [, {props}]])
@@ -494,6 +518,8 @@ readdirex({dir} [, {expr} [, {dict}]])
List file info in {dir} selected by {expr}
readfile({fname} [, {type} [, {max}]])
List get list of lines from file {fname}
redraw_listener_add({opts}) Number add callbacks to listen for redraws
redraw_listener_remove({id}) none remove a redraw listener
reduce({object}, {func} [, {initial}])
any reduce {object} using {func}
reg_executing() String get the executing register name
@@ -526,9 +552,10 @@ round({expr}) Float round off {expr}
rubyeval({expr}) any evaluate |Ruby| expression
screenattr({row}, {col}) Number attribute at screen position
screenchar({row}, {col}) Number character at screen position
screenchars({row}, {col}) List List of characters at screen position
screenchars({row}, {col}) List list of characters at screen position
screencol() Number current cursor column
screenpos({winid}, {lnum}, {col}) Dict screen row and col of a text character
screenpos({winid}, {lnum}, {col})
Dict screen row and col of a text character
screenrow() Number current cursor row
screenstring({row}, {col}) String characters at screen position
search({pattern} [, {flags} [, {stopline} [, {timeout} [, {skip}]]]])
@@ -569,7 +596,9 @@ setqflist({list} [, {action}]) Number modify quickfix list using {list}
setqflist({list}, {action}, {what})
Number modify specific quickfix list props
setreg({n}, {v} [, {opt}]) Number set register to value and type
settabvar({nr}, {varname}, {val}) none set {varname} in tab page {nr} to {val}
settabvar({nr}, {varname}, {val})
none set {varname} in tab page {nr} to
{val}
settabwinvar({tabnr}, {winnr}, {varname}, {val})
none set {varname} in window {winnr} in tab
page {tabnr} to {val}
@@ -599,7 +628,8 @@ sign_unplacelist({list}) List unplace a list of signs
simplify({filename}) String simplify filename as much as possible
sin({expr}) Float sine of {expr}
sinh({expr}) Float hyperbolic sine of {expr}
slice({expr}, {start} [, {end}]) String, List or Blob
slice({expr}, {start} [, {end}])
String/List/Blob
slice of a String, List or Blob
sort({list} [, {how} [, {dict}]])
List sort {list}, compare with {how}
@@ -629,7 +659,8 @@ strcharpart({str}, {start} [, {len} [, {skipcc}]])
String {len} characters of {str} at
character {start}
strchars({expr} [, {skipcc}]) Number character count of the String {expr}
strdisplaywidth({expr} [, {col}]) Number display length of the String {expr}
strdisplaywidth({expr} [, {col}])
Number display length of the String {expr}
strftime({format} [, {time}]) String format time with a specified format
strgetchar({str}, {index}) Number get char {index} from {str}
stridx({haystack}, {needle} [, {start}])
@@ -637,20 +668,24 @@ stridx({haystack}, {needle} [, {start}])
string({expr}) String String representation of {expr} value
strlen({expr}) Number length of the String {expr}
strpart({str}, {start} [, {len} [, {chars}]])
String {len} bytes/chars of {str} at
byte {start}
String {len} bytes/chars of {str} at byte
{start}
strptime({format}, {timestring})
Number Convert {timestring} to unix timestamp
Number convert {timestring} to unix timestamp
strridx({haystack}, {needle} [, {start}])
Number last index of {needle} in {haystack}
strtrans({expr}) String translate string to make it printable
strutf16len({string} [, {countcc}])
Number number of UTF-16 code units in {string}
strwidth({expr}) Number display cell length of the String {expr}
submatch({nr} [, {list}]) String or List
specific match in ":s" or substitute()
Number number of UTF-16 code units in
{string}
strwidth({expr}) Number display cell length of the String
{expr}
submatch({nr} [, {list}]) String/List
specific match in `:substitute` or
substitute()
substitute({expr}, {pat}, {sub}, {flags})
String all {pat} in {expr} replaced with {sub}
String all {pat} in {expr} replaced with
{sub}
swapfilelist() List swap files found in 'directory'
swapinfo({fname}) Dict information about swap file {fname}
swapname({buf}) String swap file of buffer {buf}
@@ -659,12 +694,14 @@ synIDattr({synID}, {what} [, {mode}])
String attribute {what} of syntax ID {synID}
synIDtrans({synID}) Number translated syntax ID of {synID}
synconcealed({lnum}, {col}) List info about concealing
synstack({lnum}, {col}) List stack of syntax IDs at {lnum} and {col}
synstack({lnum}, {col}) List stack of syntax IDs at {lnum} and
{col}
system({expr} [, {input}]) String output of shell command/filter {expr}
systemlist({expr} [, {input}]) List output of shell command/filter {expr}
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
tabpagewinnr({tabarg} [, {arg}])
Number number of current window in tab page
tagfiles() List tags files used
taglist({expr} [, {filename}]) List list of tags matching {expr}
tan({expr}) Float tangent of {expr}
@@ -694,7 +731,8 @@ term_setansicolors({buf}, {colors})
none set ANSI palette in GUI color mode
term_setapi({buf}, {expr}) none set |terminal-api| function name prefix
term_setkill({buf}, {how}) none set signal to stop job in terminal
term_setrestore({buf}, {command}) none set command to restore terminal
term_setrestore({buf}, {command})
none set command to restore terminal
term_setsize({buf}, {rows}, {cols})
none set the size of a terminal
term_start({cmd} [, {options}]) Number open a terminal window and run a job
@@ -734,8 +772,10 @@ timer_start({time}, {callback} [, {options}])
Number create a timer
timer_stop({timer}) none stop a timer
timer_stopall() none stop all timers
tolower({expr}) String the String {expr} switched to lowercase
toupper({expr}) String the String {expr} switched to uppercase
tolower({expr}) String the String {expr} switched to
lowercase
toupper({expr}) String the String {expr} switched to
uppercase
tr({src}, {fromstr}, {tostr}) String translate chars of {src} in {fromstr}
to chars in {tostr}
trim({text} [, {mask} [, {dir}]])
@@ -754,7 +794,7 @@ utf16idx({string}, {idx} [, {countcc} [, {charidx}]])
Number UTF-16 index of byte {idx} in {string}
values({dict}) List values in {dict}
virtcol({expr} [, {list} [, {winid}])
Number or List
Number/List
screen column of cursor or mark
virtcol2col({winid}, {lnum}, {col})
Number byte index of a character on screen
@@ -781,7 +821,8 @@ winheight({nr}) Number height of window {nr}
winlayout([{tabnr}]) List layout of windows in tab {tabnr}
winline() Number window line of the cursor
winnr([{expr}]) Number number of current window
winrestcmd() String returns command to restore window sizes
winrestcmd() String returns command to restore window
sizes
winrestview({dict}) none restore view of current window
winsaveview() Dict save view of current window
winwidth({nr}) Number width of window {nr}
@@ -909,7 +950,7 @@ appendbufline({buf}, {lnum}, {text}) *appendbufline()*
for an invalid {lnum}, since {lnum} isn't actually used.
Can also be used as a |method| after a List, the base is
passed as the second argument: >
passed as the third argument: >
mylist->appendbufline(buf, lnum)
<
Return type: |Number|
@@ -2072,51 +2113,6 @@ complete_info([{what}]) *complete_info()*
Return type: dict<any>
complete_match([{lnum}, {col}]) *complete_match()*
Searches backward from the given position and returns a List
of matches according to the 'isexpand' option. When no
arguments are provided, uses the current cursor position.
Each match is represented as a List containing
[startcol, trigger_text] where:
- startcol: column position where completion should start,
or -1 if no trigger position is found. For multi-character
triggers, returns the column of the first character.
- trigger_text: the matching trigger string from 'isexpand',
or empty string if no match was found or when using the
default 'iskeyword' pattern.
When 'isexpand' is empty, uses the 'iskeyword' pattern "\k\+$"
to find the start of the current keyword.
Examples: >
set isexpand=.,->,/,/*,abc
func CustomComplete()
let res = complete_match()
if res->len() == 0 | return | endif
let [col, trigger] = res[0]
let items = []
if trigger == '/*'
let items = ['/** */']
elseif trigger == '/'
let items = ['/*! */', '// TODO:', '// fixme:']
elseif trigger == '.'
let items = ['length()']
elseif trigger =~ '^\->'
let items = ['map()', 'reduce()']
elseif trigger =~ '^\abc'
let items = ['def', 'ghk']
endif
if items->len() > 0
let startcol = trigger =~ '^/' ? col : col + len(trigger)
call complete(startcol, items)
endif
endfunc
inoremap <Tab> <Cmd>call CustomComplete()<CR>
<
Return type: list<list<any>>
confirm({msg} [, {choices} [, {default} [, {type}]]]) *confirm()*
confirm() offers the user a dialog, from which a choice can be
made. It returns the number of the choice. For the first
@@ -2757,13 +2753,18 @@ executable({expr}) *executable()*
then the name is also tried without adding an extension.
On MS-Windows it only checks if the file exists and is not a
directory, not if it's really executable.
On MS-Windows an executable in the same directory as the Vim
executable is always found. Since this directory is added to
$PATH it should also work to execute it |win32-PATH|.
*NoDefaultCurrentDirectoryInExePath*
On MS-Windows an executable in Vim's current working directory
is also normally found, but this can be disabled by setting
the $NoDefaultCurrentDirectoryInExePath environment variable.
*$NoDefaultCurrentDirectoryInExePath*
On MS-Windows when using cmd.exe as 'shell' an executable in
Vim's current working directory is also normally found, which
can be disabled by setting the
`$NoDefaultCurrentDirectoryInExePath` environment variable.
This variable is always set by Vim when executing external
commands (e.g., via |:!|, |:make|, or |system()|) for security
reasons.
The result is a Number:
1 exists
@@ -2933,7 +2934,7 @@ exists({expr}) *exists()*
Can also be used as a |method|: >
Varname()->exists()
<
Return type: |String|
Return type: |Number|
exists_compiled({expr}) *exists_compiled()*
@@ -2950,7 +2951,7 @@ exists_compiled({expr}) *exists_compiled()*
Can only be used in a |:def| function. *E1233*
This does not work to check for arguments or local variables.
Return type: |String|
Return type: |Number|
exp({expr}) *exp()*
@@ -5389,9 +5390,13 @@ getwininfo([{winid}]) *getwininfo()*
{only with the +quickfix feature}
quickfix 1 if quickfix or location list window
{only with the +quickfix feature}
status_height status lines height (0 or 1)
tabnr tab page number
terminal 1 if a terminal window
{only with the +terminal feature}
tabnr tab page number
textoff number of columns occupied by any
'foldcolumn', 'signcolumn' and line
number in front of the text
topline first displayed buffer line
variables a reference to the dictionary with
window-local variables
@@ -5400,9 +5405,6 @@ getwininfo([{winid}]) *getwininfo()*
otherwise
wincol leftmost screen column of the window;
"col" from |win_screenpos()|
textoff number of columns occupied by any
'foldcolumn', 'signcolumn' and line
number in front of the text
winid |window-ID|
winnr window number
winrow topmost screen line of the window;
@@ -6819,9 +6821,10 @@ listener_add({callback} [, {buf} [, {unbuffered}]]) *listener_add()*
The entries are in the order the changes were made, thus the
most recent change is at the end.
Because of the third trigger reason for triggering a callback
listed above, the line numbers passed to the callback are not
guaranteed to be valid. If this is a problem then make
Because of the third reason for triggering a callback listed
above, the line numbers passed to the callback are not
guaranteed to be valid. In particular, the end value can be
greater than line('$') + 1. If this is a problem then make
{unbuffered} |TRUE|.
When {unbuffered} is |TRUE| the {callback} is invoked for every
@@ -8375,24 +8378,24 @@ printf({fmt}, {expr1} ...) *printf()*
*E1502*
You can re-use a [field-width] (or [precision]) argument: >
echo printf("%1$d at width %2$d is: %01$*2$d", 1, 2)
echo printf("%1$d at width %2$d is: %1$0*2$d", 1, 2)
< 1 at width 2 is: 01
However, you can't use it as a different type: >
echo printf("%1$d at width %2$ld is: %01$*2$d", 1, 2)
echo printf("%1$d at width %2$ld is: %1$0*2$d", 1, 2)
< E1502: Positional argument 2 used as field width reused as
different type: long int/int
*E1503*
When a positional argument is used, but not the correct number
or arguments is given, an error is raised: >
echo printf("%1$d at width %2$d is: %01$*2$.*3$d", 1, 2)
echo printf("%1$d at width %2$d is: %1$0*2$.*3$d", 1, 2)
< E1503: Positional argument 3 out of bounds: %1$d at width
%2$d is: %01$*2$.*3$d
%2$d is: %1$0*2$.*3$d
Only the first error is reported: >
echo printf("%01$*2$.*3$d %4$d", 1, 2)
< E1503: Positional argument 3 out of bounds: %01$*2$.*3$d
echo printf("%1$0*2$.*3$d %4$d", 1, 2)
< E1503: Positional argument 3 out of bounds: %1$0*2$.*3$d
%4$d
*E1504*
@@ -8824,6 +8827,48 @@ readfile({fname} [, {type} [, {max}]]) *readfile()*
Return type: list<string> or list<any>
redraw_listener_add({opts}) *redraw_listener_add()*
Add a listener that holds callback functions that will be
called at specific times in the redraw cycle. {opts} is a
dictionary that contain the callback functions to be defined.
At least one callback must be specified. *E1571*
Returns a unique ID that can be passed to
|redraw_listener_remove()|.
{opts} may have the following entries:
on_start Called first on each screen redraw. Takes no
arguments and returns nothing.
on_end Called at the end of each screen redraw.
Takes no arguments and returns nothing.
A good use case for this function is with the |listener_add()|
callback with unbuffered set to TRUE. This allows you to
modify the state on buffer changes, and finally render that
state just before the next redraw, only if it has changed.
Attempting to render or redraw for every single buffer change
would be very inefficient.
You may not call redraw_listener_add() during any of the
callbacks defined in {opts}. *E1570*
Can also be used as a |method|: >
GetOpts()->redraw_listener_add()
<
Return type: |Number|
redraw_listener_remove({id}) *redraw_listener_remove()*
Remove a redraw listener previously added with
|redraw_listener_add()|. Returns FALSE when {id} could not be
found, TRUE when {id} was removed.
Can also be used as a |method|: >
GetRedrawListenerId()->redraw_listener_remove()
<
Return type: |Number|
reduce({object}, {func} [, {initial}]) *reduce()* *E998*
{func} is called for every item in {object}, which can be a
|String|, |List|, |Tuple| or a |Blob|. {func} is called with

View File

@@ -1,4 +1,4 @@
*change.txt* For Vim version 9.1. Last change: 2025 Nov 09
*change.txt* For Vim version 9.1. Last change: 2025 Dec 18
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1094,7 +1094,8 @@ inside of strings can change! Also see 'softtabstop' option. >
*:y* *:yank* *E850*
:[range]y[ank] [x] Yank [range] lines [into register x]. Yanking to the
"* or "+ registers is possible only when the
|+clipboard| feature is included.
|+clipboard| or |+clipboard_provider| features are
included.
:[range]y[ank] [x] {count}
Yank {count} lines, starting with last line number

View File

@@ -1,4 +1,4 @@
*develop.txt* For Vim version 9.1. Last change: 2025 Nov 09
*develop.txt* For Vim version 9.1. Last change: 2025 Dec 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -153,7 +153,7 @@ VIM IS... NOT *design-not*
everything but the kitchen sink, but some people say that you can clean one
with it. ;-)"
To use Vim with gdb see |terminal-debugger|. Other (older) tools can be
found at http://www.agide.org (link seems dead) and http://clewn.sf.net.
found at http://clewn.sf.net.
- Vim is not a fancy GUI editor that tries to look nice at the cost of
being less consistent over all platforms. But functional GUI features are
welcomed.

View File

@@ -1,4 +1,4 @@
*eval.txt* For Vim version 9.1. Last change: 2025 Nov 09
*eval.txt* For Vim version 9.1. Last change: 2025 Dec 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -38,6 +38,7 @@ a remark is given.
12. The sandbox |eval-sandbox|
13. Textlock |textlock|
14. Vim script library |vim-script-library|
15. Clipboard providers |clipboard-providers|
Testing support is documented in |testing.txt|.
Profiling is documented at |profiling|.
@@ -1348,7 +1349,13 @@ To compare Funcrefs to see if they refer to the same function, ignoring bound
Dictionary and arguments, use |get()| to get the function name: >
if get(Part1, 'name') == get(Part2, 'name')
" Part1 and Part2 refer to the same function
< *E1037*
<
*E1437*
An |Object| can only be compared with another |Object|, using only the
"equal", "not equal", "is" and "isnot" operators |expr4|. An |enum| is also a
type of |Object|, and the same rules apply.
*E1037*
Using "is" or "isnot" with a |List|, |Tuple|, |Dictionary| or |Blob| checks
whether the expressions are referring to the same |List|, |Tuple|,
|Dictionary| or |Blob| instance. A copy of a |List| or |Tuple| is different
@@ -2247,7 +2254,14 @@ v:clipmethod The current method of accessing the clipboard that is being
x11 X11 selections are being used.
none The above methods are unavailable or
cannot be used.
See 'clipmethod' for more details.
If it is set to a value not in the above list, then a
clipboard provider with the given name is being used for the
clipboard functionality. See 'clipmethod' for more details.
*v:clipproviders*
v:clipproviders
A dictionary containing clipboard providers, see
|clipboard-providers| for more information.
*v:cmdarg* *cmdarg-variable*
v:cmdarg This variable is used for two purposes:
@@ -2381,8 +2395,8 @@ v:echospace Number of screen cells that can be used for an `:echo` message
available above the last line.
*v:errmsg* *errmsg-variable*
v:errmsg Last given error message. It's allowed to set this variable.
Example: >
v:errmsg Last error message that occurred (not necessarily displayed).
It's allowed to set this variable. Example: >
:let v:errmsg = ""
:silent! next
:if v:errmsg != ""
@@ -3698,7 +3712,7 @@ text...
*:cat* *:catch*
*E603* *E604* *E605* *E654* *E1033*
:cat[ch] /{pattern}/ The following commands until the next `:catch`,
:cat[ch] [/{pattern}/] The following commands until the next `:catch`,
`:finally`, or `:endtry` that belongs to the same
`:try` as the `:catch` are executed when an exception
matching {pattern} is being thrown and has not yet
@@ -3833,7 +3847,7 @@ text...
when the screen is redrawn.
*:echow* *:echowin* *:echowindow*
:[N]echow[indow] {expr1} ..
:[N]echow[indow] {expr1} ...
Like |:echomsg| but when the messages popup window is
available the message is displayed there. This means
it will show for three seconds and avoid a
@@ -5217,7 +5231,7 @@ $VIMRUNTIME/plugin/openPlugin.vim
dist#vim9#Open(file: string) ~
Opens `path` with the system default handler (macOS `open`, Windows
`explorer.exe`, Linux `xdg-open`, …). If the variable |g:Openprg| exists the
`start`, Linux `xdg-open`, …). If the variable |g:Openprg| exists the
string specified in the variable is used instead.
The |:Open| user command uses file completion for its argument.
@@ -5266,5 +5280,117 @@ Usage: >vim
:call dist#vim9#Launch(<args>)
:Launch <app> <args>.
<
==============================================================================
15. Clipboard providers *clipboard-providers*
The clipboard provider feature allows the "+" |quoteplus| and "*" |quotestar|
registers to be overridden by custom Vim script functions. There can be
multiple providers, and Vim chooses which one to use based on 'clipmethod'.
Despite the name, it should be treated separate from the clipboard
functionality. It essentially overrides the existing behaviour of the
clipboard registers.
*clipboard-providers-clipboard*
The clipboard provider feature will respect the "unnamed" and "unnamedplus"
values in the 'clipboard' option. Any other value will be ignored.
*clipboard-providers-no-clipboard*
If the |+clipboard| feature is not enabled, then the "+" and "*" registers
will not be enabled/available unless |v:clipmethod| is set to a provider. If
it is set to a provider, then the clipboard registers will be exposed despite
not having the |+clipboard| feature.
*clipboard-providers-plus*
If on a platform that only has the "*" register, then the "+" register will
only be available when |v:clipmethod| is set to a provider. If you want to
check if the "+" is available for use, it can be checked with: >
if has('unnamedplus')
<
*clipboard-providers-clipmethod*
To integrate the providers with Vim's clipboard functionality, the
'clipmethod' option is used on all platforms. The names of clipboard
providers should be put inside the option, and if Vim chooses it, then it
overrides the "+" and "*" registers. Note that the "+" and "*" will not be
saved in the viminfo at all.
*clipboard-providers-define*
To define a clipboard provider, the |v:clipproviders| vim variable is used. It
is a |dict| where each key is the clipboard provider name, and the value is
another |dict| declaring the "available", "copy", and "paste" callbacks: >vim
let v:clipproviders["myprovider"] = {
\ "available": function("Available"),
\ "paste": {
\ "+": function("Paste"),
\ "*": function("Paste")
\ },
\ "copy": {
\ "+": function("Copy"),
\ "*": function("Copy")
\ }
\ }
set clipmethod^=myprovider
<
Each callback can either be a name of a function in a string, a |Funcref|, or
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.
*clipboard-providers-textlock*
In both the "paste" and "copy" callbacks, it is not allowed to change the
buffer text, see |textlock|.
*clipboard-providers-available*
The "available" callback is optional, does not take any arguments and should
return a |boolean| or non-zero number, which tells Vim if it is available
for use. If it is not, then Vim skips over it and tries the next 'clipmethod'
value. If the "available" callback is not provided, Vim assumes the provider
is always available for use (true).
*clipboard-providers-paste*
The "paste" callback takes the following arguments in the following order:
1. Name of the register being accessed, either "+" or "*".
It should return a |list| or |tuple| containing the following elements in
order:
1. Register type (and optional width) conforming to |setreg()|. If it
is an empty string, then the type is automatically chosen.
2. A |list| of strings to return to Vim, each representing a line.
*clipboard-providers-copy*
The "copy" callback returns nothing and takes the following arguments in the
following order:
1. Name of the register being accessed, either "+" or "*".
2. Register type conforming to |getregtype()|
3. List of strings to use, each representing a line.
Below is a sample script that makes use of the clipboard provider feature: >vim
func Available()
return v:true
endfunc
func Copy(reg, type, str)
echom "Register: " .. a:reg
echom "Register type: " .. a:type
echom "Contents: " .. string(a:str)
endfunc
func Paste(reg)
return ("b40", ["this", "is", "the", a:reg, "register!"])
endfunc
let v:clipproviders["test"] = {
\ "available": function("Available"),
\ "copy": {
\ "+": function("Copy"),
\ "*": function("Copy")
\ },
\ "paste": {
\ "+": function("Paste"),
\ "*": function("Paste")
\ }
\ }
set clipmethod^=test
<
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*filetype.txt* For Vim version 9.1. Last change: 2025 Nov 09
*filetype.txt* For Vim version 9.1. Last change: 2025 Dec 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -138,6 +138,7 @@ what kind of file it is. This doesn't always work. A number of global
variables can be used to overrule the filetype used for certain extensions:
file name variable ~
*.app g:filetype_app
*.asa g:filetype_asa |ft-aspperl-syntax|
|ft-aspvbs-syntax|
*.asm g:asmsyntax |ft-asm-syntax|

View File

@@ -60,8 +60,8 @@ g:rust_conceal_pub~
*g:rust_recommended_style*
g:rust_recommended_style~
Set this option to enable vim indentation and textwidth settings to
conform to style conventions of the rust standard library (i.e. use 4
spaces for indents and sets 'textwidth' to 99). This option is enabled
conform to style conventions of the Rust style guide (i.e. use 4
spaces for indents and set 'textwidth' to 100). This option is enabled
by default. To disable it: >
let g:rust_recommended_style = 0
<

View File

@@ -1,4 +1,4 @@
*gui_w32.txt* For Vim version 9.1. Last change: 2025 Nov 09
*gui_w32.txt* For Vim version 9.1. Last change: 2025 Dec 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -504,4 +504,25 @@ To use the system's default title bar colors, set highlighting groups to
hi TitleBar guibg=NONE guifg=NONE
hi TitleBarNC guibg=NONE guifg=NONE
<
Full Screen *gui-w32-fullscreen*
To enable fullscreen mode in the Windows GUI version of Vim, add the 's' flag
to the 'guioptions' setting.
For convenience, you can define a command or mapping to toggle fullscreen mode:
>
command! ToggleFullscreen {
if &guioptions =~# 's'
set guioptions-=s
else
set guioptions+=s
endif
}
map <expr> <F11> &go =~# 's' ? ":se go-=s<CR>" : ":se go+=s<CR>"
The fullscreen mode will occupy the entire screen area while hiding window
decorations such as the title bar and borders.
vim:tw=78:sw=4:ts=8:noet:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*helphelp.txt* For Vim version 9.1. Last change: 2025 Nov 09
*helphelp.txt* For Vim version 9.1. Last change: 2025 Dec 02
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -158,11 +158,12 @@ When no argument is given to |:help| the file given with the 'helpfile' option
will be opened. Otherwise the specified tag is searched for in all "doc/tags"
files in the directories specified in the 'runtimepath' option.
If you would like to open the help in the current window, see this tip:
|help-curwin|.
The initial height of the help window can be set with the 'helpheight' option
(default 20).
If you want to open help on {subject} in the current window, the helpcurwin
optional package can be used. See |package-helpcurwin|.
*help-buffer-options*
When the help buffer is created, several local options are set to make sure
the help text is displayed as it was intended:

View File

@@ -1,4 +1,4 @@
*intro.txt* For Vim version 9.1. Last change: 2025 Nov 09
*intro.txt* For Vim version 9.1. Last change: 2025 Nov 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -275,7 +275,7 @@ Vim would never have become what it is now, without the help of these people!
improvements
Doug Kearns Runtime file maintainer
Foxe Chen Wayland support, new features
glepnir completion feature
glepnir work on improving completion feature, fixes
Girish Palya autocompletion (ins/cmdline), omnifunc
composing, search/subst completion, and more.
Hirohito Higashi lots of patches and fixes
@@ -450,6 +450,8 @@ notation meaning equivalent decimal value(s) ~
<Del> delete 127
<CSI> command sequence intro ALT-Esc 155 *<CSI>*
<xCSI> CSI when typed in the GUI *<xCSI>*
<OSC> operating system command 157 *<OSC>*
<xOSC> received OSC response *<xOSC>*
<EOL> end-of-line (can be <CR>, <NL> or <CR><NL>,
depends on system and 'fileformat') *<EOL>*

View File

@@ -1,4 +1,4 @@
*mbyte.txt* For Vim version 9.1. Last change: 2025 Nov 09
*mbyte.txt* For Vim version 9.1. Last change: 2025 Dec 17
VIM REFERENCE MANUAL by Bram Moolenaar et al.
@@ -601,7 +601,7 @@ Each field means:
- AVE: AVERAGE_WIDTH field. Ten times average width in pixels.
- CR: CHARSET_REGISTRY field. The name of the charset group.
- CE: CHARSET_ENCODING field. The rest of the charset name. For some
charsets, such as JIS X 0208, if this field is 0, code points has
charsets, such as JIS X 0208, if this field is 0, codepoints has
the same value as GL, and GR if 1.
For example, in case of a 16 dots font corresponding to JIS X 0208, it is

View File

@@ -1,4 +1,4 @@
*message.txt* For Vim version 9.1. Last change: 2025 Nov 09
*message.txt* For Vim version 9.1. Last change: 2025 Dec 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -848,6 +848,8 @@ and the screen is about to be redrawn:
like pressing <Space>. This makes it impossible to select text though.
-> For the GUI clicking the left mouse button in the last line works like
pressing <Space>.
-> |q| won't start recording into a register (rationale: it is often used as
"quit" prompt key by users)
If you accidentally hit <Enter> or <Space> and you want to see the displayed
text then use |g<|. This only works when 'more' is set.

View File

@@ -1,4 +1,4 @@
*options.txt* For Vim version 9.1. Last change: 2025 Nov 09
*options.txt* For Vim version 9.1. Last change: 2025 Dec 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1670,7 +1670,8 @@ A jump table for the options with a short description can be found at |Q_op|.
a modified version of the following command in your vimrc file to
override it: >
:let &cdpath = ',' .. substitute(substitute($CDPATH, '[, ]', '\\\0', 'g'), ':', ',', 'g')
< This option cannot be set from a |modeline| or in the |sandbox|, for
< Environment variables are expanded |:set_env|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
(parts of 'cdpath' can be passed to the shell to expand file names).
@@ -1814,13 +1815,19 @@ A jump table for the options with a short description can be found at |Q_op|.
for X-windows, "" otherwise)
global
{only in GUI versions or when the |+xterm_clipboard|
or |+wayland_clipboard| features are included}
or |+wayland_clipboard| features or
|+clipboard_provider| features are included}
This option is a list of comma-separated names.
Note: if one of the items is "exclude:", then you can't add an item
after that. Therefore do not append an item with += but use ^= to
prepend, e.g.: >
set clipboard^=unnamed
< When using the GUI see |'go-A'|.
When using the |clipboard-providers| feature, only the "unamed" and
"unnamedplus" features will be recognized If compiled without the
|+clipboard| feature but compiled with the |+clipboard_provider|
feature, then they will be the only values allowed and the other
values will be invalid.
These names are recognized:
*clipboard-unnamed*
@@ -1842,11 +1849,10 @@ A jump table for the options with a short description can be found at |Q_op|.
option, yank operations (but not delete, change or
put) will additionally copy the text into register
'*'. If Wayland is being used and the compositor does
not support the primary-selection-unstable-v1
protocol, then the regular selection is used in its
place. Only available with the |+X11| or
|+wayland_clipboard| feature. Availability can be
checked with: >
not support the primary selection then the regular
selection is used in its place. Only available with
the |+X11| or |+wayland_clipboard| feature.
Availability can be checked with: >
if has('unnamedplus')
<
*clipboard-autoselect*
@@ -1911,18 +1917,22 @@ A jump table for the options with a short description can be found at |Q_op|.
for VMS: "x11",
otherwise: "")
global
{only when the |+xterm_clipboard| or
|+wayland_clipboard| features are included}
Specifies which method of accessing the system clipboard is used,
depending on which method works first or is available. Supported
methods are:
{only when the |+xterm_clipboard|, |+wayland_clipboard|,
or |+eval| features are included}
Specifies which method of accessing the system clipboard (or clipboard
provider) is used. Methods are tried in the order given; the first
working method is used. Supported methods are:
wayland Wayland selections
x11 X11 selections
<name> Use a clipboard provider with the given name
Note: This option is ignored when either the GUI is running or if Vim
is run on a system without Wayland or X11 support, such as Windows or
macOS. The GUI or system way of accessing the clipboard is always
used instead.
macOS. The GUI or system way of accessing the clipboard is used
instead, meaning |v:clipmethod| will be set to "none". The
exception to this is the |clipboard-providers| feature, in which if
a clipboard provider is being used, then it will override the existing
clipboard functionality.
The option value is a list of comma separated items. The list is
parsed left to right in order, and the first method that Vim
@@ -1991,8 +2001,6 @@ A jump table for the options with a short description can be found at |Q_op|.
*'commentstring'* *'cms'* *E537*
'commentstring' 'cms' string (default "/* %s */")
local to buffer
{not available when compiled without the |+folding|
feature}
A template for a comment. The "%s" in the value is replaced with the
comment text, and should be padded with a space when possible.
Currently used to add markers for folding, see |fold-marker|. Also
@@ -2212,11 +2220,13 @@ A jump table for the options with a short description can be found at |Q_op|.
*'completefuzzycollect'* *'cfc'*
'completefuzzycollect' 'cfc' string (default: empty)
global
A comma-separated list of strings to enable fuzzy collection for
specific |ins-completion| modes, affecting how matches are gathered
during completion. For specified modes, fuzzy matching is used to
find completion candidates instead of the standard prefix-based
matching. This option can contain the following values:
DEPRECATED: This option is no longer used; changing it has no effect.
When 'completeopt' contains "fuzzy", Vim will internally use the
equivalent of:
"keyword,files,whole_line"
The values below are kept for compatibility and for scripts that
may read this option:
keyword keywords in the current file |i_CTRL-X_CTRL-N|
keywords with flags ".", "w", |i_CTRL-N| |i_CTRL-P|
@@ -2227,10 +2237,6 @@ A jump table for the options with a short description can be found at |Q_op|.
whole_line whole lines |i_CTRL-X_CTRL-L|
When using the 'completeopt' "longest" option value, fuzzy collection
can identify the longest common string among the best fuzzy matches
and insert it automatically.
*'completeitemalign'* *'cia'*
'completeitemalign' 'cia' string (default: "abbr,kind,menu")
global
@@ -2250,12 +2256,7 @@ A jump table for the options with a short description can be found at |Q_op|.
fuzzy Enable |fuzzy-matching| for completion candidates. This
allows for more flexible and intuitive matching, where
characters can be skipped and matches can be found even
if the exact sequence is not typed. Note: This option
does not affect the collection of candidate list, it only
controls how completion candidates are reduced from the
list of alternatives. If you want to use |fuzzy-matching|
to gather more alternatives for your candidate list,
see 'completefuzzycollect'.
if the exact sequence is not typed.
longest
When 'autocomplete' is not active, only the longest common
@@ -3066,6 +3067,7 @@ A jump table for the options with a short description can be found at |Q_op|.
To include a comma in a file name precede it with a backslash. Spaces
after a comma are ignored, otherwise spaces are included in the file
name. See |option-backslash| about using backslashes.
Environment variables are expanded |:set_env|.
This has nothing to do with the |Dictionary| variable type.
Where to find a list of words?
- On FreeBSD, there is the file "/usr/share/dict/words".
@@ -3209,9 +3211,10 @@ A jump table for the options with a short description can be found at |Q_op|.
internal Use the internal diff library. This is
ignored when 'diffexpr' is set. *E960*
When running out of memory when writing a
buffer this item will be ignored for diffs
involving that buffer. Set the 'verbose'
option to see when this happens.
buffer or the diff is larger than 1 GB this
item will be ignored for diffs involving that
buffer. Set the 'verbose' option to see when
this happens.
iwhite Ignore changes in amount of white space. Adds
the "-b" flag to the "diff" command if
@@ -4529,11 +4532,11 @@ A jump table for the options with a short description can be found at |Q_op|.
choices.
*'go-C'*
'C' Use |hl-TitleBar| and |hl-TitleBarNC| if available.
Currently only works for MS-Window GUI.
Currently only works for MS-Windows GUI.
See |gui-w32-title-bar| for details.
*'go-d'*
'd' Use dark theme variant if available. Currently only works for
GTK+ GUI.
MS-Windows and GTK+ GUI.
*'go-e'*
'e' Add tab pages when indicated with 'showtabline'.
'guitablabel' can be used to change the text in the labels.
@@ -4569,6 +4572,12 @@ A jump table for the options with a short description can be found at |Q_op|.
*'go-T'*
'T' Include Toolbar. Currently only in Win32, GTK+, Motif and
Photon GUIs.
*'go-s'*
's' Enable fullscreen mode. Currently only supported in the
MS-Windows GUI version. When set, the window will occupy the
entire screen and remove window decorations. Define custom
mappings to toggle this mode conveniently. For detailed usage
instructions, see |gui-w32-fullscreen|.
*'go-r'*
'r' Right-hand scrollbar is always present.
*'go-R'*
@@ -5236,23 +5245,6 @@ A jump table for the options with a short description can be found at |Q_op|.
and there is a letter before it, the completed part is made uppercase.
With 'noinfercase' the match is used as-is.
*'isexpand'* *'ise'*
'isexpand' 'ise' string (default: "")
local to buffer
Defines characters and patterns for completion in insert mode. Used
by the |complete_match()| function to determine the starting position
for completion. This is a comma-separated list of triggers. Each
trigger can be:
- A single character like "." or "/"
- A sequence of characters like "->", "/*", or "/**"
Note: Use "\\," to add a literal comma as trigger character, see
|option-backslash|.
Examples: >
set isexpand=.,->,/*,\\,
<
*'insertmode'* *'im'* *'noinsertmode'* *'noim'*
'insertmode' 'im' boolean (default off)
global
@@ -6118,7 +6110,7 @@ A jump table for the options with a short description can be found at |Q_op|.
:set mkspellmem=900000,3000,800
< If you have less than 512 Mbyte |:mkspell| may fail for some
languages, no matter what you set 'mkspellmem' to.
Environment variables are expanded |:set_env|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
@@ -6541,6 +6533,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'packpath'* *'pp'*
'packpath' 'pp' string (default: see 'runtimepath')
Directories used to find packages. See |packages|.
Environment variables are expanded |:set_env|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
@@ -7365,6 +7358,7 @@ A jump table for the options with a short description can be found at |Q_op|.
runtime files.
When Vim is started with |--clean| the home directory entries are not
included.
Environment variables are expanded |:set_env|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
@@ -8197,6 +8191,7 @@ A jump table for the options with a short description can be found at |Q_op|.
name if you want to. However, it will then only be used when
'spellfile' is set to it, for entries in 'spelllang' only files
without region name will be found.
Environment variables are expanded |:set_env|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
@@ -8324,7 +8319,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Only one of "best", "double" or "fast" may be used. The others may
appear several times in any order. Example: >
:set sps=file:~/.vim/sugg,best,expr:MySuggest()
<
< Environment variables are expanded |:set_env|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
@@ -9161,8 +9156,9 @@ A jump table for the options with a short description can be found at |Q_op|.
name. See |option-backslash| about using backslashes. The use of
|:set+=| and |:set-=| is preferred when adding or removing directories
from the list. This avoids problems when a future version uses
another default. Backticks cannot be used in this option for security
reasons.
another default.
Environment variables are expanded |:set_env|.
Backticks cannot be used in this option for security reasons.
*'thesaurusfunc'* *'tsrfu'*
'thesaurusfunc' 'tsrfu' string (default: empty)
@@ -9490,6 +9486,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'ttytype' 'tty' string (default from $TERM)
global
Alias for 'term', see above.
Environment variables are expanded |:set_env|.
*'undodir'* *'udir'*
'undodir' 'udir' string (default ".")
@@ -9507,6 +9504,7 @@ A jump table for the options with a short description can be found at |Q_op|.
undo file that exists is used. When it cannot be read an error is
given, no further entry is used.
See |undo-persistence|.
Environment variables are expanded |:set_env|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
@@ -9658,6 +9656,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Setting 'verbosefile' to a new value is like making it empty first.
The difference with |:redir| is that verbose messages are not
displayed when 'verbosefile' is set.
Environment variables are expanded |:set_env|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
@@ -9672,6 +9671,7 @@ A jump table for the options with a short description can be found at |Q_op|.
feature}
Name of the directory where to store files for |:mkview|.
For $XDG_CONFIG_HOME see |xdg-base-dir|.
Environment variables are expanded |:set_env|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
@@ -9827,6 +9827,7 @@ A jump table for the options with a short description can be found at |Q_op|.
When equal to "NONE" no viminfo file will be read or written.
This option can be set with the |-i| command line flag. The |--clean|
command line flag sets it to "NONE".
Environment variables are expanded |:set_env|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.

View File

@@ -1,4 +1,4 @@
*print.txt* For Vim version 9.1. Last change: 2025 Nov 09
*print.txt* For Vim version 9.1. Last change: 2025 Dec 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -304,7 +304,7 @@ another font will be used as follows:
if o: is missing, then use b:
Some CJK fonts do not contain characters for codes in the ASCII code range.
Also, some characters in the CJK ASCII code ranges differ in a few code points
Also, some characters in the CJK ASCII code ranges differ in a few codepoints
from traditional ASCII characters. There are two additional fields to control
printing of characters in the ASCII code range.

View File

@@ -1,4 +1,4 @@
*quickfix.txt* For Vim version 9.1. Last change: 2025 Nov 09
*quickfix.txt* For Vim version 9.1. Last change: 2025 Dec 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1281,6 +1281,17 @@ For writing a compiler plugin, see |write-compiler-plugin|.
Use the |compiler-make| plugin to undo the effect of a compiler plugin.
BIOME *compiler-biome* *quickfix-biome*
Biome check lints JavaScript, TypeScript, JSX, TSX, JSON, JSONC, HTML, Vue,
Svelte, Astro, CSS, GraphQL and GritQL files.
Commonly used compiler options can be added to 'makeprg' by setting the
b/g:biome_makeprg_params variable. For example (global default is ""): >
let b:biome_makeprg_params = "--diagnostic-level=error --staged"
CPPCHECK *quickfix-cppcheck* *compiler-cppcheck*
Use g/b:`c_cppcheck_params` to set cppcheck parameters. The global
@@ -1643,6 +1654,15 @@ b/g:mypy_makeprg_params variable. For example: >
The global default is "--strict --ignore-missing-imports".
TY TYPE CHECKER *compiler-ty*
Commonly used compiler options and executable can be set by the
b/g:ty_makeprg variable. For example: >
let b:ty_makeprg = "uv run ty"
The global default is "ty --no-progress --color=never".
RUFF LINTER *compiler-ruff*
Commonly used compiler options can be added to 'makeprg' by setting the

View File

@@ -1,4 +1,4 @@
*starting.txt* For Vim version 9.1. Last change: 2025 Nov 09
*starting.txt* For Vim version 9.1. Last change: 2025 Dec 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1287,7 +1287,7 @@ CTRL-Z Suspend Vim, like ":stop".
Works in Normal and in Visual mode. In Insert and
Command-line mode, the CTRL-Z is inserted as a normal
character. In Visual mode Vim goes back to Normal
mode.
mode before suspending.
Note: if CTRL-Z undoes a change see |mswin.vim|.

View File

@@ -9,6 +9,7 @@ $HOME-windows options.txt /*$HOME-windows*
$MYGVIMRC gui.txt /*$MYGVIMRC*
$MYVIMDIR starting.txt /*$MYVIMDIR*
$MYVIMRC starting.txt /*$MYVIMRC*
$NoDefaultCurrentDirectoryInExePath builtin.txt /*$NoDefaultCurrentDirectoryInExePath*
$VIM starting.txt /*$VIM*
$VIM-use version5.txt /*$VIM-use*
$VIMRUNTIME starting.txt /*$VIMRUNTIME*
@@ -376,6 +377,7 @@ $quote eval.txt /*$quote*
'go-m' options.txt /*'go-m'*
'go-p' options.txt /*'go-p'*
'go-r' options.txt /*'go-r'*
'go-s' options.txt /*'go-s'*
'go-t' options.txt /*'go-t'*
'go-v' options.txt /*'go-v'*
'gp' options.txt /*'gp'*
@@ -449,8 +451,6 @@ $quote eval.txt /*$quote*
'infercase' options.txt /*'infercase'*
'insertmode' options.txt /*'insertmode'*
'is' options.txt /*'is'*
'ise' options.txt /*'ise'*
'isexpand' options.txt /*'isexpand'*
'isf' options.txt /*'isf'*
'isfname' options.txt /*'isfname'*
'isi' options.txt /*'isi'*
@@ -1411,6 +1411,7 @@ $quote eval.txt /*$quote*
+cindent various.txt /*+cindent*
+clientserver various.txt /*+clientserver*
+clipboard various.txt /*+clipboard*
+clipboard_provider various.txt /*+clipboard_provider*
+clipboard_working various.txt /*+clipboard_working*
+cmd editing.txt /*+cmd*
+cmdline_compl various.txt /*+cmdline_compl*
@@ -3841,6 +3842,7 @@ $quote eval.txt /*$quote*
<NL> motion.txt /*<NL>*
<Nop> map.txt /*<Nop>*
<Nul> intro.txt /*<Nul>*
<OSC> intro.txt /*<OSC>*
<PageDown> scroll.txt /*<PageDown>*
<PageUp> scroll.txt /*<PageUp>*
<Plug> map.txt /*<Plug>*
@@ -3961,6 +3963,7 @@ $quote eval.txt /*$quote*
<xHome> term.txt /*<xHome>*
<xHome>-xterm term.txt /*<xHome>-xterm*
<xLeft> term.txt /*<xLeft>*
<xOSC> intro.txt /*<xOSC>*
<xRight> term.txt /*<xRight>*
<xUp> term.txt /*<xUp>*
= change.txt /*=*
@@ -4668,6 +4671,7 @@ E1433 vim9.txt /*E1433*
E1434 vim9.txt /*E1434*
E1435 vim9class.txt /*E1435*
E1436 vim9class.txt /*E1436*
E1437 eval.txt /*E1437*
E144 various.txt /*E144*
E145 starting.txt /*E145*
E146 change.txt /*E146*
@@ -4753,6 +4757,8 @@ E1567 remote.txt /*E1567*
E1568 options.txt /*E1568*
E1569 builtin.txt /*E1569*
E157 sign.txt /*E157*
E1570 builtin.txt /*E1570*
E1571 builtin.txt /*E1571*
E158 sign.txt /*E158*
E159 sign.txt /*E159*
E16 cmdline.txt /*E16*
@@ -5777,7 +5783,6 @@ Neovim intro.txt /*Neovim*
NetBSD-backspace options.txt /*NetBSD-backspace*
NetBeans netbeans.txt /*NetBeans*
NetUserPass() pi_netrw.txt /*NetUserPass()*
NoDefaultCurrentDirectoryInExePath builtin.txt /*NoDefaultCurrentDirectoryInExePath*
None eval.txt /*None*
Normal intro.txt /*Normal*
Normal-mode intro.txt /*Normal-mode*
@@ -6692,6 +6697,16 @@ clipboard-autoselectml options.txt /*clipboard-autoselectml*
clipboard-autoselectplus options.txt /*clipboard-autoselectplus*
clipboard-exclude options.txt /*clipboard-exclude*
clipboard-html options.txt /*clipboard-html*
clipboard-providers eval.txt /*clipboard-providers*
clipboard-providers-available eval.txt /*clipboard-providers-available*
clipboard-providers-clipboard eval.txt /*clipboard-providers-clipboard*
clipboard-providers-clipmethod eval.txt /*clipboard-providers-clipmethod*
clipboard-providers-copy eval.txt /*clipboard-providers-copy*
clipboard-providers-define eval.txt /*clipboard-providers-define*
clipboard-providers-no-clipboard eval.txt /*clipboard-providers-no-clipboard*
clipboard-providers-paste eval.txt /*clipboard-providers-paste*
clipboard-providers-plus eval.txt /*clipboard-providers-plus*
clipboard-providers-textlock eval.txt /*clipboard-providers-textlock*
clipboard-unnamed options.txt /*clipboard-unnamed*
clipboard-unnamedplus options.txt /*clipboard-unnamedplus*
clojure-indent indent.txt /*clojure-indent*
@@ -6739,6 +6754,7 @@ compile-changes-7 version7.txt /*compile-changes-7*
compile-changes-8 version8.txt /*compile-changes-8*
compile-changes-9 version9.txt /*compile-changes-9*
compile-changes-9.2 version9.txt /*compile-changes-9.2*
compiler-biome quickfix.txt /*compiler-biome*
compiler-compaqada ft_ada.txt /*compiler-compaqada*
compiler-cppcheck quickfix.txt /*compiler-cppcheck*
compiler-decada ft_ada.txt /*compiler-decada*
@@ -6764,6 +6780,7 @@ compiler-spotbugs quickfix.txt /*compiler-spotbugs*
compiler-tex quickfix.txt /*compiler-tex*
compiler-tombi quickfix.txt /*compiler-tombi*
compiler-tsc quickfix.txt /*compiler-tsc*
compiler-ty quickfix.txt /*compiler-ty*
compiler-typst quickfix.txt /*compiler-typst*
compiler-vaxada ft_ada.txt /*compiler-vaxada*
compl-current insert.txt /*compl-current*
@@ -6798,7 +6815,6 @@ complete_add() builtin.txt /*complete_add()*
complete_check() builtin.txt /*complete_check()*
complete_info() builtin.txt /*complete_info()*
complete_info_mode builtin.txt /*complete_info_mode*
complete_match() builtin.txt /*complete_match()*
completed_item-variable eval.txt /*completed_item-variable*
completion-functions usr_41.txt /*completion-functions*
complex-change change.txt /*complex-change*
@@ -6815,6 +6831,7 @@ conversion-server mbyte.txt /*conversion-server*
convert-to-HTML syntax.txt /*convert-to-HTML*
convert-to-XHTML syntax.txt /*convert-to-XHTML*
convert-to-XML syntax.txt /*convert-to-XML*
convert_:function_to_:def vim9.txt /*convert_:function_to_:def*
convert_legacy_function_to_vim9 vim9.txt /*convert_legacy_function_to_vim9*
copy() builtin.txt /*copy()*
copy-diffs diff.txt /*copy-diffs*
@@ -8233,6 +8250,7 @@ gui-vert-scroll gui.txt /*gui-vert-scroll*
gui-w32 gui_w32.txt /*gui-w32*
gui-w32-cmdargs gui_w32.txt /*gui-w32-cmdargs*
gui-w32-dialogs gui_w32.txt /*gui-w32-dialogs*
gui-w32-fullscreen gui_w32.txt /*gui-w32-fullscreen*
gui-w32-printing gui_w32.txt /*gui-w32-printing*
gui-w32-start gui_w32.txt /*gui-w32-start*
gui-w32-title-bar gui_w32.txt /*gui-w32-title-bar*
@@ -8308,7 +8326,6 @@ help helphelp.txt /*help*
help-TOC helphelp.txt /*help-TOC*
help-buffer-options helphelp.txt /*help-buffer-options*
help-context help.txt /*help-context*
help-curwin tips.txt /*help-curwin*
help-notation helphelp.txt /*help-notation*
help-summary usr_02.txt /*help-summary*
help-tags tags 1
@@ -9604,6 +9621,7 @@ os_risc.txt os_risc.txt /*os_risc.txt*
os_unix.txt os_unix.txt /*os_unix.txt*
os_vms.txt os_vms.txt /*os_vms.txt*
os_win32.txt os_win32.txt /*os_win32.txt*
osc52-install usr_05.txt /*osc52-install*
other-features vi_diff.txt /*other-features*
out_buf channel.txt /*out_buf*
out_cb channel.txt /*out_cb*
@@ -9621,12 +9639,14 @@ package-create repeat.txt /*package-create*
package-doc repeat.txt /*package-doc*
package-documentation repeat.txt /*package-documentation*
package-editorconfig usr_05.txt /*package-editorconfig*
package-helpcurwin tips.txt /*package-helpcurwin*
package-helptoc helphelp.txt /*package-helptoc*
package-hlyank usr_05.txt /*package-hlyank*
package-justify usr_25.txt /*package-justify*
package-matchit usr_05.txt /*package-matchit*
package-nohlsearch usr_05.txt /*package-nohlsearch*
package-open eval.txt /*package-open*
package-osc52 usr_05.txt /*package-osc52*
package-termdebug terminal.txt /*package-termdebug*
package-translate_example repeat.txt /*package-translate_example*
package-translation repeat.txt /*package-translation*
@@ -9931,6 +9951,7 @@ quake.vim syntax.txt /*quake.vim*
quickfix quickfix.txt /*quickfix*
quickfix-6 version6.txt /*quickfix-6*
quickfix-ID quickfix.txt /*quickfix-ID*
quickfix-biome quickfix.txt /*quickfix-biome*
quickfix-buffer quickfix.txt /*quickfix-buffer*
quickfix-changedtick quickfix.txt /*quickfix-changedtick*
quickfix-context quickfix.txt /*quickfix-context*
@@ -10016,6 +10037,8 @@ recovery recover.txt /*recovery*
recursive_mapping map.txt /*recursive_mapping*
redo undo.txt /*redo*
redo-register undo.txt /*redo-register*
redraw_listener_add() builtin.txt /*redraw_listener_add()*
redraw_listener_remove() builtin.txt /*redraw_listener_remove()*
reduce() builtin.txt /*reduce()*
ref intro.txt /*ref*
reference intro.txt /*reference*
@@ -11256,6 +11279,7 @@ v:char eval.txt /*v:char*
v:charconvert_from eval.txt /*v:charconvert_from*
v:charconvert_to eval.txt /*v:charconvert_to*
v:clipmethod eval.txt /*v:clipmethod*
v:clipproviders eval.txt /*v:clipproviders*
v:cmdarg eval.txt /*v:cmdarg*
v:cmdbang eval.txt /*v:cmdbang*
v:collate eval.txt /*v:collate*
@@ -11636,6 +11660,7 @@ vim9-types vim9.txt /*vim9-types*
vim9-unpack-ignore vim9.txt /*vim9-unpack-ignore*
vim9-user-command vim9.txt /*vim9-user-command*
vim9-variable-arguments vim9.txt /*vim9-variable-arguments*
vim9-white-space vim9.txt /*vim9-white-space*
vim9.txt vim9.txt /*vim9.txt*
vim9class.txt vim9class.txt /*vim9class.txt*
vim9script vim9.txt /*vim9script*

View File

@@ -1,4 +1,4 @@
*terminal.txt* For Vim version 9.1. Last change: 2025 Oct 14
*terminal.txt* For Vim version 9.1. Last change: 2025 Nov 28
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1877,7 +1877,7 @@ Contributions for termdebug improvements are welcome.
However, it is fairly common that during the development process you need some
mechanisms like `echo` statements (or similar) to help you in your job.
For this reason, you can set: >
let g:termdebug_config['debug'] = true
let g:termdebug_config['debug'] = v:true
<
This sets the `DEBUG` variable to `true`, which can be referenced in the
source code. An example of its usage follows: >

View File

@@ -1,4 +1,4 @@
*tips.txt* For Vim version 9.1. Last change: 2025 Nov 09
*tips.txt* For Vim version 9.1. Last change: 2025 Dec 02
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30,7 +30,7 @@ Executing shell commands in a window |shell-window|
Hex editing |hex-editing|
Using <> notation in autocommands |autocmd-<>|
Highlighting matching parens |match-parens|
Opening help in the current window |help-curwin|
Opening help in the current window |package-helpcurwin|
==============================================================================
Editing C programs *C-editing*
@@ -544,28 +544,22 @@ A slightly more advanced version is used in the |matchparen| plugin.
<
==============================================================================
Opening help in the current window *help-curwin*
Opening help in the current window *package-helpcurwin*
By default, help is displayed in a split window. If you prefer it opens in
the current window, try this custom `:HelpCurwin` command:
>
command -bar -nargs=? -complete=help HelpCurwin execute s:HelpCurwin(<q-args>)
let s:did_open_help = v:false
By default, help is displayed in a split window. In some scenarios, you may
prefer to open the help in the current window. The optional helpcurwin
package makes this possible. Load the package manually, or in your |vimrc|,
with: >vim
function s:HelpCurwin(subject) abort
let mods = 'silent noautocmd keepalt'
if !s:did_open_help
execute mods .. ' help'
execute mods .. ' helpclose'
let s:did_open_help = v:true
endif
if !getcompletion(a:subject, 'help')->empty()
execute mods .. ' edit ' .. &helpfile
set buftype=help
endif
return 'help ' .. a:subject
endfunction
packadd helpcurwin
<
After it has loaded:
- The command `:HelpCurwin` {subject} can be used to open help in the current
window.
- If the current window contains a modified buffer, the plugin asks for
confirmation before replacing it. If confirmed, the buffer becomes
hidden |hidden-buffer|.
- The help file, |helpcurwin.txt|, will be available and describes the plugin
in more details.
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*todo.txt* For Vim version 9.1. Last change: 2025 Nov 09
*todo.txt* For Vim version 9.1. Last change: 2025 Dec 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -309,8 +309,6 @@ Problem with Visual highlight when 'linebreak' and 'showbreak' are set.
GUI Scroll test fails on FreeBSD when using Motif. See FIXME in
Test_scrollbars in src/test_gui.vim
Support dark mode for MS-Windows: #12282
Remote command escapes single quote with backslash, should be doubling the
single quote in vim_strsave_escaped_ext() #12202.
@@ -538,9 +536,6 @@ when redirecting to a local variable (function or script) storing the value
won't work. At least give an error. Is there a way to make it work?
#10616
Completion for ":runtime" should show valid values, not what's in the current
directory. (#11447)
Add a "description" property to mappings. #12205
Add an option to start_timer() to return from the input loop with K_IGNORE.

View File

@@ -1,4 +1,4 @@
*uganda.txt* For Vim version 9.1. Last change: 2025 Nov 09
*uganda.txt* For Vim version 9.1. Last change: 2025 Nov 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -65,12 +65,14 @@ II) It is allowed to distribute a modified (or extended) version of Vim,
maintainer will do with your changes and under what license they
will be distributed is negotiable. If there has been no negotiation
then this license, or a later version, also applies to your changes.
The current maintainers are listed here: https://github.com/orgs/vim/people.
If this changes it will be announced in appropriate places (most likely
vim.sf.net, www.vim.org and/or comp.editors). When it is completely
impossible to contact the maintainer, the obligation to send him
your changes ceases. Once the maintainer has confirmed that he has
received your changes they will not have to be sent again.
The current maintainers are listed here:
https://github.com/orgs/vim/people
If this changes it will be announced in appropriate places (most
likely vim.sf.net, www.vim.org and/or comp.editors). When it is
completely impossible to contact the maintainer, the obligation to
send him your changes ceases. Once the maintainer has confirmed
that he has received your changes they will not have to be sent
again.
b) If you have received a modified Vim that was distributed as
mentioned under a) you are allowed to further distribute it
unmodified, as mentioned at I). If you make additional changes the
@@ -225,7 +227,7 @@ Sending money:
Check the Kuwasha web site for the latest information!
Look on their site for information about sponsorship:
https://www.kuwasha.net/
https://www.kuwasha.net/
If you make a donation to Kuwasha you will receive a tax
receipt which can be submitted with your tax return.

View File

@@ -1,4 +1,4 @@
*userfunc.txt* For Vim version 9.1. Last change: 2025 Oct 28
*userfunc.txt* For Vim version 9.1. Last change: 2025 Dec 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -80,11 +80,11 @@ See |:verbose-cmd| for more information.
matching |:endfunction|.
*E1267*
The name must be made of alphanumeric characters and
'_', and must start with a capital or "s:" (see
above). Note that using "b:" or "g:" is not allowed.
(since patch 7.4.260 E884 is given if the function
name has a colon in the name, e.g. for "foo:bar()".
Before that patch no error was given).
'_' and must start with a capital or "s:" (see above).
Note that using "b:", "l:", etc. is not allowed (since
patch 7.4.260 E884 is given if the function name has a
colon, e.g. for "foo:bar()"), while a leading "g:" is
skipped and still requires a following capital letter.
{name} can also be a |Dictionary| entry that is a
|Funcref|: >

View File

@@ -1,4 +1,4 @@
*usr_05.txt* For Vim version 9.1. Last change: 2025 Nov 09
*usr_05.txt* For Vim version 9.1. Last change: 2025 Dec 15
VIM USER MANUAL by Bram Moolenaar
@@ -399,13 +399,17 @@ The ":map" command (with no arguments) lists your current mappings. At
least the ones for Normal mode. More about mappings in section |40.1|.
==============================================================================
*05.5* Adding a package *add-package* *matchit-install* *package-matchit*
*05.5* Adding a package *add-package*
A package is a set of files that you can add to Vim. There are two kinds of
packages: optional and automatically loaded on startup.
The Vim distribution comes with a few packages that you can optionally use.
For example, the matchit plugin. This plugin makes the "%" command jump to
------------------------------------------------------------------------------
Adding the matchit package *matchit-install* *package-matchit*
------------------------------------------------------------------------------
For example, the matchit package This plugin makes the "%" command jump to
matching HTML tags, if/else/endif in Vim scripts, etc. Very useful, although
it's not backwards compatible (that's why it is not enabled by default).
@@ -434,7 +438,9 @@ an archive or as a repository. For an archive you can follow these steps:
Here "fancytext" is the name of the package, it can be anything
else.
------------------------------------------------------------------------------
Adding the editorconfig package *editorconfig-install* *package-editorconfig*
------------------------------------------------------------------------------
Similar to the matchit package, to load the distributed editorconfig plugin
when Vim starts, add the following line to your vimrc file: >
@@ -444,7 +450,9 @@ After restarting your Vim, the plugin is active and you can read about it at: >
:h editorconfig.txt
------------------------------------------------------------------------------
Adding the comment package *comment-install* *package-comment*
------------------------------------------------------------------------------
Load the plugin with this command: >
packadd comment
@@ -457,7 +465,9 @@ the package loaded. Once the package is loaded, read about it at: >
:h comment.txt
------------------------------------------------------------------------------
Adding the nohlsearch package *nohlsearch-install* *package-nohlsearch*
------------------------------------------------------------------------------
Load the plugin with this command: >
packadd nohlsearch
@@ -471,7 +481,9 @@ To disable the effect of the plugin after it has been loaded: >
au! nohlsearch
<
------------------------------------------------------------------------------
Adding the highlight-yank package *hlyank-install* *package-hlyank*
------------------------------------------------------------------------------
Load the plugin with this command: >
packadd hlyank
@@ -497,6 +509,20 @@ To highlight in visual mode, use: >
To disable the effect of the plugin after it has been loaded: >
au! hlyank
------------------------------------------------------------------------------
Adding the osc52 package *osc52-install* *package-osc52*
------------------------------------------------------------------------------
Load the plugin with this command: >
packadd osc52
<
The osc52.vim package provides support for the OSC 52 terminal command, which
allows an application to access the clipboard by communicating directly with
your terminal.
Once the package is loaded, read about it at: >
:h osc52.txt
More information about packages can be found here: |packages|.
==============================================================================

View File

@@ -1,4 +1,4 @@
*usr_08.txt* For Vim version 9.1. Last change: 2025 Nov 09
*usr_08.txt* For Vim version 9.1. Last change: 2025 Nov 26
VIM USER MANUAL by Bram Moolenaar
@@ -444,7 +444,8 @@ To go the other way use: >
[c
Prepended a count to jump further away.
Prepend a count to jump further away. Thus "4]c" jumps to the fourth next
change, and "3[c" jumps to the third previous change.
REMOVING CHANGES

View File

@@ -1,4 +1,4 @@
*usr_30.txt* For Vim version 9.1. Last change: 2025 Nov 09
*usr_30.txt* For Vim version 9.1. Last change: 2025 Nov 28
VIM USER MANUAL by Bram Moolenaar
@@ -544,7 +544,7 @@ reach the nearest soft tab stop. The following example uses
<Tab><Tab>a<Tab><BS> ------->a
To maintain global coherence, one can `:set softtabstop=-1` so that
the value of 'shiftwidth' is use for the number of columns between two soft
the value of 'shiftwidth' is used for the number of columns between two soft
tab stops.
If you prefer to have different values for 'shiftwidth' and 'softtabstop',

View File

@@ -1,4 +1,4 @@
*usr_41.txt* For Vim version 9.1. Last change: 2025 Nov 09
*usr_41.txt* For Vim version 9.1. Last change: 2025 Dec 13
VIM USER MANUAL by Bram Moolenaar
@@ -1137,8 +1137,6 @@ Insert mode completion: *completion-functions*
complete_add() add to found matches
complete_check() check if completion should be aborted
complete_info() get current completion information
complete_match() get insert completion start match col and
trigger text
preinserted() check if text is inserted after cursor
pumvisible() check if the popup menu is displayed
pum_getpos() position and size of popup menu if visible
@@ -1475,6 +1473,9 @@ Various: *various-functions*
debugbreak() interrupt a program being debugged
redraw_listener_add() add callbacks to listen for redraws
redraw_listener_remove() remove a redraw listener
==============================================================================
*41.7* Defining a function

View File

@@ -1,4 +1,4 @@
*various.txt* For Vim version 9.1. Last change: 2025 Nov 09
*various.txt* For Vim version 9.1. Last change: 2025 Dec 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -379,6 +379,7 @@ T *+cindent* 'cindent', C indenting; Always enabled
N *+clientserver* Unix and Win32: Remote invocation |clientserver|
*+clipboard* |clipboard| support compiled-in
*+clipboard_working* |clipboard| support compiled-in and working
*+clipboard_provider* |clipboard-providers| support compiled-in
T *+cmdline_compl* command line completion |cmdline-completion|
T *+cmdline_hist* command line history |cmdline-history|
T *+cmdline_info* 'showcmd' and 'ruler'; Always enabled since

View File

@@ -1,4 +1,4 @@
*version9.txt* For Vim version 9.1. Last change: 2025 Nov 09
*version9.txt* For Vim version 9.1. Last change: 2025 Dec 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -41627,8 +41627,9 @@ Other new features ~
------------------
- Support for Super key mappings in GTK using <D-Key>.
- The new packages |package-comment|, |package-nohlsearch|, |package-hlyank| and
|help-TOC| are included.
- The new optional packages |package-comment|, |package-nohlsearch|,
|package-hlyank|, |help-TOC|, |package-helpcurwin| and |package-osc52| are
included.
- An interactive tutor plugin has been included |vim-tutor-mode| and can be
started via |:Tutor|.
@@ -41653,6 +41654,8 @@ Other new features ~
- |items()| function now supports Blob.
- The clipboard provider feature has been added |clipboard-providers|.
*changed-9.2*
Changed~
-------
@@ -41692,6 +41695,8 @@ Completion: ~
- 'smartcase' applies to completion filtering
Options: ~
- 'commentstring' is now available in all builds and no longer requires the
|+folding| feature
- the default for 'commentstring' contains whitespace padding to have
automatic comments look nicer |comment-install|
- 'completeopt' is now a |global-local| option.
@@ -41717,6 +41722,10 @@ Options: ~
to ">" by default, indicating text that extends beyond the window width.
- 'guioptions': New value |'go-C'| to style the title/caption bar on Windows 11
(see also the below platform specific change).
- 'guioptions': Support darkmode on MS-Windows for menu and title bar using
|'go-d'| (see also the below platform specific change).
- 'guioptions': New value |'go-s'| to support fullscreen on MS-Windows GUI
(see also the below platform specific change).
- 'completepopup': Add more values to style popup windows.
Ex commands: ~
@@ -41746,6 +41755,8 @@ Functions: ~
- |sha256()| also accepts a |Blob| as argument.
- |listener_add()| allows to register un-buffered listeners, so that changes
are handled as soon as they happen.
- |redraw_listener_add()| and |redraw_listener_remove()| add/remove callbacks
for redrawing events.
Plugins~
- |zip| plugin works with PowerShell Core.
@@ -41754,7 +41765,13 @@ Platform specific ~
- MS-Winodws: Paths like "\Windows" and "/Windows" are now considered to be
absolute paths (to the current drive) and no longer relative.
- MS-Windows: The title bar follows the |hl-TitleBar| and |hl-TitleBarNC|
highlighting group |gui-w32-title-bar|.
highlighting group |gui-w32-title-bar| with |'go-C'|
- MS-Windows: Support darkmode for menu and title bar using |'go-d'|
- MS-Windows: Vim no longer searches the current directory for
executables when running external commands; prefix a relative or absolute
path if you want the old behavior |$NoDefaultCurrentDirectoryInExePath|.
- MS-Windows: New value |'go-s'| to support fullscreen on MS-Windows GUI
- macOS: increase default scheduler priority to TASK_DEFAULT_APPLICATION.
Others: ~
@@ -41800,7 +41817,6 @@ Functions: ~
|blob2str()| convert a blob into a List of strings
|bindtextdomain()| set message lookup translation base path
|cmdcomplete_info()| get current cmdline completion info
|complete_match()| get completion and trigger info
|diff()| diff two Lists of strings
|filecopy()| copy a file {from} to {to}
|foreach()| apply function to List items
@@ -41820,6 +41836,8 @@ Functions: ~
|popup_setbuf()| switch to a different buffer in a popup
|preinserted()| whether preinserted text has been inserted during
completion (see 'completeopt')
|redraw_listener_add()| add callbacks to listen for redraws
|redraw_listener_remove()| remove a redraw listener
|str2blob()| convert a List of strings into a blob
|test_null_tuple()| return a null tuple
|tuple2list()| turn a Tuple of items into a List
@@ -41876,8 +41894,6 @@ Options: ~
'autocompletetimeout' initial decay timeout for autocompletion algorithm
'chistory' Size of the quickfix stack |quickfix-stack|
'clipmethod' How to access the clipboard
'completefuzzycollect' Enable fuzzy collection of candidates for (some)
|ins-completion| modes
'completeitemalign' Order of |complete-items| in Insert mode completion
popup
'completetimeout' initial decay timeout for CTRL-N and CTRL-P
@@ -41885,7 +41901,6 @@ Options: ~
'eventignorewin' autocommand events that are ignored in a window
'findfunc' Vim function to obtain the results for a |:find|
command
'isexpand' defines triggers for completion
'lhistory' Size of the location list stack |quickfix-stack|
'maxsearchcount' Set the maximum number for search-stat |shm-S|
'messagesopt' configure |:messages| and |hit-enter| prompt
@@ -41906,6 +41921,8 @@ Options: ~
Vim Variables: ~
|v:clipmethod| The current 'clipmethod'.
|v:clipproviders| A dictionary containing clipboard providers
configuration |clipboard-providers|.
|v:stacktrace| The most recent caught exception.
|v:t_enumvalue| Value of |enumvalue|.
|v:t_enum| Value of |enum| type.

View File

@@ -1,4 +1,4 @@
*vim9.txt* For Vim version 9.1. Last change: 2025 Nov 11
*vim9.txt* For Vim version 9.1. Last change: 2025 Dec 03
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -64,7 +64,7 @@ dictionary adds quite a lot of overhead. In a Vim9 function this dictionary
is not available. Other differences are more subtle, such as how errors are
handled.
The Vim9 script syntax and semantics are used in:
Vim9 script syntax, semantics, and behavior apply in:
- a function defined with the `:def` command
- a script file where the first command is `vim9script`
- an autocommand defined in the context of the above
@@ -78,18 +78,72 @@ Vim9 script and legacy Vim script can be mixed. There is no requirement to
rewrite old scripts, they keep working as before. You may want to use a few
`:def` functions for code that needs to be fast.
:vim9[cmd] {cmd} *:vim9* *:vim9cmd* *E1164*
Evaluate and execute {cmd} using Vim9 script syntax and
semantics. Useful when typing a command and in a legacy
script or function.
:vim9[cmd] {cmd} *:vim9* *:vim9cmd*
Evaluate and execute {cmd} using Vim9 script syntax,
semantics, and behavior. Useful when typing a command,
in a `:function`, or a legacy Vim script.
The following short example shows how a legacy Vim script
command and a :vim9cmd (so Vim9 script context) may appear
similar, though may differ not just syntactically, but also
semantically and behaviorally. >vim
call popup_notification('entrée'[5:]
\ ->str2list()->string(), #{time: 7000})
vim9cmd popup_notification('entrée'[5 :]
->str2list()->string(), {time: 7000})
<
Notes: 1) The reason for the different output is Vim9 script
uses character indexing whereas legacy Vim script
uses byte indexing - see |vim9-string-index|.
2) Syntax is different too. In Vim9 script:
- The space in "[5 :]" is mandatory (see
|vim9-white-space|).
- Line continuation with "\" is not required.
- The "#" (to avoid putting quotes around dictionary
keys) is neither required nor allowed - see |#{}|.
*E1164*
`:vim9cmd` cannot stand alone; it must be followed by a command.
:leg[acy] {cmd} *:leg* *:legacy*
Evaluate and execute {cmd} using legacy Vim script syntax,
semantics, and behavior. It is only applicable in a Vim9
script or a `:def` function. Using an equivalent script to
the one, above (see its notes for why the output differs): >vim9
vim9script
# Legacy context - so, this creates a popup with [769, 101]
legacy call popup_notification('entrée'[5:]
\ ->str2list()->string(), #{time: 7000})
# Vim9 script context - so, this creates a pop up with [101]
popup_notification('entrée'[5 :]
->str2list()->string(), {time: 7000})
<
Vim9 script script-local variables may be used by prefixing
"s:", like in legacy Vim script. This example shows the
difference in syntax: "k" for the script-local variable in
Vim9 script, "s:k" in the legacy Vim script context. >vim9
vim9script
var k: string = "Okay"
echo k
legacy echo s:k
< *E1189*
Using `:legacy` is not allowed in compiled Vim9 script
control flow contexts. For example: >vim9
vim9script
def F_1189()
if v:version == 900
# E1189: Cannot use :legacy with this command: endif
legacy endif
enddef
F_1189()
< *E1234*
`:legacy` cannot stand alone; it must be followed by a command.
:leg[acy] {cmd} *:leg* *:legacy* *E1189* *E1234*
Evaluate and execute {cmd} using legacy script syntax and
semantics. Only useful in a Vim9 script or a :def function.
Note that {cmd} cannot use local variables, since it is parsed
with legacy expression syntax.
See some examples of Vim9 script at |52.6|.
==============================================================================
2. Differences from legacy Vim script *vim9-differences*
@@ -104,7 +158,8 @@ script and `:def` functions; details are below:
echo "hello "
.. yourName
.. ", how are you?"
- White space is required in many places to improve readability.
- White space is required in many places to improve readability,
see |vim9-white-space|.
- Assign values without `:let` *E1126* , declare variables with `:var`: >
var count = 0
count += 3
@@ -232,7 +287,7 @@ You can call a legacy dict function though: >
var d = {func: Legacy, value: 'text'}
d.func()
enddef
< *E1096* *E1174* *E1175*
The argument types and return type need to be specified. The "any" type can
be used, type checking will then be done at runtime, like with legacy
functions.
@@ -275,7 +330,7 @@ script "export" needs to be used for those to be used elsewhere. >
def ThisFunction() # script-local
def g:ThatFunction() # global
export def Function() # for import and import autoload
< *E1058* *E1075*
< *E1075*
When using `:function` or `:def` to specify a nested function inside a `:def`
function and no namespace was given, this nested function is local to the code
block it is defined in. It cannot be used in `function()` with a string
@@ -842,7 +897,7 @@ Notes:
White space ~
*E1004* *E1068* *E1069* *E1074* *E1127* *E1202*
*vim9-white-space* *E1004* *E1068* *E1069* *E1074* *E1127* *E1202*
Vim9 script enforces proper use of white space. This is no longer allowed: >
var name=234 # Error!
var name= 234 # Error!
@@ -1236,69 +1291,245 @@ subtracting one: >
Using ++var or --var in an expression is not supported yet.
==============================================================================
3. New style functions *fast-functions*
*:def* *E1028*
*:def*
:def[!] {name}([arguments])[: {return-type}]
Define a new function by the name {name}. The body of
the function follows in the next lines, until the
matching `:enddef`. *E1073*
*E1011*
matching `:enddef`.
*E1073*
The {name} cannot be reused at the script-local level: >vim9
vim9script
def F_1073()
enddef
def F_1073() # E1073: Name already defined: <SNR>...
enddef
< *E1011*
The {name} must be less than 100 bytes long.
*E1003* *E1027* *E1056* *E1059*
The type of value used with `:return` must match
{return-type}. When {return-type} is omitted or is
"void" the function is not expected to return
anything.
*E1077* *E1123*
*E1077*
{arguments} is a sequence of zero or more argument
declarations. There are three forms:
{name}: {type}
{name} = {value}
{name}: {type} = {value}
The first form is a mandatory argument, the caller
must always provide them.
The second and third form are optional arguments.
When the caller omits an argument the {value} is used.
The first form is a mandatory argument. So, the
declaration must provide a type. Example: >vim9
vim9script
def F_1077(x): void
# E1077: Missing argument type for x
enddef
<
For the second form, because the declaration does not
specify it, Vim infers the type. For both second and
third forms, a default {value} applies when the
caller omits it. Examples: >vim9
vim9script
def SecondForm(arg = "Hi"): void
echo $'2. arg is a "{arg->typename()}" type ' ..
$'and the default value of arg is "{arg}"'
enddef
SecondForm()
def ThirdForm(arg2: number = 9): void
echo $'3. default value of arg2 is {arg2}'
enddef
ThirdForm()
< *E1123*
Arguments in a builtin function called in a `:def`
function must have commas between arguments: >vim9
vim9script
def F_1123(a: number, b: number): void
echo max(a b)
# E1123: Missing comma before argument: b)
enddef
F_1123(1, 2)
< *E1003* *E1027* *E1096*
The type of value used with `:return` must match
{return-type}. When {return-type} is omitted or is
"void" the function is not allowed to return
anything. Examples: >vim9
vim9script
def F_1003(): bool
return # E1003: Missing return value
enddef
F_1003()
< >vim9
vim9script
def F_1027(): bool
echo false # E1027: Missing return statement
enddef
F_1027()
< >vim9
vim9script
def F_1096(): void
return false # E1096: Returning a value ...
enddef
F_1096()
< *E1056* *E1059*
When ": {return-type}" is specified, {return-type}
cannot be omitted (leaving a hanging colon). The ": "
also cannot be preceded by white space. Examples: >vim
def F_1056():
# E1056: Expected a type:
enddef
def F_1059() : bool
# E1059: No white space allowed before colon:...
enddef
<
The function will be compiled into instructions when
called, or when `:disassemble` or `:defcompile` is
used. Syntax and type errors will be produced at that
time.
called or when either `:defcompile` or `:disassemble` is
used. (For an example, see |:disassemble|.) Syntax
and type errors will be produced at that time.
*E1058*
It is possible to nest `:def` inside another `:def` or
`:function` up to about 50 levels deep.
`:function` only up to 49 levels deep. At 50 or more
levels, it is a |E1058| error.
*E1117*
[!] is used as with `:function`. Note that
script-local functions cannot be deleted or redefined
later in Vim9 script. They can only be removed by
reloading the same script.
[!] is allowed only in legacy Vim script because it
permits function redefinition (as with `:function`!).
In Vim9 script, ! is not allowed because script-local
functions cannot be deleted or redefined, though they
can be removed by reloading the script. Also, nested
functions cannot use ! for redefinition. Examples: >vim
" Legacy Vim script :def! example
def! LegacyFunc()
echo "def! is allowed in a legacy Vim script"
enddef
call LegacyFunc()
< >vim9
vim9script
def Func()
def! InnerFunc()
# E1117: Cannot use ! with nested :def
enddef
enddef
Func()
< >vim9
vim9script
def! F_477(): void # E477: No ! allowed
enddef
< >vim9
vim9script
def F_1084(): void
enddef
delfunction! F_1084
# E1084: Cannot delete Vim9 script function F_1084
<
Note: The generic error *E1028* ("Compiling :def
function failed") indicates an undeterminable error
during compilation. If reproducible, it may be
reported at https://github.com/vim/vim/issues as
it could represent a gap in Vim's error reporting.
*:enddef* *E1057* *E1152* *E1173*
:enddef End of a function defined with `:def`. It should be on
a line by its own.
:enddef End of a function defined with `:def`. It should be on
a line by itself. Examples: >vim9
vim9script
def MyFunc()
echo 'Do Something' | enddef
# E1057: Missing :enddef
< >vim9
vim9script
def F_1173()
enddef echo 'X'
# E1173: Text found after enddef: echo 'X'
< >vim9
vim9script
def F_1152()
function X()
enddef # E1152: Mismatched enddef
enddef
<
You may also find this wiki useful. It was written by an early adopter of
Vim9 script: https://github.com/lacygoill/wiki/blob/master/vim/vim9.md
If the script the function is defined in is Vim9 script, then script-local
variables can be accessed without the "s:" prefix. They must be defined
before the function is compiled. If the script the function is defined in is
legacy script, then script-local variables must be accessed with the "s:"
prefix if they do not exist at the time of compiling.
*E1269*
Script-local variables in a |Vim9| script must be declared at the script
level. They cannot be created in a function, also not in a legacy function.
If the script the `:def` function is defined in is Vim9 script, script-local
variables must be accessed without using the "s:" prefix. They must be
defined before the function is compiled and there is no way to avoid errors
(e.g., by using |exists()|) to conditionally skip undeclared variables.
For example: >vim9
vim9script
def MyVim9def()
echo unus # Echoes 1
# echo s:unus # This would be E1268 (Cannot use s: in Vim9)
if exists('duo')
# echo duo # This would be E1001 (Variable not found: duo)
endif
enddef
var unus: number = 1
MyVim9def() # MyVim9def is compiled ("duo" does not exist yet)
var duo: number = 2
<
If the script the `:def` function is defined in is legacy Vim script,
script-local variables may be accessed with or without the "s:" prefix.
However, using "s:" may defer variable resolution to runtime, avoiding
compilation errors for variables that may not exist yet, as this example
explains: >vim
" legacy Vim script
def! MyLegacyDef(): void
echo [unus, s:unus] # Echoes [1, 1]
# (If uncommented) First sourcing of 'echo s:duo' is E121 and
# causes a compilation error; subsequent sourcing echoes 2:
# echo s:duo
if exists("s:duo")
# First sourcing: skips echo; subsequent sourcing: echoes 2
echo s:duo
endif
if exists("duo")
# (If uncommented) First sourcing of 'echo duo' is E1001 and
# causes a compilation error; subsequent sourcing echoes 2:
# echo duo
endif
enddef
let s:unus = 1
call MyLegacyDef() " Calls MyLegacyDef() and compiles if not already
let s:duo = 2
< *E1269*
Script-local variables in a Vim9 script must be declared at the script
level. They cannot be created in a `:def` function and may not be declared
in a legacy function with the "s:" prefix. For example: >vim9
vim9script
function F_1269()
let s:i_wish = v:true
endfunction
F_1269()
# E1269: Cannot create a Vim9 script variable in a function: s:i_wish
<
*:defc* *:defcompile*
:defc[ompile] Compile functions and classes (|class-compile|)
defined in the current script that were not compiled
yet. This will report any errors found during
compilation.
:defc[ompile] MyClass Compile all methods in a class. |class-compile|
Example: When the three lines (up to and including
`enddef`) are sourced, there is no error because the
Vim9 `:def` function is not compiled. However, if all
four lines are sourced, compilation fails: >vim9
vim9script
def F_1027(): string
enddef
defcompile F_1027 # E1027: Missing return statement
:defc[ompile] MyClass Compile all methods in a class. (See |:disassemble|
for an example.)
:defc[ompile] {func}
:defc[ompile] debug {func}
@@ -1306,16 +1537,35 @@ level. They cannot be created in a function, also not in a legacy function.
Compile function {func}, if needed. Use "debug" and
"profile" to specify the compilation mode.
This will report any errors found during compilation.
{func} call also be "ClassName.functionName" to
{func} can also be "ClassName.functionName" to
compile a function or method in a class.
{func} call also be "ClassName" to compile all
{func} can also be "ClassName" to compile all
functions and methods in a class.
*:disa* *:disassemble*
:disa[ssemble] {func} Show the instructions generated for {func}.
This is for debugging and testing. *E1061*
Note that for command line completion of {func} you
can prepend "s:" to find script-local functions.
This is for debugging and testing.
If {func} is not found, error *E1061* occurs.
{func} can also be "ClassName.functionName" to
disassemble a function in a class.
The following example demonstrates using `:defcompile`
with a |class| and `:disassemble` with a
"ClassName.functionName" (positioning the cursor on
the last line of the visually sourced script): >vim9
vim9script
class Line
var lnum: number
def new(this.lnum)
enddef
def SetLnum()
cursor(this.lnum, 52)
enddef
endclass
defcompile Line
disassemble Line.SetLnum
var vlast: Line = Line.new(line("'>"))
vlast.SetLnum() # Cursor is positioned here->_
:disa[ssemble] profile {func}
Like `:disassemble` but with the instructions used for
@@ -1325,156 +1575,234 @@ level. They cannot be created in a function, also not in a legacy function.
Like `:disassemble` but with the instructions used for
debugging.
Note: For command line completion of {func}, script-local functions
are shown with their <SNR>. Depending on options, including
|wildmenumode()|, completion may work with "s:", "<S", or the function
name directly. (For example, in Vim started with |-u| NONE, ":disa s:"
and |c_CTRL-E| lists script-local function names.)
Limitations ~
Local variables will not be visible to string evaluation. For example: >
def MapList(): list<string>
var list = ['aa', 'bb', 'cc', 'dd']
return range(1, 2)->map('list[v:val]')
enddef
Variables local to `:def` functions are not visible to string evaluation.
The following example shows that the script-local constant "SCRIPT_LOCAL" is
visible whereas the function-local constant "DEF_LOCAL" is not: >vim9
vim9script
const SCRIPT_LOCAL = ['A', 'script-local', 'list']
def MapList(scope: string): list<string>
const DEF_LOCAL: list<string> = ['A', 'def-local', 'list']
if scope == 'script local'
return [1]->map('SCRIPT_LOCAL[v:val]')
else
return [1]->map('DEF_LOCAL[v:val]')
endif
enddef
echo 'script local'->MapList() # Echoes ['script-local']
echo 'def local'->MapList() # E121: Undefined variable: DEF_LOCAL
<
The map argument is a string expression, which is evaluated without the
function scope. Instead, use a lambda: >
function scope. Instead, in Vim9 script, use a lambda: >vim9
vim9script
def MapList(): list<string>
var list = ['aa', 'bb', 'cc', 'dd']
return range(1, 2)->map((_, v) => list[v])
const DEF_LOCAL: list<string> = ['A', 'def-local', 'list']
return [1]->map((_, v) => DEF_LOCAL[v])
enddef
echo MapList() # Echoes ['def-local']
<
For commands that are not compiled, such as `:edit`, |backtick-expansion| can
be used and it can use the local scope. Example: >vim9
For commands that are not compiled, such as `:edit`, backtick expansion can be
used and it can use the local scope. Example: >
def Replace()
var fname = 'blah.txt'
edit `=fname`
vim9script
def EditNewBlah()
var fname: string = 'blah.txt'
split
edit `=fname`
enddef
EditNewBlah() # A new split is created as buffer 'blah.txt'
<
Closures defined in a loop can either share a variable or each have their own
copy, depending on where the variable is declared. With a variable declared
outside the loop, all closures reference the same shared variable.
The following example demonstrates the consequences, with the "outloop"
variable existing only once: >vim9
Closures defined in a loop will share the same context. For example: >
vim9script
var flist: list<func>
for i in range(5)
var inloop = i
flist[i] = () => inloop
endfor
echo range(5)->map((i, _) => flist[i]())
# Result: [4, 4, 4, 4, 4]
def ClosureEg(n: number): void
var outloop: number = 0 # outloop is declared outside the loop!
for i in range(n)
outloop = i
flist[i] = (): number => outloop # Closures ref the same var
endfor
echo range(n)->map((i, _) => flist[i]())
enddef
ClosureEg(4) # Echoes [3, 3, 3, 3]
<
All closures put in the list refer to the same instance, which, in the end,
is 3.
However, when the variable is declared inside the loop, each closure gets its
own copy, as shown in this example: >vim9
vim9script
var flist: list<func>
def ClosureEg(n: number): void
for i in range(n)
var inloop: number = i # inloop is declared inside the loop
flist[i] = (): number => inloop # Closures ref each inloop
endfor
echo range(n)->map((i, _) => flist[i]())
enddef
ClosureEg(4) # Echoes [0, 1, 2, 3]
Another way to have a separate context for each closure is to call a
function to define it: >vim9
vim9script
def GetClosure(i: number): func
var infunc: number = i
return (): number => infunc
enddef
var flist: list<func>
def ClosureEg(n: number): void
for i in range(n)
flist[i] = GetClosure(i)
endfor
echo range(n)->map((i, _) => flist[i]())
enddef
ClosureEg(4) # Echoes [0, 1, 2, 3]
< *E1271*
A closure must be compiled in the context that it is defined in, so that
variables in that context can be found. This mostly happens correctly, except
when a function is marked for debugging with `:breakadd` after it was compiled.
Make sure to define the breakpoint before compiling the outer function.
variables in that context can be found. This mostly happens correctly,
except when a function is marked for debugging with `:breakadd` after it was
compiled. Make sure to define the breakpoint before compiling the outer
function.
*E1248*
In some situations, such as when a Vim9 closure which captures local variables
is converted to a string and then executed, an error occurs. This happens
because the string execution context cannot access the local variables from
the original context where the closure was defined. For example: >vim9
The "inloop" variable will exist only once, all closures put in the list refer
to the same instance, which in the end will have the value 4. This is
efficient, also when looping many times. If you do want a separate context
for each closure, call a function to define it: >
def GetClosure(i: number): func
var infunc = i
return () => infunc
vim9script
def F_1248(): void
var n: number
var F: func = () => {
n += 1
}
try
execute printf("call %s()", F)
catch
echo v:exception
endtry
enddef
F_1248() # Vim(call):E1248: Closure called from invalid context
var flist: list<func>
for i in range(5)
flist[i] = GetClosure(i)
In Vim9 script, a loop variable is invalid after the loop is closed.
For example, this timer will echo 0 to 2 on separate lines. However, if
the variable "n" is used after the `:endfor`, that is an |E121| error: >vim9
vim9script
for n in range(3)
var nr: number = n
timer_start(1000 * n, (_) => {
echowindow nr
})
endfor
echo range(5)->map((i, _) => flist[i]())
# Result: [0, 1, 2, 3, 4]
In some situations, especially when calling a Vim9 closure from legacy
context, the evaluation will fail. *E1248*
Note that at the script level the loop variable will be invalid after the
loop, also when used in a closure that is called later, e.g. with a timer.
This will generate error |E1302|: >
for n in range(4)
timer_start(500 * n, (_) => {
echowin n
})
endfor
You need to use a block and define a variable there, and use that one in the
closure: >
for n in range(4)
{
var nr = n
timer_start(500 * n, (_) => {
echowin nr
})
}
endfor
Using `:echowindow` is useful in a timer, the messages go into a popup and will
not interfere with what the user is doing when it triggers.
try
echowindow n
catch
echo v:exception
endtry
<
Note: Using `:echowindow` is useful in a timer because messages go
into a popup and will not interfere with what the user is
doing when it triggers.
Converting a function from legacy to Vim9 ~
Converting a :function to a :def~
*convert_legacy_function_to_vim9*
These are the most changes that need to be made to convert a legacy function
to a Vim9 function:
*convert_:function_to_:def*
There are many changes that need to be made to convert a `:function` to
a `:def` function. The following are some of them:
- Change `let` used to declare variables to one of `var`, `const`, or `final`,
and remove the "s:" from each |script-variable|.
- Change `func` or `function` to `def`.
- Change `endfunc` or `endfunction` to `enddef`.
- Add types to the function arguments.
- If the function returns something, add the return type.
- Change comments to start with # instead of ".
- Add the applicable type (or "any") to each function argument.
- Remove "a:" from each |function-argument|.
- Remove inapplicable options such as |:func-range|, |:func-abort|,
|:func-dict|, and |:func-closure|.
- If the function returns something, add the return type. (Ideally, add
"void" if it does not return anything.)
- Remove line continuation backslashes from places they are not required.
- Remove `let` for assigning values to |g:|, |b:|, |w:|, |t:|, or |l:| variables.
- Rewrite |lambda| expressions in Vim9 script syntax (see |vim9-lambda|).
- Change comments to start with # (preceded by white space) instead of ".
- Insert white space in expressions where required (see |vim9-white-space|).
- Change "." used for string concatenation to " .. ". (Alternatively, use
an |interpolated-string|.)
For example, a legacy function: >
func MyFunc(text)
" function body
endfunc
< Becomes: >
def MyFunc(text: string): number
# function body
The following legacy Vim script and Vim9 script examples demonstrate all
those differences. First, legacy Vim script: >vim
let s:lnum=0
function Leg8(arg) abort
let l:pre=['Result',
\': ']
let b:arg=a:arg
let s:lnum+=2
let b:arg*=4
let l:result={pre->join(pre,'')}(l:pre)
return l:result.(b:arg+s:lnum)"no space before comment
endfunction
call Leg8(10)->popup_notification(#{time: 3000})" Pops up 'Result: 42'
The equivalent in Vim9 script: >vim9
vim9script
var lnum: number
def Vim9(arg: number): string
final pre = ['Result',
': ']
b:arg = arg
lnum += 2
b:arg *= 4
const RESULT: string = ((lpre) => join(lpre, ''))(pre)
return RESULT .. (b:arg + lnum) # space required before # comment
enddef
Vim9(10)->popup_notification({time: 3000}) # Pops up 'Result: 42'
- Remove "a:" used for arguments. E.g.: >
return len(a:text)
< Becomes: >
return len(text)
- Change `let` used to declare a variable to `var`.
- Remove `let` used to assign a value to a variable. This is for local
variables already declared and b: w: g: and t: variables.
For example, legacy function: >
let lnum = 1
let lnum += 3
let b:result = 42
< Becomes: >
var lnum = 1
lnum += 3
b:result = 42
- Insert white space in expressions where needed.
- Change "." used for concatenation to "..".
For example, legacy function: >
echo line(1).line(2)
< Becomes: >
echo line(1) .. line(2)
- line continuation does not always require a backslash: >
echo ['one',
\ 'two',
\ 'three'
\ ]
< Becomes: >
echo ['one',
'two',
'three'
]
< Note: This example also demonstrates (outside the `:def` function):
- Removing "#" from the legacy |#{}| - see |vim9-literal-dict|
- Omitting `:call` (allowed, though unnecessary in Vim9 script)
Calling a function in an expr option ~
Calling a :def function in an expr option ~
*expr-option-function*
The value of a few options, such as 'foldexpr', is an expression that is
evaluated to get a value. The evaluation can have quite a bit of overhead.
One way to minimize the overhead, and also to keep the option value very
simple, is to define a compiled function and set the option to call it
without arguments. Example: >
One way to minimize the overhead, and also to keep the option value simple,
is to define a compiled function and set the option to call it without
arguments. For example: >vim9
vim9script
def MyFoldFunc(): any
... compute fold level for line v:lnum
return level
def MyFoldFunc(): string
# This matches start of line (^), followed by a digit, a full stop
# a space or tab, an uppercase character, with an empty next line
return getline(v:lnum) =~ '^[[:digit:]]\.[[:blank:]][[:upper:]]'
&& getline(v:lnum + 1)->empty() ? '>1' : '1'
enddef
set foldexpr=s:MyFoldFunc()
set foldexpr=MyFoldFunc()
set foldmethod=expr
norm! zM
<
Warning: This script creates and applies folds at the "Heading 1" level of
this vim9.txt help buffer. (You can use |zR|, in Normal mode, to
open all the folds after sourcing the script.)
==============================================================================
@@ -1927,8 +2255,8 @@ dictionary when it is required: >vim
echo [8, 9]->keys()
vim9cmd echo [8, 9]->keys() # E1206: Dictionary required
<
*E1023* *E1024* *E1029*
*E1030* *E1210* *E1212*
*E1023* *E1024* *E1029* *E1030*
*E1174* *E1175* *E1210* *E1212*
However, sometimes there will be an error in Vim9 script, which breaks
backwards compatibility. The following examples illustrate various places
this happens. The legacy Vim script behavior, which does not fail, is shown
@@ -1963,6 +2291,16 @@ in Vim9 script.
let b:l = [42] | unlet b:l['#'] | echo b:l
vim9cmd b:l = [42] | vim9cmd unlet b:l['#'] # E1030: Using a string...
<
- Not using a string where an argument requires a string: >vim9
echo substitute('Hallo', 'a', 'e', v:true)
vim9cmd echo substitute('Hallo', 'a', 'e', true) # E1174: String...
<
- Using an empty string in an argument that requires a non-empty string: >vim9
echo exepath('')
vim9cmd echo exepath('') # E1175: Non-empty string required for arg...
<
- Not using a number when it is required: >vim

View File

@@ -1,4 +1,4 @@
*wayland.txt* For Vim version 9.1. Last change: 2025 Nov 09
*wayland.txt* For Vim version 9.1. Last change: 2025 Nov 25
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -16,7 +16,8 @@ Wayland Protocol Support *wayland*
Functionality such as the clipboard for Wayland requires a seat to use. A
Wayland seat can consist of a keyboard, pointer, and touch device(s). The
seat to use can be set with the 'wlseat' option. Only useful if you use
multiple Wayland seats in the same Wayland session.
multiple Wayland seats in the same Wayland session. If you don't know what
this is means, then it likely does not matter for you.
*wayland-gui*
See |gui-wayland|. Please note that when using the GUI, Vim uses the toolkit
@@ -63,11 +64,18 @@ should be bundled with libwayland 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)
2. wlroots based (Sway, Labwc)
3. Niri
4. Hyprland
5. Wayfire
If you come from X11, then the regular Wayland selection is equivalent to the
CLIPBOARD selection in X11, and the primary Wayland selection equates to the
X11 primary selection. Accessing these selections is the same as X11 in Vim,
X11 PRIMARY selection. Accessing these selections is the same as X11 in Vim,
in which the + register is the regular selection, and the * register is the
primary selection, note that your compositor may not support primary
primary selection. Note that your compositor may not support primary
selections, see |wayland-primary-selection| for more details.
*wayland-persist*

View File

@@ -1,4 +1,4 @@
*windows.txt* For Vim version 9.1. Last change: 2025 Nov 10
*windows.txt* For Vim version 9.1. Last change: 2025 Dec 03
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -878,13 +878,15 @@ the buffer. The result is that all buffers will use the 'encoding' encoding
*:sta* *:stag*
:sta[g][!] [tagname]
Does ":tag[!] [tagname]" and splits the window for the found
tag. See also |:tag|.
tag. Refer to 'switchbuf' to jump to a tag in a vertically
split window or a new tab page. See also |:tag|.
CTRL-W ] *CTRL-W_]* *CTRL-W_CTRL-]*
CTRL-W CTRL-] Split current window in two. Use identifier under cursor as a
tag and jump to it in the new upper window.
In Visual mode uses the Visually selected text as a tag.
Make new window N high.
Make new window N high. Refer to 'switchbuf' to jump to a tag
in a vertically split window or a new tab page.
*CTRL-W_g]*
CTRL-W g ] Split current window in two. Use identifier under cursor as a
@@ -1145,10 +1147,10 @@ list of buffers. |unlisted-buffer|
or "N CTRL-^", where N is the buffer number.
For the file name these special values are used:
[Prompt] |prompt-buffer|
[Popup] buffer of a |popup-window|
[Scratch] 'buftype' is "nofile"
[No Name] no file name specified
"[Prompt]" |prompt-buffer|
"[Popup]" buffer of a |popup-window|
"[Scratch]" 'buftype' is "nofile"
"[No Name]" no file name specified
For a |terminal-window| buffer the status is used.
Indicators (chars in the same column are mutually exclusive):

View File

@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2025 Oct 09
" Last Change: 2025 Nov 11
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" If the filetype can be detected from extension or file name(the final path component),
@@ -427,6 +427,10 @@ au BufNewFile,BufRead *.e,*.E call dist#ft#FTe()
" Elm Filter Rules file
au BufNewFile,BufRead filter-rules setf elmfilt
" Erlang Application Resource Files
au BufNewFile,BufRead *.app.src setf erlang
au BufNewFile,BufRead *.app call dist#ft#FTapp()
" ESMTP rc file
au BufNewFile,BufRead *esmtprc setf esmtprc
@@ -774,12 +778,13 @@ au BufNewFile,BufRead */neofetch/config.conf setf sh
" Nginx
au BufNewFile,BufRead *.nginx,nginx*.conf,*nginx.conf,*/nginx/*.conf setf nginx
" Nroff/Troff (*.ms and *.t are checked below)
" Nroff/Groff/Troff (*.ms and *.t are checked below)
au BufNewFile,BufRead *.me
\ if expand("<afile>") != "read.me" && expand("<afile>") != "click.me" |
\ setf nroff |
\ endif
au BufNewFile,BufRead *.tr,*.nr,*.roff,*.tmac,*.mom setf nroff
au BufNewFile,BufRead *.tr,*.nr,*.roff,*.tmac setf nroff
au BufNewFile,BufRead *.groff,*.mom setf groff
au BufNewFile,BufRead *.[0-9],*.[013]p,*.[1-8]x,*.3{am,perl,pm,posix,type},*.n call dist#ft#FTnroff()
" Nroff or Objective C++

View File

@@ -0,0 +1,16 @@
" Vim filetype plugin
" Language: bpftrace
" Maintainer: Stanislaw Gruszka <stf_xl@wp.pl>
" Last Change: 2025 Dec 23
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
setlocal commentstring=//\ %s
setlocal formatoptions-=t formatoptions+=croql
let b:undo_ftplugin = "setlocal comments< commentstring< formatoptions<"

View File

@@ -2,13 +2,14 @@
" Language: hog (snort.conf)
" Maintainer: . Victor Roemer, <vroemer@badsec.org>.
" Last Change: Mar 1, 2013
" 2025 Dec 03 by Vim Project: set undo_ftplugin correctly #18727
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:undo_ftplugin = "setl fo< com< cms< def< inc<"
let b:undo_ftplugin = "setl fo< com< cms< def< inc<"
let s:cpo_save = &cpo
set cpo&vim
@@ -19,8 +20,8 @@ setlocal commentstring=\c#\ %s
setlocal define=\c^\s\{-}var
setlocal include=\c^\s\{-}include
" Move around configurations
let s:hog_keyword_match = '\c^\s*\<\(preprocessor\\|config\\|output\\|include\\|ipvar\\|portvar\\|var\\|dynamicpreprocessor\\|' .
" Move around configurations
let s:hog_keyword_match = '\c^\s*\<\(preprocessor\\|config\\|output\\|include\\|ipvar\\|portvar\\|var\\|dynamicpreprocessor\\|' .
\ 'dynamicengine\\|dynamicdetection\\|activate\\|alert\\|drop\\|block\\|dynamic\\|log\\|pass\\|reject\\|sdrop\\|sblock\)\>'
exec "nnoremap <buffer><silent> ]] :call search('" . s:hog_keyword_match . "', 'W' )<CR>"
@@ -28,9 +29,9 @@ exec "nnoremap <buffer><silent> [[ :call search('" . s:hog_keyword_match . "', '
if exists("loaded_matchit")
let b:match_words =
\ '^\s*\<\%(preprocessor\|config\|output\|include\|ipvar\|portvar' .
\ '\|var\|dynamicpreprocessor\|dynamicengine\|dynamicdetection' .
\ '\|activate\|alert\|drop\|block\|dynamic\|log\|pass\|reject' .
\ '^\s*\<\%(preprocessor\|config\|output\|include\|ipvar\|portvar' .
\ '\|var\|dynamicpreprocessor\|dynamicengine\|dynamicdetection' .
\ '\|activate\|alert\|drop\|block\|dynamic\|log\|pass\|reject' .
\ '\|sdrop\|sblock\>\):$,\::\,:;'
let b:match_skip = 'r:\\.\{-}$\|^\s*#.\{-}$\|^\s*$'
endif

View File

@@ -3,7 +3,7 @@
" Maintainer: Carlo Baldassi <carlobaldassi@gmail.com>
" Homepage: https://github.com/JuliaEditorSupport/julia-vim
" Last Change: 2021 Aug 04
" adapted from upstream 2021 Aug 4
" 2025 Dec 9 sync with upstream repo #18894
if exists("b:did_ftplugin")
finish
@@ -11,12 +11,12 @@ endif
let b:did_ftplugin = 1
let s:save_cpo = &cpo
set cpo-=C
set cpo&vim
setlocal include=^\\s*\\%(reload\\\|include\\)\\>
setlocal suffixesadd=.jl
setlocal comments=:#
setlocal commentstring=#\ %s
setlocal commentstring=#=%s=#
setlocal cinoptions+=#1
setlocal define=^\\s*macro\\>
setlocal fo-=t fo+=croql
@@ -24,7 +24,7 @@ setlocal fo-=t fo+=croql
let b:julia_vim_loaded = 1
let b:undo_ftplugin = "setlocal include< suffixesadd< comments< commentstring<"
\ . " define< fo< shiftwidth< expandtab< indentexpr< indentkeys< cinoptions< completefunc<"
\ . " define< fo< cinoptions< completefunc<"
\ . " | unlet! b:julia_vim_loaded"
" MatchIt plugin support
@@ -68,7 +68,7 @@ if exists("loaded_matchit")
elseif attr == 'juliaBlKeyword'
return b:julia_begin_keywordsm . ':' . b:julia_end_keywords
elseif attr == 'juliaException'
return b:julia_begin_keywordsm . ':\<\%(catch\|finally\)\>:' . b:julia_end_keywords
return b:julia_begin_keywordsm . ':\<\%(catch\|else\|finally\)\>:' . b:julia_end_keywords
endif
return '\<\>:\<\>'
endfunction

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

@@ -0,0 +1,14 @@
" Vim ftplugin file
" Language: Leex (Erlang Lexical Analyzer Generator)
" Maintainer: Jon Parise <jon@indelible.org>
" Last Change: 2025 Nov 29
" Filenames: *.xrl
"
" References:
" - https://www.erlang.org/doc/apps/parsetools/leex.html
if exists('b:did_ftplugin')
finish
endif
runtime! ftplugin/erlang.vim

View File

@@ -1 +1,5 @@
if exists("b:did_ftplugin")
finish
endif
runtime ftplugin/rmd.vim

View File

@@ -3,6 +3,7 @@
" Maintainer: Chris Morgan <me@chrismorgan.info>
" Last Change: 2024 Mar 17
" 2024 May 23 by Riley Bruins <ribru17@gmail.com ('commentstring')
" 2025 Dec 09 update 'textwidth# to 100 #18892
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
if exists("b:did_ftplugin")
@@ -49,7 +50,7 @@ setlocal smartindent nocindent
if get(g:, 'rust_recommended_style', 1)
let b:rust_set_style = 1
setlocal shiftwidth=4 softtabstop=4 expandtab
setlocal textwidth=99
setlocal textwidth=100
endif
setlocal include=\\v^\\s*(pub\\s+)?use\\s+\\zs(\\f\|:)+

View File

@@ -4,6 +4,7 @@
" Homepage: https://github.com/JuliaEditorSupport/julia-vim
" Last Change: 2022 Jun 14
" 2023 Aug 28 by Vim Project (undo_indent)
" 2025 Dec 08 by Vim Project (update indent script from upstream #18894)
" Notes: originally based on Bram Moolenaar's indent file for vim
" Only load this indent file when no other was loaded.
@@ -22,7 +23,7 @@ setlocal indentkeys-=0{
setlocal indentkeys-=0}
setlocal nosmartindent
let b:undo_indent = "setl ai< inde< indk< si<"
let b:undo_indent = "setlocal autoindent< indentexpr< indentkeys< smartindent<"
" Only define the function once.
if exists("*GetJuliaIndent")
@@ -96,7 +97,7 @@ function GetJuliaNestingStruct(lnum, ...)
let i = JuliaMatch(a:lnum, line, '\<else\>', s)
if i >= 0 && i == fb
let s = i+1
if len(blocks_stack) > 0 && blocks_stack[-1] =~# '\<\%(else\)\=if\>'
if len(blocks_stack) > 0 && blocks_stack[-1] =~# '\<\%(\%(else\)\=if\|catch\)\>'
let blocks_stack[-1] = 'else'
else
call add(blocks_stack, 'else')
@@ -114,7 +115,7 @@ function GetJuliaNestingStruct(lnum, ...)
let i = JuliaMatch(a:lnum, line, '\<catch\>', s)
if i >= 0 && i == fb
let s = i+1
if len(blocks_stack) > 0 && blocks_stack[-1] == 'try'
if len(blocks_stack) > 0 && blocks_stack[-1] =~# '\<\%(try\|finally\)\>'
let blocks_stack[-1] = 'catch'
else
call add(blocks_stack, 'catch')
@@ -125,7 +126,7 @@ function GetJuliaNestingStruct(lnum, ...)
let i = JuliaMatch(a:lnum, line, '\<finally\>', s)
if i >= 0 && i == fb
let s = i+1
if len(blocks_stack) > 0 && (blocks_stack[-1] == 'try' || blocks_stack[-1] == 'catch')
if len(blocks_stack) > 0 && blocks_stack[-1] =~# '\<\%(try\|catch\|else\)\>'
let blocks_stack[-1] = 'finally'
else
call add(blocks_stack, 'finally')
@@ -298,7 +299,7 @@ function IsInContinuationImportLine(lnum)
if len(stack) == 0
return 0
endif
return JuliaMatch(a:lnum, getline(a:lnum), '\<\%(import\|using\|export\)\>', indent(a:lnum)) == -1
return JuliaMatch(a:lnum, getline(a:lnum), '\<\%(import\|using\|export\|public\)\>', indent(a:lnum)) == -1
endfunction
function IsFunctionArgPar(lnum, c)
@@ -314,7 +315,7 @@ function JumpToMatch(lnum, last_closed_bracket)
" otherwise resorts to vim's default, which is buggy but better than
" nothing)
call cursor(a:lnum, a:last_closed_bracket)
let percmap = maparg("%", "n")
let percmap = maparg("%", "n")
if exists("g:loaded_matchit") && percmap =~# 'Match\%(it\|_wrapper\)'
normal %
else
@@ -448,10 +449,10 @@ function GetJuliaIndent()
" Decrease indentation for each closed block in the current line
let ind -= shiftwidth() * num_closed_blocks
" Additional special case: multiline import/using/export statements
" Additional special case: multiline import/using/export/public statements
let prevline = getline(lnum)
" Are we in a multiline import/using/export statement, right below the
" Are we in a multiline import/using/export/public statement, right below the
" opening line?
if IsInContinuationImportLine(v:lnum) && !IsInContinuationImportLine(lnum)
if get(g:, 'julia_indent_align_import', 1)
@@ -465,9 +466,9 @@ function GetJuliaIndent()
return cind + 2
endif
else
" if the opening line is not a naked import/using/export statement, use
" if the opening line is not a naked import/using/export/public statement, use
" it as reference
let iind = JuliaMatch(lnum, prevline, '\<import\|using\|export\>', indent(lnum), lim)
let iind = JuliaMatch(lnum, prevline, '\<import\|using\|export\|public\>', indent(lnum), lim)
if iind >= 0
" assuming whitespace after using... so no `using(XYZ)` please!
let nonwhiteind = JuliaMatch(lnum, prevline, '\S', iind+6, -1, 'basic')
@@ -479,7 +480,7 @@ function GetJuliaIndent()
endif
let ind += shiftwidth()
" Or did we just close a multiline import/using/export statement?
" Or did we just close a multiline import/using/export/public statement?
elseif !IsInContinuationImportLine(v:lnum) && IsInContinuationImportLine(lnum)
" find the starting line of the statement
let ilnum = 0

10
runtime/indent/lf.vim Normal file
View File

@@ -0,0 +1,10 @@
" Vim indent file
" Language: lf file manager configuration file (lfrc)
" Maintainer: Andis Sprinkis <andis@sprinkis.com>
" URL: https://github.com/andis-sprinkis/lf-vim
" Last Change: 26 Oct 2025
if exists("b:did_indent") | finish | endif
" Correctly indent embedded shell commands.
runtime! indent/sh.vim

View File

@@ -1,10 +1,9 @@
" Vim indent file
" Language: PHP
" Author: John Wellesz <John.wellesz (AT) gmail (DOT) com>
" URL: https://www.2072productions.com/vim/indent/php.vim
" Home: https://github.com/2072/PHP-Indenting-for-VIm
" Last Change: 2023 August 18th
" Version: 1.75
" Last Change: 2025 November 16th
" Version: 1.76
"
"
" Type :help php-indent for available options
@@ -839,13 +838,15 @@ function! GetPhpIndent()
continue
else
let isSingleLineBlock = 0
if getline(last_line_num) =~# '^\s*else\%(if\)\=\>'
if getline(last_line_num) =~# '^\s*else\%(if\)\=\>' && !isSingleLineBlock
let last_line_num = FindTheIfOfAnElse(last_line_num, 0)
let isSingleLineBlock = 0
continue
endif
let isSingleLineBlock = 0
let last_match = last_line_num

View File

@@ -2,7 +2,7 @@
" You can also use this as a start for your own set of menus.
"
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2025 Aug 10
" Last Change: 2025 Dec 15
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Note that ":an" (short for ":anoremenu") is often used to make a menu work
@@ -84,7 +84,7 @@ an <silent> 9999.40 &Help.&Find\.\.\. :call <SID>Helpfind()<CR>
an 9999.45 &Help.-sep1- <Nop>
an 9999.50 &Help.&Credits :help credits<CR>
an 9999.60 &Help.Co&pying :help copying<CR>
an 9999.70 &Help.&Sponsor/Register :help sponsor<CR>
an 9999.70 &Help.&Sponsor :help sponsor<CR>
an 9999.70 &Help.O&rphans :help kcc<CR>
an 9999.75 &Help.-sep2- <Nop>
an 9999.80 &Help.&Version :version<CR>

View File

@@ -1,7 +1,7 @@
" These commands create the option window.
"
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2025 Oct 07
" Last Change: 2025 Nov 27
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" If there already is an option window, jump to that one.
@@ -860,6 +860,8 @@ call append("$", " \tset bs=" . &bs)
call <SID>AddOption("comments", gettext("definition of what comment lines look like"))
call append("$", "\t" .. s:local_to_buffer)
call <SID>OptionL("com")
call <SID>AddOption("commentstring", gettext("template for comments; used to put the marker in"))
call <SID>OptionL("cms")
call <SID>AddOption("formatoptions", gettext("list of flags that tell how automatic formatting works"))
call append("$", "\t" .. s:local_to_buffer)
call <SID>OptionL("fo")
@@ -888,8 +890,6 @@ if has("insert_expand")
call <SID>OptionL("cot")
call <SID>AddOption("completeitemalign", gettext(" \npopup menu item align order"))
call <SID>OptionG("cia", &cia)
call <SID>AddOption("completefuzzycollect", gettext(" \nuse fuzzy collection for specific completion modes"))
call <SID>OptionL("cfc")
if exists("+completepopup")
call <SID>AddOption("completepopup", gettext("options for the Insert mode completion info popup"))
call <SID>OptionG("cpp", &cpp)
@@ -1039,8 +1039,6 @@ if has("folding")
call <SID>AddOption("foldminlines", gettext("minimum number of screen lines for a fold to be closed"))
call append("$", "\t" .. s:local_to_window)
call <SID>OptionL("fml")
call <SID>AddOption("commentstring", gettext("template for comments; used to put the marker in"))
call <SID>OptionL("cms")
call <SID>AddOption("foldmethod", gettext("folding type: \"manual\", \"indent\", \"expr\", \"marker\",\n\"syntax\" or \"diff\""))
call append("$", "\t" .. s:local_to_window)
call <SID>OptionL("fdm")
@@ -1287,8 +1285,6 @@ call <SID>AddOption("isfname", gettext("specifies the characters in a file name"
call <SID>OptionG("isf", &isf)
call <SID>AddOption("isident", gettext("specifies the characters in an identifier"))
call <SID>OptionG("isi", &isi)
call <SID>AddOption("isexpand", gettext("defines trigger strings for complete_match()"))
call append("$", "\t" .. s:local_to_buffer)
call <SID>AddOption("iskeyword", gettext("specifies the characters in a keyword"))
call append("$", "\t" .. s:local_to_buffer)
call <SID>OptionL("isk")

View File

@@ -0,0 +1,42 @@
vim9script
# Open Vim help on {subject} in the current window (rather than a new split)
#
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last change: 2025 Dec 02
export def Open(subject: string): void
const HELPCURWIN: func = (): string => {
if !getcompletion(subject, 'help')->empty() || subject->empty()
if &buftype != 'help'
execute 'silent noautocmd keepalt enew'
setlocal buftype=help noswapfile
endif
endif
return $'help {subject}'
}
var contmod: bool = true
if &modified
echohl MoreMsg
echo $'Buffer {bufname()} is modified - continue? (y/n)'
echohl None
contmod = (getcharstr() == 'y')
endif
if contmod
try
execute HELPCURWIN()
catch
echohl Error
# {subject} invalid - Echo 'helpcurwin: E149:' (omit 'Vim(help):')
echo $'helpcurwin: {v:exception->substitute("^[^:]\+:", "", "")}'
echohl None
endtry
else
echo $'Aborted opening in current window, :help {subject}'
endif
enddef
# vim: ts=8 sts=2 sw=2 et

View File

@@ -0,0 +1,59 @@
*helpcurwin.txt* For Vim version 9.1. Last change: 2025 Dec 02
The helpcurwin optional package enables opening help in the current window.
1. :HelpCurwin |helpcurwin-command|
2. helpcurwin#Open() |helpcurwin-function|
3. <Plug>HelpCurwin; |helpcurwin-mapping|
==============================================================================
1. :HelpCurwin *:HelpCurwin* *helpcurwin-command*
:HelpCurwin Use the current window to display the help file,
|help.txt| in read-only mode. It leaves any other
windows as-is (including when there is another
help window(s)).
:HelpCurwin {subject} Like ":HelpCurwin" but, additionally open the
applicable help file at the tag {subject}.
For example: >
:HelpCurwin version9.2
<
It should otherwise behave like :help {subject}.
You may also want to save typing with a command line abbreviation,
for example: >vi
cnoreabbrev <expr> hc getcmdtype() == ":" &&
\ getcmdline() == 'hc' ? 'HelpCurwin' : 'hc'
<
==============================================================================
2. helpcurwin#Open() *helpcurwin-function*
The underlying `:def` function may also be used, for example: >vim
:vim9cmd helpcurwin#Open('version9.2')
<
This may be useful from other scripts where you want to bring up help on
{subject} in the current window.
==============================================================================
3. <Plug>HelpCurwin; *helpcurwin-mapping*
There may be times when you want to get the help for a WORD, such as when it
is in a Vim9 script. If you want to open it in the same window, you can map
<Plug>HelpCurwin; to keys of your choosing to enable that. For example: >vim9
nnoremap <Leader>hc <Plug>HelpCurwin;
Once sourced (in this instance, when <Leader>hc is typed), the applicable
help file will be opened in the current window at the tag for <cWORD> (that
is, the |WORD| under the cursor), if it exists.
==============================================================================
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@@ -0,0 +1,5 @@
:HelpCurwin helpcurwin.txt /*:HelpCurwin*
helpcurwin-command helpcurwin.txt /*helpcurwin-command*
helpcurwin-function helpcurwin.txt /*helpcurwin-function*
helpcurwin-mapping helpcurwin.txt /*helpcurwin-mapping*
helpcurwin.txt helpcurwin.txt /*helpcurwin.txt*

View File

@@ -0,0 +1,20 @@
vim9script
# Open Vim help on {subject} in the current window (rather than a new split)
#
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last change: 2025 Dec 02
# Exit when the helpcurwin plugin is loaded already
if exists('g:loaded_helpcurwin')
finish
endif
g:loaded_helpcurwin = true
import autoload 'helpcurwin.vim'
command -bar -nargs=? -complete=help HelpCurwin helpcurwin.Open(<q-args>)
nnoremap <Plug>HelpCurwin; <ScriptCmd>helpcurwin.Open(expand('<cWORD>'))<CR>
# vim: ts=8 sts=2 sw=2 et

View File

@@ -13,6 +13,9 @@
" 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
" 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
@@ -1700,10 +1703,10 @@ function netrw#NetRead(mode,...)
else
let useport= ""
endif
" 'C' in 'C:\path\to\file' is handled as hostname on windows.
" Using UNC notation in windows to get a unix like path.
" This is workaround to avoid mis-handle windows local-path:
if g:netrw_scp_cmd =~ '^scp' && has("win32")
let tmpfile_get = substitute(tr(tmpfile, '\', '/'), '^\(\a\):[/\\]\(.*\)$', '/\1/\2', '')
let tmpfile_get = substitute(tr(tmpfile, '\', '/'), '^\(\a\):[/\\]\(.*\)$', '//' .. $COMPUTERNAME .. '/\1$/\2', '')
else
let tmpfile_get = tmpfile
endif
@@ -6399,6 +6402,7 @@ function s:NetrwMenu(domenu)
exe 'sil! menu '.g:NetrwMenuPriority.'.14.8 '.g:NetrwTopLvlMenu.'Marked\ Files.Exe\ Cmd<tab>mx mx'
exe 'sil! menu '.g:NetrwMenuPriority.'.14.9 '.g:NetrwTopLvlMenu.'Marked\ Files.Move\ To\ Target<tab>mm mm'
exe 'sil! menu '.g:NetrwMenuPriority.'.14.10 '.g:NetrwTopLvlMenu.'Marked\ Files.Obtain<tab>O O'
exe 'sil! menu '.g:NetrwMenuPriority.'.14.11 '.g:NetrwTopLvlMenu.'Marked\ Files.Print<tab>mp mp'
exe 'sil! menu '.g:NetrwMenuPriority.'.14.12 '.g:NetrwTopLvlMenu.'Marked\ Files.Replace<tab>R R'
exe 'sil! menu '.g:NetrwMenuPriority.'.14.13 '.g:NetrwTopLvlMenu.'Marked\ Files.Set\ Target<tab>mt mt'
exe 'sil! menu '.g:NetrwMenuPriority.'.14.14 '.g:NetrwTopLvlMenu.'Marked\ Files.Tag<tab>mT mT'
@@ -6426,14 +6430,13 @@ function s:NetrwMenu(domenu)
let s:netrwcnt = 0
let curwin = winnr()
windo if getline(2) =~# "Netrw" | let s:netrwcnt= s:netrwcnt + 1 | endif
endif
exe curwin."wincmd w"
exe curwin."wincmd w"
if s:netrwcnt <= 1
exe 'sil! unmenu '.g:NetrwTopLvlMenu
sil! unlet s:netrw_menu_enabled
if s:netrwcnt <= 1
exe 'sil! unmenu '.g:NetrwTopLvlMenu
sil! unlet s:netrw_menu_enabled
endif
endif
endif
return
endif
@@ -8315,7 +8318,7 @@ function netrw#LocalBrowseCheck(dirname)
let ibuf = 1
let buflast = bufnr("$")
while ibuf <= buflast
if bufwinnr(ibuf) == -1 && isdirectory(s:NetrwFile(bufname(ibuf)))
if bufwinnr(ibuf) == -1 && !empty(bufname(ibuf)) && isdirectory(s:NetrwFile(bufname(ibuf)))
exe "sil! keepj keepalt ".ibuf."bw!"
endif
let ibuf= ibuf + 1

View File

@@ -0,0 +1,97 @@
vim9script
export var allowed: bool = false
export def Available(): bool
if get(g:, 'osc52_force_avail', 0)
return true
endif
return allowed
enddef
var sent_message: bool = false
def OSCMessage(id: number)
echom "Waiting for OSC52 response... Press CTRL-C to cancel"
sent_message = true
enddef
export def Paste(reg: string): tuple<string, list<string>>
# 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
# 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)
if reg == "+"
echoraw("\<Esc>]52;c;?\<Esc>\\")
else
echoraw("\<Esc>]52;p;?\<Esc>\\")
endif
var timerid: number = timer_start(1000, OSCMessage)
var interrupt: bool = false
# Wait for response from terminal. If we got interrupted (Ctrl-C), then do a
# redraw if we already sent the message, and return an empty string.
try
while true
var key: string = getcharstr(-1, {cursor: "hide"})
if key == "\<xOSC>" && match(v:termosc, '52;') != -1
break
elseif key == "\<C-c>"
interrupt = true
break
endif
endwhile
# This doesn't seem to catch Ctrl-C sent via term_sendkeys(), which is used in
# tests. So also check the result of getcharstr()/getchar().
catch /^Vim:Interrupt$/
interrupt = true
finally
timer_stop(timerid)
if sent_message
sent_message = false
:redraw!
endif
endtry
if interrupt
echo "Interrupted while waiting for OSC 52 response"
return ("c", [""])
endif
# Extract the base64 stuff
var stuff: string = matchstr(v:termosc, '52;.*;\zs[A-Za-z0-9+/=]*')
if len(stuff) == 0
return ("c", [])
endif
var ret: list<string>
# "stuff" may be an invalid base64 string, so catch any errors
try
ret = blob2str(base64_decode(stuff))
catch /E\(475\|1515\)/
echo "Invalid OSC 52 response received"
return ("c", [""])
endtry
return ("", ret)
enddef
export def Copy(reg: string, type: string, lines: list<string>): void
if reg == "+"
echoraw("\<Esc>]52;c;" .. base64_encode(str2blob(lines)) .. "\<Esc>\\")
else
echoraw("\<Esc>]52;p;" .. base64_encode(str2blob(lines)) .. "\<Esc>\\")
endif
enddef
# vim: set sw=2 sts=2 :

View File

@@ -0,0 +1,70 @@
*osc52.txt* For Vim version 9.1. Last change: 2025 Dec 18
VIM REFERENCE MANUAL
Use the OSC 52 terminal command for clipboard support
==============================================================================
1. OVERVIEW *osc52-overview*
The osc52.vim plugin provides support for the OSC 52 terminal command, which
allows an application to access the clipboard by communicating with the
terminal. This is useful in situations such as if you are in a SSH session.
*osc52-support*
In order for this plugin to work, the terminal Vim is running in must
recognize and handle the OSC 52 escape sequence. You can easily check this
online. Additionally, while yanking is guaranteed to work, some terminals
don't implement the paste functionality. If the terminal doesn't support
pasting, then Vim will just block waiting for the data which will never come.
In this case just press Ctrl-C to cancel the operation.
*osc52-selections*
Note that this only applies to users on Wayland or X11 platforms
Some terminals support the selection type parameter in the OSC 52 command.
This originates from X11, and some terminals check this parameter and handle
it accordingly. If your terminal handles this parameter, then the "+"
register corresponds to the regular selection, and the "*" register
corresponds to the primary selection. If your terminal does not handle it,
then it is up to the terminal to handle what selection to use.
2. HOW TO USE THE PLUGIN *osc52-how-to-use*
The osc52.vim package relies on Vim's clipboard provider functionality, see
|clipboard-providers|. To enable it, add the following to your |vimrc|: >vim
packadd osc52
set clipmethod+=osc52
<
This appends "osc52" to |clipmethod|, causing Vim to try it only after any
earlier clipboard methods. This allows Vim to use the system clipboard
directly when available, and automatically fall back to OSC 52 method when it
is not (for example, when running over SSH).
Note: that this fallback behavior applies only on platforms that use
|clipmethod| for accessing the clipboard. On macOS and Windows, Vim does not
use |clipmethod|, so this behaviour won't happen. Instead if OSC 52 support is
detected and "osc52" is the only value in |clipmethod|, then it will always be
used.
You can check whether the osc52.vim provider is active by inspecting
|v:clipmethod|. If it contains "osc52", the plugin is enabled.
Note: terminal multiplexers such as tmux may interfere with automatic OSC 52
detection.
*g:osc52_force_avail*
In most cases, the plugin should automatically detect and work if your
terminal supports the OSC 52 command. Internally, it does this by sending the
Primary Device Attributes (DA1) query. You may force enable the plugin by
setting |g:osc52_force_avail| to true.
*g:osc52_disable_paste*
If your terminal does not support pasting via OSC 52, or has it disabled, then
it is a good idea to set g:osc52_disable_paste to TRUE. This will cause an
empty string to be returned when Vim attempts to query the osc52.vim provider,
instead of doing a blocking wait, as said in |osc52-support|.
==============================================================================
vim:tw=78:ts=8:fo=tcq2:ft=help:

7
runtime/pack/dist/opt/osc52/doc/tags vendored Normal file
View File

@@ -0,0 +1,7 @@
g:osc52_disable_paste osc52.txt /*g:osc52_disable_paste*
g:osc52_force_avail osc52.txt /*g:osc52_force_avail*
osc52-how-to-use osc52.txt /*osc52-how-to-use*
osc52-overview osc52.txt /*osc52-overview*
osc52-selections osc52.txt /*osc52-selections*
osc52-support osc52.txt /*osc52-support*
osc52.txt osc52.txt /*osc52.txt*

View File

@@ -0,0 +1,52 @@
vim9script
# Vim plugin for OSC52 clipboard support
#
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2025 Dec 18
if !has("timers")
finish
endif
import autoload "../autoload/osc52.vim" as osc
v:clipproviders["osc52"] = {
"available": osc.Available,
"paste": {
"*": osc.Paste,
"+": osc.Paste
},
"copy": {
"*": osc.Copy,
"+": osc.Copy
},
}
def SendDA1(): void
if !has("gui_running") && !get(g:, 'osc52_force_avail', 0)
&& !get(g:, 'osc52_no_da1', 0)
echoraw("\<Esc>[c")
endif
enddef
if v:vim_did_enter
SendDA1()
endif
augroup VimOSC52Plugin
autocmd!
# Query support for OSC 52 using a DA1 query
autocmd TermResponseAll da1 {
if match(v:termda1, '?\zs.*52\ze') != -1
osc.allowed = true
:silent! clipreset
else
osc.allowed = false
:silent! clipreset
endif
}
autocmd VimEnter * SendDA1()
augroup END
# vim: set sw=2 sts=2 :

View File

@@ -0,0 +1,66 @@
" Vim syntax file
" Language: bpftrace
" Maintainer: Stanislaw Gruszka <stf_xl@wp.pl>
" Last Change: 2025 Dec 22
" Quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
syn keyword bpftraceConditional if else
syn keyword bpftraceRepeat while for unroll
syn keyword bpftraceStatement break continue return
syn keyword bpftraceKeyword let macro import config
syn keyword bpftraceOperator sizeof offsetof
syn keyword bpftraceProbe BEGIN END begin end
syn match bpftraceProbe "\v<(bench|self|test)\ze:"
syn match bpftraceProbe "\v<(fentry|fexit|kfunc|kretfunc|kprobe|kretprobe)\ze:"
syn match bpftraceProbe "\v<(profile|interval|iterator|hardware|software|uprobe|uretprobe)\ze:"
syn match bpftraceProbe "\v<(usdt|tracepoint|rawtracepoint|watchpoint|asyncwatchpoint)\ze:"
syn match bpftraceProbe "\v(^|[^:])<\zs(h|i|it|f|fr|k|kr|p|rt|s|t|u|ur|U|w|aw)\ze:"
syn keyword bpftraceType bool int8 int16 int32 int64
syn keyword bpftraceType uint8 uint16 uint32 uint64
syn keyword bpftraceType struct
syn match bpftraceMacro "\<\h\w*\ze\_s*("
syn match bpftraceNumber display "[+-]\=\<\d\+\>"
syn match bpftraceNumber display "\<0x\x\+\>"
syn keyword bpftraceBoolean true false
syn region bpftraceString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell extend
syn keyword bpftraceTodo contained TODO FIXME XXX
syn match bpftraceShebang /\%^#![^[].*/
syn region bpftraceCommentLine start="//" end="$" contains=bpftraceTodo,@Spell
syn region bpftraceCommentBlock matchgroup=bpftraceCommentBlock start="/\*" end="\*/" contains=bpftraceTodo,@Spell
" Define the default highlighting.
hi def link bpftraceConditional Conditional
hi def link bpftraceMacro Macro
hi def link bpftraceRepeat Repeat
hi def link bpftraceKeyword Keyword
hi def link bpftraceNumber Number
hi def link bpftraceBoolean Boolean
hi def link bpftraceShebang Comment
hi def link bpftraceCommentLine Comment
hi def link bpftraceCommentBlock Comment
hi def link bpftraceString String
hi def link bpftraceType Type
hi def link bpftraceProbe Identifier
syn sync minlines=100
let b:current_syntax = "bpftrace"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: ts=8 sw=8 noexpandtab

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: C
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2025 Jan 18
" Last Change: 2025 Nov 18
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Quit when a (custom) syntax file was already loaded
@@ -421,8 +421,10 @@ if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu")
syn keyword cConstant NDEBUG
" POSIX 2001
syn keyword cConstant SIGBUS SIGPOLL SIGPROF SIGSYS SIGURG SIGVTALRM SIGXCPU SIGXFSZ
" POSIX Issue 8 (post 2017)
syn keyword cConstant SIGWINCH
" non-POSIX signals
syn keyword cConstant SIGWINCH SIGINFO
syn keyword cConstant SIGINFO SIGIO
" Add POSIX errors as well. List comes from:
" http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/errno.h.html
syn keyword cConstant E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EAFNOSUPPORT EAGAIN EALREADY EBADF

View File

@@ -3,7 +3,7 @@
" Maintainer: Csaba Hoch <csaba.hoch@gmail.com>
" Contributor: Adam Rutkowski <hq@mtod.org>
" Johannes Christ <jc@jchri.st>
" Last Update: 2025-Jul-06
" Last Update: 2025-Nov-12
" License: Vim license
" URL: https://github.com/vim-erlang/vim-erlang-runtime
@@ -217,7 +217,7 @@ syn match erlangInnerDocAttribute '^\s*-\%(\s\|\n\|%.*\n\)*\%(moduledoc\|doc\)\>
syn match erlangInclude '^\s*-\%(\s\|\n\|%.*\n\)*\%(include\|include_lib\)\>' contains=erlangComment
syn match erlangRecordDef '^\s*-\%(\s\|\n\|%.*\n\)*record\>' contains=erlangComment
syn match erlangDefine '^\s*-\%(\s\|\n\|%.*\n\)*\%(define\|undef\)\>' contains=erlangComment
syn match erlangPreCondit '^\s*-\%(\s\|\n\|%.*\n\)*\%(ifdef\|ifndef\|else\|endif\)\>' contains=erlangComment
syn match erlangPreCondit '^\s*-\%(\s\|\n\|%.*\n\)*\%(ifdef\|ifndef\|else\|if\|elif\|endif\)\>' contains=erlangComment
syn match erlangType '^\s*-\%(\s\|\n\|%.*\n\)*\%(spec\|type\|opaque\|nominal\|callback\)\>' contains=erlangComment
" Keywords

View File

@@ -3,6 +3,7 @@
" Maintainer: Gautam Iyer <gi1242@users.sourceforge.net>
" Previous Maintainer: Haakon Riiser <hakonrk@fys.uio.no>
" Last Change: Sat 29 Sep 2007 11:08:34 AM PDT
" 2025 Dec 14: Update fvwm2 keywords #18924
"
" Thanks to David Necas (Yeti) for adding Fvwm 2.4 support.
"
@@ -157,7 +158,7 @@ else
\ PrintInfo Repeat Schedule State WindowFont
\ XSync XSynchronize AnimatedMove
\ HideGeometryWindow Layer Lower Move
\ MoveToDesk MoveThreshold MoveToPage
\ MoveToDesk MoveThreshold MoveToPage Resize
\ MoveToScreen OpaqueMoveSize PlaceAgain Raise
\ RaiseLower ResizeMaximize ResizeMove
\ ResizeMoveMaximize RestackTransients
@@ -166,7 +167,7 @@ else
\ FlipFocus Focus WarpToWindow Close Delete
\ Destroy Iconify Recapture RecaptureWindow
\ Refresh RefreshWindow Stick StickAcrossPages
\ StickAcrossDesks WindowShade
\ StickAcrossDesks WindowShade Maximize GotoDesk
\ WindowShadeAnimate IgnoreModifiers
\ EdgeCommand EdgeLeaveCommand GnomeButton
\ Stroke StrokeFunc FocusStyle DestroyStyle
@@ -186,6 +187,7 @@ else
\ QuitSession Restart SaveSession
\ SaveQuitSession KeepRc NoWindow Break
\ CleanupColorsets EchoFuncDefinition
\ InfoStoreAdd DesktopConfiguration
" Conditional commands
syn keyword fvwmKeyword nextgroup=fvwmCondition skipwhite
@@ -276,7 +278,7 @@ else
\ BackColor Colorset HilightFore HilightBack
\ HilightColorset BorderColorset
\ HilightBorderColorset IconTitleColorset
\ HilightIconTitleColorset
\ HilightIconTitleColorset IconTitleFormat
\ IconBackgroundColorset IconTitleRelief
\ IconBackgroundRelief IconBackgroundPadding
\ Font IconFont StartsOnDesk StartsOnPage
@@ -382,6 +384,7 @@ else
\ MinOverlapPlacementPenalties
\ MinOverlapPercentPlacementPenalties
\ MinWindowSize StartShaded
\ EdgeMoveDelay EdgeMoveResistance
" Cursor styles
syn keyword fvwmKeyword nextgroup=fvwmCursorStyle skipwhite
@@ -441,7 +444,8 @@ else
syn keyword fvwmBStyleNames contained
\ Simple Default Solid Colorset Vector Pixmap
\ AdjustedPixmap ShrunkPixmap StretchedPixmap
\ TiledPixmap MiniIcon
\ TiledPixmap MiniIcon MwmDecorMenu MwmDecorMin
\ MwmDecorMax MwmDecorShade MwmDecorStick MwmDecorLayer
syn keyword fvwmBStyleFlags contained
\ Raised Sunk Flat UseTitleStyle
\ UseBorderStyle

View File

@@ -1,7 +1,7 @@
" Vim syntax file generator
" Language: Vim script
" Maintainer: Hirohito Higashi (h_east)
" Last Change: 2025 Nov 08
" Last Change: 2025 Dec 04
let s:keepcpo= &cpo
set cpo&vim
@@ -31,6 +31,9 @@ function s:parse_vim_option(opt, missing_opt, term_out_code)
for line in getline(1, line('$'))
let list = matchlist(line, '^\s*{\s*"\(\w\+\)"\s*,\s*\%("\(\w\+\)"\|NULL\)\s*,\s*\%([^,]*\(P_BOOL\)[^,]*\|[^,]*\)\s*,\s*\([^,]*NULL\)\?.*')
if list[1] == 'completefuzzycollect'
continue
endif
let item.name = list[1]
let item.short_name = list[2]
let item.is_bool = empty(list[3]) ? 0 : 1
@@ -288,6 +291,7 @@ function s:get_vim_command_type(cmd_name)
" 6: unmap
" 7: abclear
" 8: modifiers
" 9: cd
" 99: (Exclude registration of "syn keyword")
let ab_prefix = '^[ci]\?'
let menu_prefix = '^\%([acinostvx]\?\|tl\)'
@@ -304,6 +308,9 @@ function s:get_vim_command_type(cmd_name)
augroup
autocmd
behave
breakadd
breakdel
breaklist
browse
bufdo
call
@@ -317,6 +324,7 @@ function s:get_vim_command_type(cmd_name)
confirm
const
copy
debug
debuggreedy
def
defer
@@ -353,14 +361,17 @@ function s:get_vim_command_type(cmd_name)
function
grep
grepadd
help
helpgrep
highlight
history
if
import
interface
insert
join
k
language
let
ldo
lfdo
@@ -389,6 +400,8 @@ function s:get_vim_command_type(cmd_name)
popup
profdel
profile
promptfind
promptrepl
public
python
pyfile
@@ -457,6 +470,9 @@ function s:get_vim_command_type(cmd_name)
let ret = 6
elseif index(s:get_cmd_modifiers(), a:cmd_name) != -1
let ret = 8
" :chdir handled specially for command/function distinction
elseif a:cmd_name =~# '^\%([lt]\?cd\|[lt]chdir\)$'
let ret = 9
else
let ret = 0
endif
@@ -924,6 +940,9 @@ function s:update_syntax_vim_file(vim_info)
" vimCommand - modifier
let lnum = s:search_and_check(kword . ' modifier', base_fname, str_info)
let lnum = s:append_syn_vimcmd(lnum, str_info, li, 8)
" vimCommand - cd
let lnum = s:search_and_check(kword . ' cd', base_fname, str_info)
let lnum = s:append_syn_vimcmd(lnum, str_info, li, 9)
update
quit!

View File

@@ -2,7 +2,7 @@
" Language: Vim script
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
" Doug Kearns <dougkearns@gmail.com>
" Last Change: 2025 Nov 11
" Last Change: 2025 Dec 04
" Former Maintainer: Charles E. Campbell
" DO NOT CHANGE DIRECTLY.
@@ -36,7 +36,7 @@ syn cluster vimCommentGroup contains=vimTodo,@Spell
" GEN_SYN_VIM: vimCommand normal, START_STR='syn keyword vimCommand contained', END_STR='nextgroup=vimBang'
" Lower priority :syn-match to allow for :command/function() distinction
syn match vimCommand "\<chd\%[ir]\>" nextgroup=vimBang
" :chdir is handled specially elsewhere
syn match vimCommand "\<co\%[py]\>" nextgroup=vimBang
syn match vimCommand "\<d\%[elete]\>" nextgroup=vimBang
syn match vimCommand "\<j\%[oin]\>" nextgroup=vimBang
@@ -246,7 +246,7 @@ syn match vimNumber '\<0z\%(\x\x\)\+\%(\.\%(\x\x\)\+\)*' skipwhite nextgroup=@vi
syn case match
" All vimCommands are contained by vimIsCommand. {{{2
syn cluster vimCmdList contains=vimAbb,vimAddress,vimAt,vimAutocmd,vimAugroup,vimBehave,vimCall,vimCatch,vimCommandModifier,vimConst,vimDoautocmd,vimDebuggreedy,vimDef,vimDefFold,vimDefer,vimDelcommand,vimDelFunction,vimDoCommand,@vimEcho,vimElse,vimEnddef,vimEndfunction,vimEndif,vimEval,vimExecute,vimIsCommand,vimExtCmd,vimExFilter,vimExMark,vimFiletype,vimFor,vimFunction,vimFunctionFold,vimGrep,vimGrepAdd,vimGlobal,vimHelpgrep,vimHighlight,vimImport,vimLet,vimLoadkeymap,vimLockvar,vimMake,vimMap,vimMark,vimMatch,vimNotFunc,vimNormal,vimProfdel,vimProfile,vimRedir,vimSet,vimSleep,vimSort,vimSyntax,vimSyntime,vimSynColor,vimSynLink,vimTerminal,vimThrow,vimUniq,vimUnlet,vimUnlockvar,vimUnmap,vimUserCmd,vimVimgrep,vimVimgrepadd,vimWincmd,vimMenu,vimMenutranslate,@vim9CmdList,@vimExUserCmdList,vimLua,vimMzScheme,vimPerl,vimPython,vimPython3,vimPythonX,vimRuby,vimTcl
syn cluster vimCmdList contains=vimAbb,vimAddress,vimAt,vimAutocmd,vimAugroup,vimBehave,vimBreakadd,vimBreakdel,vimBreaklist,vimCall,vimCatch,vimCd,vimCommandModifier,vimConst,vimDoautocmd,vimDebug,vimDebuggreedy,vimDef,vimDefFold,vimDefer,vimDelcommand,vimDelFunction,vimDoCommand,@vimEcho,vimElse,vimEnddef,vimEndfunction,vimEndif,vimEval,vimExecute,vimIsCommand,vimExtCmd,vimExFilter,vimExMark,vimFiletype,vimFor,vimFunction,vimFunctionFold,vimGrep,vimGrepAdd,vimGlobal,vimHelp,vimHelpgrep,vimHighlight,vimHistory,vimImport,vimLanguage,vimLet,vimLoadkeymap,vimLockvar,vimMake,vimMap,vimMark,vimMatch,vimNotFunc,vimNormal,vimProfdel,vimProfile,vimPrompt,vimRedir,vimSet,vimSleep,vimSort,vimSyntax,vimSyntime,vimSynColor,vimSynLink,vimTerminal,vimThrow,vimUniq,vimUnlet,vimUnlockvar,vimUnmap,vimUserCmd,vimVimgrep,vimVimgrepadd,vimWincmd,vimMenu,vimMenutranslate,@vim9CmdList,@vimExUserCmdList,vimLua,vimMzScheme,vimPerl,vimPython,vimPython3,vimPythonX,vimRuby,vimTcl
syn cluster vim9CmdList contains=vim9Abstract,vim9Class,vim9Const,vim9Enum,vim9Export,vim9Final,vim9For,vim9Interface,vim9Type,vim9Var
syn match vimCmdSep "\\\@1<!|" skipwhite nextgroup=@vimCmdList,vimSubst1,@vimFunc
syn match vimCmdSep ":\+" skipwhite nextgroup=@vimCmdList,vimSubst1
@@ -307,10 +307,49 @@ syn match vimBehave "\<be\%[have]\>" nextgroup=vimBehaveBang,vimBehaveModel,vi
syn match vimBehaveBang contained "\a\@1<=!" nextgroup=vimBehaveModel skipwhite
syn keyword vimBehaveModel contained mswin xterm
" Break* commands {{{2
" ===============
syn keyword vimBreakaddFunc contained func skipwhite nextgroup=vimBreakpointFunctionLine,vimBreakpointFunction
syn keyword vimBreakaddFile contained file skipwhite nextgroup=vimBreakpointFileLine,vimBreakpointFilename
syn keyword vimBreakaddHere contained here skipwhite nextgroup=vimComment,vim9Comment,vimSep
syn keyword vimBreakaddExpr contained expr skipwhite nextgroup=@vimExprList
syn match vimBreakpointGlob contained "*" skipwhite nextgroup=vimComment,vim9Comment,vimSep
syn match vimBreakpointNumber contained "\<\d\+\>" skipwhite nextgroup=vimComment,vim9Comment,vimSep
syn cluster vimBreakpointArg contains=vimBreakaddFunc,vimBreakaddFile,vimBreakaddHere,vimBreakaddExpr
syn match vimBreakpointFunction contained "\<\%(\*\|\w\)\+\>" skipwhite nextgroup=vimComment,vim9Comment,vimSep
syn match vimBreakpointFilename contained "\<\%(\*\|\f\)\+\>" skipwhite nextgroup=vimComment,vim9Comment,vimSep
syn match vimBreakpointFunctionLine contained "\<\d\+\>" skipwhite nextgroup=vimBreakpointFunction
syn match vimBreakpointFileLine contained "\<\d\+\>" skipwhite nextgroup=vimBreakpointFilename
syn keyword vimBreakadd breaka[dd] skipwhite nextgroup=@vimBreakpointArg
syn keyword vimBreakdel breakd[el] skipwhite nextgroup=@vimBreakpointArg,vimBreakpointNumber,vimBreakpointGlob
syn keyword vimBreaklist breakl[ist] skipwhite nextgroup=vimComment,vim9Comment,vimSep
" Call {{{2
" ====
syn match vimCall "\<call\=\>" skipwhite nextgroup=vimVar,@vimFunc
" Cd: {{{2
" ==
" GEN_SYN_VIM: vimCommand cd, START_STR='syn keyword vimCd', END_STR='skipwhite nextgroup=vimCdBang,vimCdArg,vimComment,vim9Comment,vimCmdSep'
syn match vimCd "\<chd\%[ir]\>" skipwhite nextgroup=vimCdBang,vimCdArg,vimComment,vim9Comment,vimCmdSep
syn region vimCdArg contained
\ start=+["#|]\@!\S+
\ end="\ze\s*$"
\ end=+\ze\s*\\\@1<!["#|]+
\ skipwhite nextgroup=vimComment,vim9Comment,vimCmdSep
\ contains=vimSpecfile,@vimWildCard
\ oneline
syn match vimCdBang contained "\a\@1<=!" skipwhite nextgroup=vimCdArg,vimComment,vim9Comment,vimCmdSep
" Debug {{{2
" =====
syn keyword vimDebug deb[ug] skipwhite nextgroup=@vimCmdList
" Debuggreedy {{{2
" ===========
" TODO: special-cased until generalised range/count support is implemented
@@ -350,6 +389,16 @@ endif
syn keyword vimFTCmd contained filet[ype]
syn keyword vimFTOption contained detect indent off on plugin
" History {{{2
" =======
" TODO: handle Vim9 "history" variable assignment (like :wincmd, but a common variable name)
syn keyword vimHistory his[tory] skipwhite nextgroup=vimHistoryName,vimHistoryRange,vimCmdSep,vimComment,vim9Comment
syn keyword vimHistoryName contained c[md] s[earch] e[xpr] i[nput] d[ebug] a[ll] skipwhite nextgroup=vimHistoryRange,vimCmdSep,vimComment,vim9Comment
syn match vimHistoryName contained "[:/?=@>]" skipwhite nextgroup=vimHistoryRange,vimCmdSep,vimComment,vim9Comment
syn match vimHistoryRange contained "-\=\<\d\+\>\%(\s*,\)\=" skipwhite nextgroup=vimCmdSep,vimComment,vim9Comment
syn match vimHistoryRange contained ",\s*-\=\d\+\>" skipwhite nextgroup=vimCmdSep,vimComment,vim9Comment
syn match vimHistoryRange contained "-\=\<\d\+\s*,\s*-\=\d\+\>" skipwhite nextgroup=vimCmdSep,vimComment,vim9Comment
" Import {{{2
" ======
syn keyword vimImportAutoload contained autoload skipwhite nextgroup=vimImportFilename
@@ -391,6 +440,16 @@ endif
syn match vimImportName contained "\%(\<as\s\+\)\@<=\h\w*\>" skipwhite nextgroup=@vimComment
syn match vimImport "\<imp\%[ort]\>" skipwhite nextgroup=vimImportAutoload,vimImportFilename
" Language {{{2
" ========
syn keyword vimLanguage lan[guage] skipwhite nextgroup=@vimLanguageName,vimLanguageCategory,vimSep,vimComment,vim9Comment
syn keyword vimLanguageCategory contained col[late] cty[pe] mes[sages] tim[e] skipwhite nextgroup=@vimLanguageName
" [language[_territory][.codeset][@modifier]] and the reserved "C" and "POSIX"
syn match vimLanguageName contained "[[:alnum:]][[:alnum:]._@-]*[[:alnum:]]" nextgroup=vimSep,vimComment,vim9Comment
syn keyword vimLanguageNameReserved contained C POSIX nextgroup=vimSep,vimComment,vim9Comment
syn cluster vimLanguageName contains=vimLanguageName,vimLanguageNameReserved
" Augroup : vimAugroupError removed because long augroups caused sync'ing problems. {{{2
" ======= : Trade-off: Increasing synclines with slower editing vs augroup END error checking.
syn cluster vimAugroupList contains=@vimCmdList,vimFilter,@vimFunc,vimLineComment,vimSpecFile,vimOper,vimNumber,vimOperParen,@vimComment,vimString,vimSubst,vimRegister,vimCmplxRepeat,vimNotation,vimCtrlChar,vimContinue
@@ -825,6 +884,10 @@ syn match vimSpecFile "\s%<"ms=s+1,me=e-1 nextgroup=vimSpecFileMod,vimSubst1
syn match vimSpecFile "#\d\+\|[#%]<\>" nextgroup=vimSpecFileMod,vimSubst1
syn match vimSpecFileMod "\(:[phtre]\)\+" contained
syn match vimSpecFile contained "%[ \t:]"me=e-1 nextgroup=vimSpecFileMod
syn match vimSpecFile contained excludenl "%$" nextgroup=vimSpecFileMod
syn match vimSpecFile contained "%<"me=e-1 nextgroup=vimSpecFileMod
" User-Specified Commands: {{{2
" =======================
syn cluster vimUserCmdList contains=@vimCmdList,vimCmplxRepeat,@vimComment,vimCtrlChar,vimEscapeBrace,@vimFunc,vimNotation,vimNumber,vimOper,vimRegister,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange
@@ -1392,11 +1455,23 @@ syn region vimMakeArgs contained
syn match vimMakeBarEscape contained "\\|"
syn match vimMakeBang contained "\a\@1<=!" skipwhite nextgroup=vimMakeArgs,vimCmdSep
" Help*: {{{2
" =====
syn match vimHelp "\<h\%[elp]\>" skipwhite nextgroup=vimHelpBang,vimHelpArg,vimHelpNextCommand
" TODO: match wildcards, ignoring exceptions?
syn region vimHelpArg contained
\ start="\S"
\ matchgroup=Special
\ end="\%(@\a\a\)\=\ze\s*\%($\|\%x0d\|\%x00\||\s*\S\)"
\ oneline
syn match vimHelpBang contained "\a\@1<=!" skipwhite nextgroup=vimHelpArg,vimHelpNextCommand
syn match vimHelpNextCommand contained "\ze|\s*\S" skipwhite nextgroup=vimCmdSep
syn match vimHelpgrep "\<l\=helpg\%[rep]\>" skipwhite nextgroup=vimHelpgrepBang,vimHelpgrepPattern
syn region vimHelpgrepPattern contained
\ start="\S"
\ matchgroup=Special
\ end="@\w\w\>"
\ end="@\a\a\>"
\ end="$"
\ contains=@vimSubstList
\ oneline
@@ -1591,6 +1666,15 @@ syn keyword vimProfdelArg contained file skipwhite nextgroup=vimProfilePattern
syn keyword vimProfdelArg contained here skipwhite nextgroup=vimCmdSep,@vimComment
syn match vimProfdel "\<profd\%[el]\>" skipwhite nextgroup=vimProfdelArg
" Prompt{find,repl}: {{{2
" =================
syn region vimPromptArg contained
\ start="\S"
\ skip=+\n\s*\%(\\\|["#]\\ \)+
\ end="$"
\ contains=@vimContinue
syn keyword vimPrompt promptf[ind] promptr[epl] skipwhite nextgroup=vimPromptArg
" Redir: {{{2
" =====
syn match vimRedir "\<redir\=\>" skipwhite nextgroup=vimRedirBang,vimRedirFileOperator,vimRedirVariableOperator,vimRedirRegister,vimRedirEnd
@@ -2359,8 +2443,18 @@ if !exists("skip_vim_syntax_inits")
hi def link vimBehaveModel vimBehave
hi def link vimBehave vimCommand
hi def link vimBracket Delimiter
hi def link vimBreakaddFunc Special
hi def link vimBreakaddFile Special
hi def link vimBreakaddHere Special
hi def link vimBreakaddExpr Special
hi def link vimBreakpointGlob Special
hi def link vimBreakadd vimCommand
hi def link vimBreakdel vimCommand
hi def link vimBreaklist vimCommand
hi def link vimCall vimCommand
hi def link vimCatch vimCommand
hi def link vimCd vimCommand
hi def link vimCdBang vimBang
hi def link vimCmplxRepeat SpecialChar
hi def link vimCommand Statement
hi def link vimCommandModifier vimCommand
@@ -2376,6 +2470,7 @@ if !exists("skip_vim_syntax_inits")
hi def link vimContinueString vimString
hi def link vimCount Number
hi def link vimCtrlChar SpecialChar
hi def link vimDebug vimCommand
hi def link vimDebuggreedy vimCommand
hi def link vimDef vimCommand
hi def link vimDefBang vimBang
@@ -2430,6 +2525,8 @@ if !exists("skip_vim_syntax_inits")
hi def link vimGroupRem vimSynOption
hi def link vimGroupSpecial Special
hi def link vimGroup Type
hi def link vimHelp vimCommand
hi def link vimHelpBang vimBang
hi def link vimHelpgrep vimCommand
hi def link vimHiAttrib PreProc
hi def link vimHiBang vimBang
@@ -2450,6 +2547,8 @@ if !exists("skip_vim_syntax_inits")
hi def link vimHiStartStop vimHiTerm
hi def link vimHiTerm Type
hi def link vimHLGroup vimGroup
hi def link vimHistory vimCommand
hi def link vimHistoryName Special
hi def link vimImport vimCommand
hi def link vimImportAutoload Special
hi def link vimImportAs vimImport
@@ -2459,6 +2558,9 @@ if !exists("skip_vim_syntax_inits")
hi def link vimKeymapTailComment vimComment
hi def link vimLambdaBrace Delimiter
hi def link vimLambdaOperator vimOper
hi def link vimLanguage vimCommand
hi def link vimLanguageCategory Special
hi def link vimLanguageNameReserved Constant
hi def link vimLet vimCommand
hi def link vimLetHeredoc vimString
hi def link vimLetHeredocStart Special
@@ -2519,6 +2621,7 @@ if !exists("skip_vim_syntax_inits")
hi def link vimProfileBang vimBang
hi def link vimProfdel vimCommand
hi def link vimProfdelArg vimSpecial
hi def link vimPrompt vimCommand
hi def link vimPython vimCommand
hi def link vimPython3 vimCommand
hi def link vimPythonX vimCommand

View File

@@ -2,6 +2,7 @@
" Language: Haskell
" Maintainer: Haskell Cafe mailinglist <haskell-cafe@haskell.org>
" Last Change: 2024 Mar 28 by Enrico Maria De Angelis <enricomaria.dean6elis@gmail.com>
" 2025 Nov 20 by Vim Project: Allow spaces in backticks #18776
" Original Author: John Williams <jrw@pobox.com>
"
" Thanks to Ryan Crumley for suggestions and John Meacham for
@@ -46,8 +47,8 @@ syn match VarId "\(\<[A-Z][a-zA-Z0-9_']*\.\)*\<[a-z][a-zA-Z0-9_']*\>" contains=@
" others are variables (e.g. functions).
syn match hsVarSym "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=[-!#$%&\*\+/<=>\?@\\^|~.][-!#$%&\*\+/<=>\?@\\^|~:.]*"
syn match hsConSym "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=:[-!#$%&\*\+./<=>\?@\\^|~:]*"
syn match hsVarSym "`\(\<[A-Z][a-zA-Z0-9_']*\.\)\=[a-z][a-zA-Z0-9_']*`"
syn match hsConSym "`\(\<[A-Z][a-zA-Z0-9_']*\.\)\=[A-Z][a-zA-Z0-9_']*`"
syn match hsVarSym "` *\(\<[A-Z][a-zA-Z0-9_']*\.\)\=[a-z][a-zA-Z0-9_']* *`"
syn match hsConSym "` *\(\<[A-Z][a-zA-Z0-9_']*\.\)\=[A-Z][a-zA-Z0-9_']* *`"
" (Non-qualified) identifiers which start with # are labels
syn match hsLabel "#[a-z][a-zA-Z0-9_']*\>"

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Vim help file
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2025 Oct 19
" Last Change: 2025 Nov 13
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Quit when a (custom) syntax file was already loaded
@@ -62,20 +62,6 @@ if has_key(g:help_example_languages, "vim9")
syn cluster helpExampleHighlight_vim9 add=vim9LegacyHeader_HelpExample
endif
" builtin.txt
syn region helpReturnType
\ start="^\t\tReturn type: "
\ end="^$"
\ contains=@vimType,helpHyperTextJump,helpSpecial
\ transparent
syn match helpSpecial contained "{type}" containedin=vimCompoundType
" various.txt
syn region helpExCommand_Version
\ start="^:ve\[rsion]\t\t"
\ end="\n\ze\n:ve\[rsion] {nr}"
\ contains=helpHyperTextEntry,helpHyperTextJump,helpOption
if has("ebcdic")
syn match helpHyperTextJump "\\\@<!|[^"*|]\+|" contains=helpBar
syn match helpHyperTextEntry "\*[^"*|]\+\*\s"he=e-1 contains=helpStar
@@ -229,6 +215,26 @@ syn match helpDiffAdded "\t[* ]Added\t\+[a-z].*"
syn match helpDiffChanged "\t[* ]Changed\t\+[a-z].*"
syn match helpDiffRemoved "\t[* ]Removed\t\+[a-z].*"
" builtin.txt
syn region helpReturnType
\ start="^\t\tReturn type: "
\ end="^$"
\ contains=@vimType,helpHyperTextJump,helpSpecial
\ transparent
syn match helpSpecial contained "{type}" containedin=vimCompoundType
" digraph.txt
syn region helpDigraphTable
\ start="*digraph-table\%(-mbyte\)\=\*"
\ end="^$"
\ contains=helpHyperTextEntry,helpHeader
" various.txt
syn region helpExCommand_Version
\ start="^:ve\[rsion]\t\t"
\ end="\n\ze\n:ve\[rsion] {nr}"
\ contains=helpHyperTextEntry,helpHyperTextJump,helpOption
" Additionally load a language-specific syntax file "help_ab.vim".
let s:i = match(expand("%"), '\.\a\ax$')
if s:i > 0
@@ -238,7 +244,6 @@ unlet s:i
syn sync minlines=40
" Define the default highlighting.
" Only used when an item doesn't have highlighting yet
hi def link helpIgnore Ignore

View File

@@ -1,9 +1,10 @@
" Vim syntax file
" Language: i3 config file
" Original Author: Josef Litos (JosefLitos/i3config.vim)
" Maintainer: Quentin Hibon (github user hiqua)
" Version: 1.2.4
" Last Change: 2024-05-24
" Original Author: Josef Litos (litoj/i3config.vim)
" Maintainer: Josef Litos (litoj)
" Previous maintainer: Quentin Hibon (github user hiqua)
" Version: 1.2.7
" Last Change: 2025-12-02
" References:
" http://i3wm.org/docs/userguide.html#configuring
@@ -51,8 +52,8 @@ syn match i3ConfigComment /#.*$/ contained contains=i3ConfigTodo
" 4.3 Fonts
syn match i3ConfigFontSize / \d\+\(px\)\?$/ contained
syn match i3ConfigColonOperator /:/ contained
syn match i3ConfigFontNamespace /pango:/ contained contains=i3ConfigColonOperator
syn region i3ConfigParamLine matchgroup=i3ConfigKeyword start=/font / skip=/\\$/ end=/$/ contained contains=i3ConfigFontNamespace,i3ConfigFontSize,i3ConfigSeparator keepend containedin=i3ConfigBarBlock
syn match i3ConfigFontNamespace /\(pango\|xft\):/ contained contains=i3ConfigColonOperator
syn region i3ConfigFont matchgroup=i3ConfigKeyword start=/font / skip=/\\$/ end=/$/ contained contains=i3ConfigFontNamespace,i3ConfigFontSize,i3ConfigSeparator keepend
" 4.4-4.5 Keyboard/Mouse bindings
syn match i3ConfigBindArgument /--\(release\|border\|whole-window\|exclude-titlebar\) / contained nextgroup=i3ConfigBindArgument,i3ConfigBindCombo
@@ -64,7 +65,9 @@ syn region i3ConfigBind start=/\zs/ skip=/\\$/ end=/$/ contained contains=@i3Con
syn keyword i3ConfigBindKeyword bindsym bindcode contained skipwhite nextgroup=i3ConfigBindArgument,i3ConfigBindCombo
" 4.6 Binding modes
syn region i3ConfigModeBlock matchgroup=i3ConfigKeyword start=/mode\ze\( --pango_markup\)\? \([^'" {]\+\|'[^']\+'\|".\+"\)\s\+{$/ end=/^}\zs$/ contained contains=i3ConfigShParam,@i3ConfigStrVar,i3ConfigBindKeyword,i3ConfigComment,i3ConfigParen fold keepend extend
syn region i3ConfigModeBlock matchgroup=i3ConfigParen start=/{$/ end=/^\s*}$/ contained contains=i3ConfigComment,i3ConfigBindKeyword fold keepend
syn match i3ConfigModeIdent /[^ ,;]\+/ contained contains=@i3ConfigStrVar extend skipwhite nextgroup=i3ConfigModeBlock
syn match i3ConfigKeyword /mode\( --pango_markup\)\?/ contained contains=i3ConfigShParam skipwhite nextgroup=i3ConfigModeIdent
" 4.7 Floating modifier
syn match i3ConfigKeyword /floating_modifier [$A-Z][0-9A-Za-z]*$/ contained contains=i3ConfigVariable,i3ConfigBindModkey
@@ -120,17 +123,15 @@ syn region i3ConfigKeyword start=/assign / end=/$/ contained contains=i3ConfigAs
syn region i3ConfigShCommand matchgroup=i3ConfigShDelim start=/\$(/ end=/)/ contained contains=i3ConfigExecAction,i3ConfigShCommand,i3ConfigShDelim,i3ConfigShOper,i3ConfigShParam,i3ConfigString,i3ConfigNumber,i3ConfigVariable extend
syn match i3ConfigShDelim /[[\]{}();`]\+/ contained
syn match i3ConfigShOper /[<>&|+=~^*!.?]\+/ contained
syn match i3ConfigShParam /\<-[A-Za-z-][0-9A-Za-z_-]*\>/ contained
syn cluster i3ConfigSh contains=@i3ConfigIdent,i3ConfigShOper,i3ConfigShDelim,i3ConfigShParam,i3ConfigShCommand
syn match i3ConfigShParam /\s\zs-[A-Za-z-][0-9A-Za-z_-]*\>/ contained
syn cluster i3ConfigSh contains=@i3ConfigIdent,i3ConfigShOper,i3ConfigShDelim,i3ConfigShParam,i3ConfigShCommand,i3ConfigComment
syn region i3ConfigExec start=/ \ze[^{]/ skip=/\\$/ end=/$/ contained contains=i3ConfigExecAction,@i3ConfigSh keepend
syn keyword i3ConfigKeyword exec_always exec contained nextgroup=i3ConfigExec
" 4.21 Workspaces per output
syn match i3ConfigOutputIdent /[^'",; ]\+/ contained contains=@i3ConfigIdent,i3ConfigColonOperator skipwhite nextgroup=i3ConfigOutputIdent
syn region i3ConfigOutputIdent start=/['"]/ end=/\ze/ contained contains=@i3ConfigIdent skipwhite nextgroup=i3ConfigOutputIdent
syn match i3ConfigOutputIdent /[^ ,;]\+/ contained contains=@i3ConfigIdent,i3ConfigColonOperator skipwhite nextgroup=i3ConfigOutputIdent extend
syn keyword i3ConfigOutput output contained skipwhite nextgroup=i3ConfigOutputIdent
syn match i3ConfigWorkspaceIdent /[^'",; ]\+/ contained contains=@i3ConfigIdent skipwhite nextgroup=i3ConfigGaps,i3ConfigOutput
syn region i3ConfigWorkspaceIdent start=/['"]/ end=/\ze/ contained contains=@i3ConfigIdent skipwhite nextgroup=i3ConfigGaps,i3ConfigOutput
syn match i3ConfigWorkspaceIdent /[^ ,;]\+/ contained contains=@i3ConfigIdent skipwhite nextgroup=i3ConfigGaps,i3ConfigOutput extend
syn keyword i3ConfigKeyword workspace contained skipwhite nextgroup=i3ConfigWorkspaceIdent
" 4.22 Changing colors
@@ -151,7 +152,9 @@ syn keyword i3ConfigKeyword mouse_warping contained skipwhite nextgroup=i3Config
" 4.26 Popups while fullscreen
syn keyword i3ConfigPopupFullscreenOpts smart ignore leave_fullscreen contained
syn keyword i3ConfigKeyword popup_during_fullscreen contained skipwhite nextgroup=i3ConfigPopupFullscreenOpts
syn keyword i3ConfigPopupFullscreenOptsExtra all contained
syn cluster i3ConfigPopupFullscreenOpts contains=i3ConfigPopupFullscreenOpts,i3ConfigPopupFullscreenOptsExtra
syn keyword i3ConfigKeyword popup_during_fullscreen contained skipwhite nextgroup=@i3ConfigPopupFullscreenOpts
" 4.27 Focus wrapping
syn keyword i3ConfigFocusWrappingOpts force workspace contained
@@ -189,7 +192,9 @@ syn keyword i3ConfigBarOpts modifier contained skipwhite nextgroup=i3ConfigBindC
syn keyword i3ConfigBarOpts i3bar_command status_command workspace_command contained skipwhite nextgroup=@i3ConfigSh
syn keyword i3ConfigBarOpts mode hidden_state id position output tray_output tray_padding separator_symbol workspace_buttons workspace_min_width strip_workspace_numbers strip_workspace_name binding_mode_indicator padding contained skipwhite nextgroup=i3ConfigBarOptVals,@i3ConfigValue,i3ConfigShOper
syn keyword i3ConfigBarOptVals dock hide invisible show none top bottom primary nonprimary contained
syn region i3ConfigBarBlock matchgroup=i3ConfigKeyword start=/bar\ze {$/ end=/^\s*}\zs$/ contained contains=i3ConfigBarOpts,i3ConfigComment,i3ConfigParen,i3ConfigBindKeyword,i3ConfigColorsBlock fold keepend extend
syn region i3ConfigBarBlock matchgroup=i3ConfigParen start=/ {$/ end=/^\s*}$/ contained contains=i3ConfigBarOpts,i3ConfigComment,i3ConfigBindKeyword,i3ConfigColorsBlock,i3ConfigFont fold keepend
syn keyword i3ConfigKeyword bar contained nextgroup=i3ConfigBarBlock
" 5.16 Color block
syn match i3ConfigColorSeq /#[0-9A-Fa-f]\{3,8}\|\$[0-9A-Za-z_:|[\]-]\+/ contained contains=@i3ConfigColVar skipwhite nextgroup=i3ConfigColorSeq
@@ -260,9 +265,9 @@ syn match i3ConfigMarkOpt /--\(add\|replace\)\( --toggle\)\?/ contained contains
syn keyword i3ConfigActionKeyword mark contained skipwhite nextgroup=i3ConfigMarkOpt,i3ConfigOutputIdent
" Commands usable for direct config calls - for enforcing start of line for Commands
syn match i3ConfigTopLevelDirective /^\s*/ nextgroup=i3ConfigComment,i3ConfigKeyword,i3ConfigCommand,i3ConfigBindKeyword,i3ConfigParamLine,i3ConfigModeBlock,i3ConfigBarBlock,i3ConfigError
syn match i3ConfigTopLevelDirective /^\s*/ nextgroup=i3ConfigComment,i3ConfigKeyword,i3ConfigCommand,i3ConfigBindKeyword,i3ConfigParamLine,i3ConfigFont,i3ConfigError
" Commands useable in keybinds
" Commands usable in keybinds
syn keyword i3ConfigActionKeyword mode append_layout kill open fullscreen sticky split floating swap unmark title_window_icon title_format border restart reload exit scratchpad nop bar contained skipwhite nextgroup=i3ConfigOption,@i3ConfigValue
syn keyword i3ConfigOption default enable disable toggle key restore current horizontal vertical auto none normal pixel show container with id con_id padding hidden_state hide dock invisible contained skipwhite nextgroup=i3ConfigOption,@i3ConfigValue
" Commands usable at runtime (outside loading config)
@@ -281,15 +286,18 @@ hi def link i3ConfigBoolean Boolean
hi def link i3ConfigString String
hi def link i3ConfigColor Constant
hi def link i3ConfigNumber Number
hi def link i3ConfigIdent Identifier
hi def link i3ConfigComment Comment
hi def link i3ConfigColonOperator i3ConfigOperator
hi def link i3ConfigFontNamespace i3ConfigOption
hi def link i3ConfigFontSize i3ConfigNumber
hi def link i3ConfigFont i3ConfigParamLine
hi def link i3ConfigBindArgument i3ConfigShParam
hi def link i3ConfigBindModifier i3ConfigOperator
hi def link i3ConfigBindModkey Special
hi def link i3ConfigBindCombo SpecialChar
hi def link i3ConfigBindKeyword i3ConfigKeyword
hi def link i3ConfigModeIdent i3ConfigIdent
hi def link i3ConfigSizeSpecial i3ConfigOperator
hi def link i3ConfigOrientationOpts i3ConfigOption
hi def link i3ConfigWorkspaceLayoutOpts i3ConfigOption
@@ -303,14 +311,15 @@ hi def link i3ConfigShParam PreProc
hi def link i3ConfigShDelim Delimiter
hi def link i3ConfigShOper Operator
hi def link i3ConfigShCommand Normal
hi def link i3ConfigOutputIdent i3ConfigParamLine
hi def link i3ConfigOutputIdent i3ConfigIdent
hi def link i3ConfigOutput i3ConfigMoveType
hi def link i3ConfigWorkspaceIdent i3ConfigParamLine
hi def link i3ConfigWorkspaceIdent i3ConfigIdent
hi def link i3ConfigDotOperator i3ConfigOperator
hi def link i3ConfigClientOpts i3ConfigOption
hi def link i3ConfigFocusFollowsMouseOpts i3ConfigOption
hi def link i3ConfigMouseWarpingOpts i3ConfigOption
hi def link i3ConfigPopupFullscreenOpts i3ConfigOption
hi def link i3ConfigPopupFullscreenOptsExtra i3ConfigPopupFullscreenOpts
hi def link i3ConfigFocusWrappingOpts i3ConfigOption
hi def link i3ConfigTimeUnit i3ConfigNumber
hi def link i3ConfigFocusOnActivationOpts i3ConfigOption
@@ -340,6 +349,7 @@ hi def link i3ConfigResizeExtra i3ConfigOption
hi def link i3ConfigResizeDir i3ConfigOption
hi def link i3ConfigResizeType i3ConfigOption
hi def link i3ConfigMark i3ConfigCommand
hi def link i3ConfigMarkOpt i3ConfigOption
hi def link i3ConfigActionKeyword i3ConfigCommand
hi def link i3ConfigOption Type

View File

@@ -3,6 +3,7 @@
" Maintainer: Carlo Baldassi <carlobaldassi@gmail.com>
" Homepage: https://github.com/JuliaEditorSupport/julia-vim
" Last Change: 2021 Aug 04
" 2025 Dec 08 by Vim Project (update syntax script from upstream #18894)
if version < 600
syntax clear
@@ -41,8 +42,8 @@ let s:julia_highlight_operators = get(g:, "julia_highlight_operators", 1)
" because those may or may not be valid in the lookbehind on a case-by-case
" basis.
let s:nonid_chars = '\U00-\U08' . '\U0A-\U1F'
\ . '\U21-\U28' . '\U2A-\U2F' . '\U3A-\U40' . '\U5B-\U5E' . '\U60' . '\U7B\U7C'
\ . '\U7E-\UA1' . '\UA7\UA8' . '\UAB-\UAD' . '\UAF\UB1\UB4' . '\UB6-\UB8' . '\UBB\UBF' . '\UD7\UF7'
\ . '\U21-\U28' . '\U2A-\U2F' . '\U3A-\U40' . '\U5B\U5C\U5E' . '\U60' . '\U7B\U7C'
\ . '\U7E-\UA1' . '\UA7\UA8' . '\UAB-\UAD' . '\UAF\UB1\UB4' . '\UB6-\UB8' . '\UBB\UBF' . '\UD7\UF7'
" The complete list
let s:nonidS_chars = '[:space:])\U5D}' . s:nonid_chars
@@ -59,12 +60,6 @@ let s:op_chars = '\U25\U26\U2A\U2B\U2D\U2F\U3C-\U3E\U5C\U5E\U7C\U7E\UAC\UB1\UD7\
" The list contains the following characters: '…⁝⅋←↑→↓↔↚↛↜↝↞↠↢↣↤↦↩↪↫↬↮↶↷↺↻↼↽⇀⇁⇄⇆⇇⇉⇋⇌⇍⇎⇏⇐⇒⇔⇚⇛⇜⇝⇠⇢⇴⇵⇶⇷⇸⇹⇺⇻⇼⇽⇾⇿∈∉∊∋∌∍∓∔∗∘∙√∛∜∝∤∥∦∧∨∩∪∷∸∺∻∽∾≀≁≂≃≄≅≆≇≈≉≊≋≌≍≎≏≐≑≒≓≔≕≖≗≘≙≚≛≜≝≞≟≠≡≢≣≤≥≦≧≨≩≪≫≬≭≮≯≰≱≲≳≴≵≶≷≸≹≺≻≼≽≾≿⊀⊁⊂⊃⊄⊅⊆⊇⊈⊉⊊⊋⊍⊎⊏⊐⊑⊒⊓⊔⊕⊖⊗⊘⊙⊚⊛⊜⊞⊟⊠⊡⊢⊣⊩⊬⊮⊰⊱⊲⊳⊴⊵⊶⊷⊻⊼⊽⋄⋅⋆⋇⋉⋊⋋⋌⋍⋎⋏⋐⋑⋒⋓⋕⋖⋗⋘⋙⋚⋛⋜⋝⋞⋟⋠⋡⋢⋣⋤⋥⋦⋧⋨⋩⋪⋫⋬⋭⋮⋯⋰⋱⋲⋳⋴⋵⋶⋷⋸⋹⋺⋻⋼⋽⋾⋿⌿▷⟂⟈⟉⟑⟒⟕⟖⟗⟰⟱⟵⟶⟷⟹⟺⟻⟼⟽⟾⟿⤀⤁⤂⤃⤄⤅⤆⤇⤈⤉⤊⤋⤌⤍⤎⤏⤐⤑⤒⤓⤔⤕⤖⤗⤘⤝⤞⤟⤠⥄⥅⥆⥇⥈⥉⥊⥋⥌⥍⥎⥏⥐⥑⥒⥓⥔⥕⥖⥗⥘⥙⥚⥛⥜⥝⥞⥟⥠⥡⥢⥣⥤⥥⥦⥧⥨⥩⥪⥫⥬⥭⥮⥯⥰⦷⦸⦼⦾⦿⧀⧁⧡⧣⧤⧥⧴⧶⧷⧺⧻⨇⨈⨝⨟⨢⨣⨤⨥⨦⨧⨨⨩⨪⨫⨬⨭⨮⨰⨱⨲⨳⨴⨵⨶⨷⨸⨹⨺⨻⨼⨽⩀⩁⩂⩃⩄⩅⩊⩋⩌⩍⩎⩏⩐⩑⩒⩓⩔⩕⩖⩗⩘⩚⩛⩜⩝⩞⩟⩠⩡⩢⩣⩦⩧⩪⩫⩬⩭⩮⩯⩰⩱⩲⩳⩴⩵⩶⩷⩸⩹⩺⩻⩼⩽⩾⩿⪀⪁⪂⪃⪄⪅⪆⪇⪈⪉⪊⪋⪌⪍⪎⪏⪐⪑⪒⪓⪔⪕⪖⪗⪘⪙⪚⪛⪜⪝⪞⪟⪠⪡⪢⪣⪤⪥⪦⪧⪨⪩⪪⪫⪬⪭⪮⪯⪰⪱⪲⪳⪴⪵⪶⪷⪸⪹⪺⪻⪼⪽⪾⪿⫀⫁⫂⫃⫄⫅⫆⫇⫈⫉⫊⫋⫌⫍⫎⫏⫐⫑⫒⫓⫔⫕⫖⫗⫘⫙⫛⫷⫸⫹⫺⬰⬱⬲⬳⬴⬵⬶⬷⬸⬹⬺⬻⬼⬽⬾⬿⭀⭁⭂⭃⭄⭇⭈⭉⭊⭋⭌←↑→↓'
let s:op_chars_wc = '\U2026\U205D\U214B\U2190-\U2194\U219A-\U219E\U21A0\U21A2-\U21A4\U21A6\U21A9-\U21AC\U21AE\U21B6\U21B7\U21BA-\U21BD\U21C0\U21C1\U21C4\U21C6\U21C7\U21C9\U21CB-\U21D0\U21D2\U21D4\U21DA-\U21DD\U21E0\U21E2\U21F4-\U21FF\U2208-\U220D\U2213\U2214\U2217-\U221D\U2224-\U222A\U2237\U2238\U223A\U223B\U223D\U223E\U2240-\U228B\U228D-\U229C\U229E-\U22A3\U22A9\U22AC\U22AE\U22B0-\U22B7\U22BB-\U22BD\U22C4-\U22C7\U22C9-\U22D3\U22D5-\U22FF\U233F\U25B7\U27C2\U27C8\U27C9\U27D1\U27D2\U27D5-\U27D7\U27F0\U27F1\U27F5-\U27F7\U27F9-\U27FF\U2900-\U2918\U291D-\U2920\U2944-\U2970\U29B7\U29B8\U29BC\U29BE-\U29C1\U29E1\U29E3-\U29E5\U29F4\U29F6\U29F7\U29FA\U29FB\U2A07\U2A08\U2A1D\U2A1F\U2A22-\U2A2E\U2A30-\U2A3D\U2A40-\U2A45\U2A4A-\U2A58\U2A5A-\U2A63\U2A66\U2A67\U2A6A-\U2AD9\U2ADB\U2AF7-\U2AFA\U2B30-\U2B44\U2B47-\U2B4C\UFFE9-\UFFEC'
" Full operators regex
let s:operators = '\%(' . '\.\%([-+*/^÷%|&⊻]\|//\|\\\|>>\|>>>\?\)\?=' .
\ '\|' . '[:<>]=\|||\|&&\||>\|<|\|[<>:]:\|<<\|>>>\?\|//\|[-=]>\|\.\.\.\?' .
\ '\|' . '\.\?[!' . s:op_chars . s:op_chars_wc . ']' .
\ '\)'
" Characters that can be used to start an identifier. Above \UBF we don't
" bother checking. (If a UTF8 operator is used, it will take precedence anyway.)
@@ -77,6 +72,12 @@ let s:id_charsW = '\%([0-9A-Za-z_!\UA2-\UA6\UA9\UAA\UAE-\UB0\UB2-\UB5\UB8-\UBA\U
" A valid julia identifier, more or less
let s:idregex = '\%(' . s:id_charsH . s:id_charsW . '*\)'
" Full operators regex
let s:operators = '\%(' . '\.\%([-+*/^÷%|&⊻]\|//\|\\\|>>\|>>>\?\)\?='
\ . '\|' . '[!:<>]=\|||\|&&\||>\|<|\|[<>:]:\|<<\|>>>\?\|//\|[-=]>\|\.\.\.\?'
\ . '\|' . '\.!' . '\|'.s:id_charsW.'\@'.s:d(1).'<!!'
\ . '\|' . '\.\?[' . s:op_chars . s:op_chars_wc . ']'
\ . '\)'
syn case match
@@ -87,10 +88,10 @@ syntax cluster juliaExprsNodot contains=@juliaParItems,@juliaStringItems,@julia
syntax cluster juliaParItems contains=juliaParBlock,juliaSqBraIdxBlock,juliaSqBraBlock,juliaCurBraBlock,juliaQuotedParBlock,juliaQuotedQMarkPar
syntax cluster juliaKeywordItems contains=juliaKeyword,juliaWhereKeyword,juliaImportLine,juliaInfixKeyword,juliaRepKeyword
syntax cluster juliaBlocksItems contains=juliaConditionalBlock,juliaWhileBlock,juliaForBlock,juliaBeginBlock,juliaFunctionBlock,juliaMacroBlock,juliaQuoteBlock,juliaTypeBlock,juliaImmutableBlock,juliaExceptionBlock,juliaLetBlock,juliaDoBlock,juliaModuleBlock,juliaStructBlock,juliaMutableStructBlock,juliaAbstractBlock,juliaPrimitiveBlock
syntax cluster juliaTypesItems contains=juliaBaseTypeBasic,juliaBaseTypeNum,juliaBaseTypeC,juliaBaseTypeError,juliaBaseTypeIter,juliaBaseTypeString,juliaBaseTypeArray,juliaBaseTypeDict,juliaBaseTypeSet,juliaBaseTypeIO,juliaBaseTypeProcess,juliaBaseTypeRange,juliaBaseTypeRegex,juliaBaseTypeFact,juliaBaseTypeFact,juliaBaseTypeSort,juliaBaseTypeRound,juliaBaseTypeSpecial,juliaBaseTypeRandom,juliaBaseTypeDisplay,juliaBaseTypeTime,juliaBaseTypeOther
syntax cluster juliaBlocksItems contains=juliaConditionalBlock,juliaWhileBlock,juliaForBlock,juliaBeginBlock,juliaFunctionBlock,juliaMacroBlock,juliaQuoteBlock,juliaExceptionBlock,juliaLetBlock,juliaDoBlock,juliaModuleBlock,juliaStructBlock,juliaMutableStructBlock,juliaAbstractBlock,juliaPrimitiveBlock
syntax cluster juliaTypesItems contains=juliaBaseTypeBasic,juliaBaseTypeNum,juliaBaseTypeC,juliaBaseTypeError,juliaBaseTypeIter,juliaBaseTypeString,juliaBaseTypeArray,juliaBaseTypeDict,juliaBaseTypeSet,juliaBaseTypeIO,juliaBaseTypeProcess,juliaBaseTypeRange,juliaBaseTypeRegex,juliaBaseTypeFact,juliaBaseTypeSort,juliaBaseTypeRound,juliaBaseTypeSpecial,juliaBaseTypeRandom,juliaBaseTypeDisplay,juliaBaseTypeTime,juliaBaseTypeOther
syntax cluster juliaConstItems contains=juliaConstNum,juliaConstBool,juliaConstEnv,juliaConstMMap,juliaConstC,juliaConstGeneric,juliaConstIO,juliaPossibleEuler
syntax cluster juliaConstItems contains=juliaConstNum,juliaConstBool,juliaConstEnv,juliaConstC,juliaConstGeneric,juliaConstIO,juliaPossibleEuler
syntax cluster juliaMacroItems contains=juliaPossibleMacro,juliaDollarVar,juliaDollarPar,juliaDollarSqBra
syntax cluster juliaSymbolItems contains=juliaPossibleSymbol
@@ -159,9 +160,9 @@ exec 'syntax match juliaStructR contained transparent "\%(\<\%(\%(mutable\s\+\
syntax match juliaKeyword display "\<\%(return\|local\|global\|const\)\>"
syntax match juliaInfixKeyword display "\%(=\s*\)\@<!\<\%(in\|isa\)\>\S\@!\%(\s*=\)\@!"
" The import/export/using keywords introduce a sort of special parsing
" The import/export/using/public keywords introduce a sort of special parsing
" environment with its own rules
exec 'syntax region juliaImportLine matchgroup=juliaKeyword excludenl start="\<\%(import\|using\|export\)\>" skip="\%(\%(\<\%(import\|using\|export\)\>\)\|^\)\@'.s:d(6).'<=$" end="$" end="\%([])}]\)\@=" contains=@juliaExpressions,juliaAsKeyword,@juliaContinuationItems,juliaMacroName'
exec 'syntax region juliaImportLine matchgroup=juliaKeyword excludenl start="\<\%(import\|using\|export\|public\)\>" skip="\%(\%(\<\%(import\|using\|export\|public\)\>\)\|^\)\@'.s:d(6).'<=$" end="$" end="\%([])}]\)\@=" contains=@juliaExpressions,juliaAsKeyword,@juliaContinuationItems,juliaMacroName'
syntax match juliaAsKeyword display contained "\<as\>"
syntax match juliaRepKeyword display "\<\%(break\|continue\)\>"
@@ -180,8 +181,9 @@ syntax region juliaLetBlock matchgroup=juliaBlKeyword start="\<let\>" end="\<e
syntax region juliaDoBlock matchgroup=juliaBlKeyword start="\<do\>" end="\<end\>" contains=@juliaExpressions fold
syntax region juliaModuleBlock matchgroup=juliaBlKeyword start="\<\%(bare\)\?module\>" end="\<end\>" contains=@juliaExpressions fold
syntax region juliaExceptionBlock matchgroup=juliaException start="\<try\>" end="\<end\>" contains=@juliaExpressions,juliaCatchBlock,juliaFinallyBlock fold
syntax region juliaCatchBlock matchgroup=juliaException transparent contained start="\<catch\>" end="\<end\>"me=s-1 contains=@juliaExpressions,juliaFinallyBlock
syntax region juliaFinallyBlock matchgroup=juliaException transparent contained start="\<finally\>" end="\<end\>"me=s-1 contains=@juliaExpressions
syntax region juliaCatchBlock matchgroup=juliaException transparent contained start="\<catch\>" end="\<end\>"me=s-1 contains=@juliaExpressions,juliaTryElseBlock,juliaFinallyBlock
syntax region juliaTryElseBlock matchgroup=juliaException transparent contained start="\<else\>" end="\<end\>"me=s-1 contains=@juliaExpressions,juliaFinallyBlock
syntax region juliaFinallyBlock matchgroup=juliaException transparent contained start="\<finally\>" end="\<end\>"me=s-1 contains=@juliaExpressions,juliaCatchBlock
syntax region juliaAbstractBlock matchgroup=juliaBlKeyword start="\<abstract\s\+type\>" end="\<end\>" fold contains=@juliaExpressions,juliaStructR
syntax region juliaPrimitiveBlock matchgroup=juliaBlKeyword start="\<primitive\s\+type\>" end="\<end\>" fold contains=@juliaExpressions,juliaStructR
@@ -247,11 +249,11 @@ let s:hex_regex = '0x\x\%(_\?\x\)*\%(\>\|im\>\|\ze\X\)'
let s:bin_regex = '0b[01]\%(_\?[01]\)*\%(\>\|im\>\|\ze[^01]\)'
let s:oct_regex = '0o\o\%(_\?\o\)*\%(\>\|im\>\|\ze\O\)'
let s:int_regex = '\%(' . s:hex_regex .
\ '\|' . s:bin_regex .
\ '\|' . s:oct_regex .
\ '\|' . s:dec_regex .
\ '\)'
let s:int_regex = '\%(' . s:hex_regex
\ . '\|' . s:bin_regex
\ . '\|' . s:oct_regex
\ . '\|' . s:dec_regex
\ . '\)'
"floating point regexes
" starting with a dot, optional exponent
@@ -267,12 +269,12 @@ let s:hexfloat_regex1 = '0x\.\%\(\x\%(_\?\x\)*\)\?[pP][-+]\?\d\+\%(\>\|im\>\|\ze
" starting with a digit
let s:hexfloat_regex2 = '0x\x\%(_\?\x\)*\%\(\.\%\(\x\%(_\?\x\)*\)\?\)\?[pP][-+]\?\d\+\%(\>\|im\>\|\ze\X\)'
let s:float_regex = '\%(' . s:float_regex3 .
\ '\|' . s:float_regex2 .
\ '\|' . s:float_regex1 .
\ '\|' . s:hexfloat_regex2 .
\ '\|' . s:hexfloat_regex1 .
\ '\)'
let s:float_regex = '\%(' . s:float_regex3
\ . '\|' . s:float_regex2
\ . '\|' . s:float_regex1
\ . '\|' . s:hexfloat_regex2
\ . '\|' . s:hexfloat_regex1
\ . '\)'
exec 'syntax match juliaNumber contained "' . s:int_regex . '" contains=juliaComplexUnit'
exec 'syntax match juliaFloat contained "' . s:float_regex . '" contains=juliaComplexUnit'
@@ -386,13 +388,13 @@ syntax keyword juliaTodo contained TODO FIXME XXX
" detect an end-of-line with only whitespace or comments before it
let s:eol = '\s*\%(\%(\%(#=\%(=#\@!\|[^=]\|\n\)\{-}=#\)\s*\)\+\)\?\%(#=\@!.*\)\?\n'
" a trailing comma, or colon, or an empty line in an import/using/export
" a trailing comma, or colon, or an empty line in an import/using/export/public
" multi-line command. Used to recognize the as keyword, and for indentation
" (this needs to take precedence over normal commas and colons, and comments)
syntax cluster juliaContinuationItems contains=juliaContinuationComma,juliaContinuationColon,juliaContinuationNone
exec 'syntax region juliaContinuationComma matchgroup=juliaComma contained start=",\ze'.s:eol.'" end="\n\+\ze." contains=@juliaCommentItems'
exec 'syntax region juliaContinuationColon matchgroup=juliaColon contained start=":\ze'.s:eol.'" end="\n\+\ze." contains=@juliaCommentItems'
exec 'syntax region juliaContinuationNone matchgroup=NONE contained start="\%(\<\%(import\|using\|export\)\>\|^\)\@'.s:d(6).'<=\ze'.s:eol.'" end="\n\+\ze." contains=@juliaCommentItems,juliaAsKeyword'
exec 'syntax region juliaContinuationNone matchgroup=NONE contained start="\%(\<\%(import\|using\|export\|public\)\>\|^\)\@'.s:d(6).'<=\ze'.s:eol.'" end="\n\+\ze." contains=@juliaCommentItems,juliaAsKeyword'
exec 'syntax match juliaMacroName contained "@' . s:idregex . '\%(\.' . s:idregex . '\)*"'
" the following are disabled by default, but

63
runtime/syntax/leex.vim Normal file
View File

@@ -0,0 +1,63 @@
" Vim syntax file
" Language: Leex (Erlang Lexical Analyzer Generator)
" Maintainer: Jon Parise <jon@indelible.org>
" Last Change: 2025 Nov 30
" Filenames: *.xrl
"
" References:
" - https://www.erlang.org/doc/apps/parsetools/leex.html
if exists('b:current_syntax')
finish
endif
syn include @leexErlang syntax/erlang.vim
unlet! b:current_syntax
syn match leexComment "%.*$" contains=@Spell display
syn match leexRegexOperator "[|*+?]" contained display
syn match leexRegexDelimiter "[()[\]]" contained display
syn match leexRegexSpecial "[.^$\\]" contained display
syn match leexRegexEscape '\\\%([bfnrtevsd]\|\o\{1,3}\|x\x\{2}\|x{\x\+}\|.\)' contained display
syn match leexRegexRange "\[[^\]]*\]" contains=leexRegexDelimiter,leexRegexEscape contained display
" Macro definitions: NAME = VALUE
syn match leexMacroName "^\s*\zs\h\w*\ze\s\+=\s\+" contained nextgroup=leexMacroEquals skipwhite display
syn match leexMacroEquals "=" contained nextgroup=leexMacroValue skipwhite display
syn match leexMacroValue "\S\+" contained contains=leexRegexOperator,leexRegexDelimiter,leexRegexSpecial,leexRegexEscape,leexRegexRange,leexMacroRef display
syn match leexMacroRef "{\h\w*}" contained display
" Rule definitions: <Regexp> : <Erlang code>.
syn match leexRuleRegex "^\s*\zs[^%].\{-}\ze\s\+:" contained contains=leexRegexOperator,leexRegexDelimiter,leexRegexSpecial,leexRegexEscape,leexRegexRange,leexMacroRef nextgroup=leexRuleColon skipwhite display
syn match leexRuleColon ":" contained nextgroup=leexRuleCode skipwhite skipnl display
syn region leexRuleCode start="" end="\.\s*\%(%.*\)\?$" skip="^\s*%.*$" contained contains=@leexErlang keepend skipnl skipwhite
" Sections
syn match leexHeading "^\%(Definitions\|Rules\|Erlang code\)\.$" contained display
syn region leexDefinitions start="^Definitions\.$" end="^[A-Z][A-Za-z ]*\.$"me=s-1 end="\%$" keepend fold
\ contains=leexHeading,leexComment,leexMacroName
syn region leexRules start="^Rules\.$" end="^[A-Z][A-Za-z ]*\.$"me=s-1 end="\%$" keepend fold
\ contains=leexHeading,leexComment,leexRuleRegex
syn region leexErlangCode start="^Erlang code\.$" end="^[A-Z][A-Za-z ]*\.$"me=s-1 end="\%$" keepend fold
\ contains=leexHeading,@leexErlang
hi def link leexComment Comment
hi def link leexHeading PreProc
hi def link leexRegexOperator Operator
hi def link leexRegexDelimiter Delimiter
hi def link leexRegexSpecial Special
hi def link leexRegexRange String
hi def link leexRegexEscape SpecialChar
hi def link leexMacroName Identifier
hi def link leexMacroEquals Operator
hi def link leexMacroValue String
hi def link leexMacroRef Macro
hi def link leexRuleColon Operator
syn sync fromstart
let b:current_syntax = 'leex'

View File

@@ -3,10 +3,10 @@
" Maintainer: Andis Sprinkis <andis@sprinkis.com>
" Former Maintainer: Cameron Wright
" URL: https://github.com/andis-sprinkis/lf-vim
" Last Change: 7 Sep 2025
" Last Change: 26 Oct 2025
"
" The shell syntax highlighting is configurable. See $VIMRUNTIME/doc/syntax.txt
" lf version: 38
" lf version: 39
if exists("b:current_syntax") | finish | endif
@@ -63,6 +63,7 @@ syn keyword lfOptions
\ cmd-menu-accept
\ cmd-menu-complete
\ cmd-menu-complete-back
\ cmd-menu-discard
\ cmd-right
\ cmd-transpose
\ cmd-transpose-word
@@ -148,6 +149,7 @@ syn keyword lfOptions
\ paste
\ period
\ pre-cd
\ preload
\ preserve
\ preview
\ previewer
@@ -162,6 +164,7 @@ syn keyword lfOptions
\ rename
\ reverse
\ roundbox
\ rulerfile
\ rulerfmt
\ scroll-down
\ scroll-up

View File

@@ -4,7 +4,7 @@ vim9script
# Language: Odin
# Maintainer: Maxim Kim <habamax@gmail.com>
# Website: https://github.com/habamax/vim-odin
# Last Change: 2025-03-28
# Last Change: 2025-12-06
if exists("b:current_syntax")
finish
@@ -53,12 +53,12 @@ syntax region odinAttribute
\ start="@\ze(" end="\ze)"
\ transparent oneline
syntax match odinInteger "\-\?\<\d\+\>" display
syntax match odinFloat "\-\?\<[0-9][0-9_]*\%(\.[0-9][0-9_]*\)\%([eE][+-]\=[0-9_]\+\)\=" display
syntax match odinHex "\<0[xX][0-9A-Fa-f]\+\>" display
syntax match odinDoz "\<0[zZ][0-9a-bA-B]\+\>" display
syntax match odinOct "\<0[oO][0-7]\+\>" display
syntax match odinBin "\<0[bB][01]\+\>" display
syntax match odinInteger "\v-?<[0-9]+%(_[0-9]+)*>" display
syntax match odinFloat "\v-?<[0-9]+%(_[0-9]+)*%(\.[0-9]+%(_[0-9]+)*)%([eE][+-]=[0-9]+%(_[0-9]+)*)=" display
syntax match odinHex "\v<0[xX][0-9A-Fa-f]+%(_[0-9A-Fa-f]+)*>" display
syntax match odinDoz "\v<0[zZ][0-9A-Ba-b]+%(_[0-9A-Ba-b]+)*>" display
syntax match odinOct "\v<0[oO][0-7]+%(_[0-7]+)*>" display
syntax match odinBin "\v<0[bB][01]+%(_[01]+)*>" display
syntax match odinAddressOf "&" display
syntax match odinDeref "\^" display

View File

@@ -3,6 +3,7 @@
" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
" Last Change: 2025 Sep 08
" 2025 Sep 25 by Vim Project: fix wrong type highlighting #18394
" 2025 Dec 03 by Vim Project: highlight t-strings #18679
" Credits: Neil Schemenauer <nas@python.ca>
" Dmitry Vasiliev
" Rob B
@@ -168,27 +169,29 @@ syn region pythonRawString matchgroup=pythonTripleQuotes
" Formatted string literals (f-strings)
" https://docs.python.org/3/reference/lexical_analysis.html#f-strings
" Template string literals (t-strings)
" https://docs.python.org/3/reference/lexical_analysis.html#template-string-literals
syn region pythonFString
\ matchgroup=pythonQuotes
\ start=+\cF\z(['"]\)+
\ start=+\c[FT]\z(['"]\)+
\ end="\z1"
\ skip="\\\\\|\\\z1"
\ contains=pythonFStringField,pythonFStringSkip,pythonEscape,pythonUnicodeEscape,@Spell
syn region pythonFString
\ matchgroup=pythonTripleQuotes
\ start=+\cF\z('''\|"""\)+
\ start=+\c[FT]\z('''\|"""\)+
\ end="\z1"
\ keepend
\ contains=pythonFStringField,pythonFStringSkip,pythonEscape,pythonUnicodeEscape,pythonSpaceError,pythonDoctest,@Spell
syn region pythonRawFString
\ matchgroup=pythonQuotes
\ start=+\c\%(FR\|RF\)\z(['"]\)+
\ start=+\c\%([FT]R\|R[FT]\)\z(['"]\)+
\ end="\z1"
\ skip="\\\\\|\\\z1"
\ contains=pythonFStringField,pythonFStringSkip,@Spell
syn region pythonRawFString
\ matchgroup=pythonTripleQuotes
\ start=+\c\%(FR\|RF\)\z('''\|"""\)+
\ start=+\c\%([FT]R\|R[FT]\)\z('''\|"""\)+
\ end="\z1"
\ keepend
\ contains=pythonFStringField,pythonFStringSkip,pythonSpaceError,pythonDoctest,@Spell

View File

@@ -3,7 +3,8 @@
" Filenames: *.sml *.sig
" Maintainer: Markus Mottl <markus.mottl@gmail.com>
" Previous Maintainer: Fabrizio Zeno Cornelli <zeno@filibusta.crema.unimi.it> (invalid)
" Last Change: 2025 Nov 07 - Update Number Regex
" Last Change: 2025 Nov 11 - Improve special constant matching (Doug Kearns)
" 2025 Nov 07 - Update Number Regex
" 2022 Apr 01
" 2015 Aug 31 - Fixed opening of modules (Ramana Kumar)
" 2006 Oct 23 - Fixed character highlighting bug (MM)
@@ -137,9 +138,25 @@ syn match smlConstructor "\u\(\w\|'\)*\>"
" Module prefix
syn match smlModPath "\u\(\w\|'\)*\."he=e-1
syn match smlCharacter +#"\\""\|#"."\|#"\\\d\d\d"+
syn match smlCharErr +#"\\\d\d"\|#"\\\d"+
syn region smlString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell
" Strings and Characters
syn match smlEscapeErr "\\." contained
syn match smlEscape "\\[abtnvfr"\\]" contained
syn match smlEscapeErr "\\^." contained
syn match smlEscape "\\^[@A-Z[\\\]^_]" contained
syn match smlEscapeErr "\\\d\{1,2}" contained
syn match smlEscape "\\\d\{3}" contained
syn match smlEscapeErr "\\u\x\{0,3}" contained
syn match smlEscape "\\u\x\{4}" contained
syn match smlEscape "\\\_[[:space:]]\+\\" contained
syn cluster smlEscape contains=smlEscape,smlEscapeErr
syn region smlString start=+"+ end=+"+ contains=@smlEscape,@Spell
syn match smlCharacter +#"[^\\"]"+
syn match smlCharacter +#"\\."+ contains=@smlEscape
syn match smlCharacter +#"\\^."+ contains=@smlEscape
syn match smlCharacter +#"\\\d\{3}"+ contains=@smlEscape
syn match smlCharacter +#"\\u\x\{4}"+ contains=@smlEscape
syn match smlFunDef "=>"
syn match smlRefAssign ":="
@@ -156,7 +173,8 @@ syn match smlNumber "\~\=\<\d\+\>"
syn match smlNumber "\~\=\<0x\x\+\>"
syn match smlWord "\<0w\d\+\>"
syn match smlWord "\<0wx\x\+\>"
syn match smlReal "\~\=\<\d\+\.\d\+\%([eE]\~\=\d\+\)\=\>"
syn match smlReal "\~\=\<\d\+\.\d\+\>"
syn match smlReal "\~\=\<\d\+\%(\.\d\+\)\=[eE]\~\=\d\+\>"
" Synchronization
syn sync minlines=20
@@ -181,7 +199,7 @@ hi def link smlCommentErr Error
hi def link smlEndErr Error
hi def link smlThenErr Error
hi def link smlCharErr Error
hi def link smlEscapeErr Error
hi def link smlComment Comment
@@ -213,6 +231,7 @@ hi def link smlNumber Number
hi def link smlWord Number
hi def link smlReal Float
hi def link smlString String
hi def link smlEscape Special
hi def link smlType Type
hi def link smlTodo Todo
hi def link smlEncl Keyword

View File

@@ -1,10 +1,9 @@
" Vim syntax file
" Language: sway config file
" Original Author: Josef Litos (JosefLitos/i3config.vim)
" Original Author: Josef Litos (litoj/i3config.vim)
" Maintainer: James Eapen <james.eapen@vai.org>
" Version: 1.2.4
" Last Change: 2024 Oct 17
" 2025 Sep 23 by Vim Project update swayconfig syntax #18293
" Version: 1.2.7
" Last Change: 2025-12-02
" References:
" http://i3wm.org/docs/userguide.html#configuring
@@ -22,6 +21,9 @@ syn cluster i3ConfigCommand contains=i3ConfigCommand,i3ConfigAction,i3ConfigActi
runtime! syntax/i3config.vim
" In sway, popup_during_fullscreen does not have options like all option.
syn cluster i3ConfigPopupFullscreenOpts remove=i3ConfigPopupFullscreenOptsExtra
" Sway extensions to i3
syn keyword i3ConfigActionKeyword opacity urgent shortcuts_inhibitor splitv splith splitt contained contained skipwhite nextgroup=i3ConfigOption
syn keyword i3ConfigOption set plus minus allow deny csd v h t contained contained skipwhite nextgroup=i3ConfigOption,@i3ConfigValue
@@ -37,6 +39,7 @@ syn region i3ConfigBindCombo matchgroup=i3ConfigParen start=/{$/ end=/^\s*}$/ co
" hack for blocks with start outside parsing range
syn region swayConfigBlockOrphan start=/^\s\+\(--[a-z-]\+ \)*\([$A-Z][$0-9A-Za-z_+]\+\|[a-z]\) [a-z[]/ skip=/\\$\|$\n^\s*}$/ end=/$/ contains=i3ConfigBindArgument,i3ConfigBindCombo,i3ConfigParen keepend extend
" Note: braces highlighted by @i3ConfigSh already
syn region i3ConfigExec start=/ {$/ end=/^\s*}$/ contained contains=i3ConfigExecAction,@i3ConfigSh,i3ConfigComment fold keepend extend
syn keyword swayConfigFloatingModifierOpts normal inverse none contained
@@ -45,6 +48,10 @@ syn match i3ConfigKeyword /floating_modifier \(none\|[$A-Z][0-9A-Za-z]\+ \(norma
syn match swayConfigI3Param /--i3/ contains=i3ConfigShParam skipwhite nextgroup=i3ConfigEdgeOpts
syn keyword i3ConfigKeyword hide_edge_borders contained skipwhite nextgroup=swayConfigI3Param,i3ConfigEdgeOpts
" accept bar ids in the form: bar <id> { ... }
syn match swayConfigBarIdent /[^{ ,;]\+/ contained contains=@i3ConfigStrVar skipwhite nextgroup=i3ConfigBarBlock
syn keyword i3ConfigKeyword bar contained skipwhite nextgroup=swayConfigBarIdent,i3ConfigBarBlock
syn keyword i3ConfigBarOpts swaybar_command contained skipwhite nextgroup=@i3ConfigSh
syn region i3ConfigBarOpts matchgroup=i3ConfigBarOpts start=/gaps/ end=/$/ contained contains=@i3ConfigNumVar
syn keyword i3ConfigBarOpts height pango_markup status_edge_padding status_padding wrap_scroll tray_bindcode tray_bindsym icon_theme contained skipwhite nextgroup=i3ConfigBarOptVals,@i3ConfigValue,i3ConfigShOper
@@ -62,8 +69,7 @@ syn keyword swayConfigInhibitOpts focus fullscreen open none visible contained
syn keyword i3ConfigActionKeyword inhibit_idle contained skipwhite nextgroup=swayConfigInhibitOpts
" Primary selection
" Allow tearing
syn keyword i3ConfigKeyword primary_selection allow_tearing contained skipwhite nextgroup=i3ConfigBoolean
syn keyword i3ConfigKeyword primary_selection contained skipwhite nextgroup=i3ConfigBoolean
" Swaybg command
" Swaynag command
@@ -109,43 +115,46 @@ syn match swayConfigInputAngle /\(3[0-5][0-9]\|[1-2]\?[0-9]\{1,2\}\)\(\.[0-9]\+\
syn keyword swayConfigInputOpts rotation_angle contained skipwhite nextgroup=swayConfigInputAngle
syn region swayConfigInput start=/\s/ skip=/\\$/ end=/\ze[,;]\|$/ contained contains=swayConfigInputOpts,@i3ConfigValue keepend
syn region swayConfigInput matchgroup=i3ConfigParen start=/ {$/ end=/^\s*}$/ contained contains=swayConfigInputOpts,@i3ConfigValue,i3ConfigComment keepend extend
syn keyword swayConfigInputType touchpad pointer keyboard touch tablet_tool tablet_pad switch contained nextgroup=swayConfigInput
syn match swayConfigInputIdent /type:!\?/ contained contains=swayConfigDeviceOper nextgroup=swayConfigInputType
syn match swayConfigInputIdent /[^t '"]\S*/ contained contains=i3ConfigOutputIdent nextgroup=swayConfigInput
syn region swayConfigInputIdent start=/['"]/ end=/\ze/ contained contains=i3ConfigOutputIdent nextgroup=swayConfigInput
syn keyword i3ConfigKeyword input contained skipwhite nextgroup=swayConfigInputIdent
syn region swayConfigInput matchgroup=i3ConfigParen start=/ {$/ end=/^\s*}$/ contained contains=swayConfigInputOpts,@i3ConfigValue,i3ConfigComment keepend
syn keyword swayConfigInputType touchpad pointer keyboard touch tablet_tool tablet_pad switch contained skipwhite nextgroup=swayConfigInput
syn match swayConfigInputTypeIdent /type:!\?/ contained contains=swayConfigDeviceOper skipwhite nextgroup=swayConfigInputType
syn match swayConfigInputIdent /[^t ,;][^ ,;]*/ contained contains=@i3ConfigStrVar skipwhite nextgroup=swayConfigInput extend
syn keyword i3ConfigKeyword input contained skipwhite nextgroup=swayConfigInputTypeIdent,swayConfigInputIdent
" Seat
syn keyword swayConfigSeatOpts cursor fallback hide_cursor keyboard_grouping shortcuts_inhibitor pointer_constraint xcursor_theme contained skipwhite nextgroup=swayConfigSeatOptVals,@i3ConfigValue
syn match swayConfigInputTypeSeq / \w\+/ contained contains=swayConfigInputType nextgroup=swayConfigInputTypeSeq,swayConfigSeatOpts
syn match swayConfigInputTypeSeq / \w\+/ contained contains=swayConfigInputType skipwhite nextgroup=swayConfigInputTypeSeq,swayConfigSeatOpts
syn keyword swayConfigSeatOpts idle_inhibit idle_wake contained nextgroup=swayConfigInputTypeSeq
syn keyword swayConfigSeatOpts attach contained skipwhite nextgroup=swayConfigSeatIdent
syn match swayConfigSeatOptVals /when-typing/ contained skipwhite nextgroup=swayConfigSeatOptVals
syn keyword swayConfigSeatOptVals move set press release none smart activate deactivate toggle escape enable disable contained skipwhite nextgroup=swayConfigSeatOpts
syn region swayConfigSeat start=/\s/ skip=/\\$/ end=/\ze[,;]\|$/ contained contains=swayConfigSeatOpts,@i3ConfigValue keepend
syn region swayConfigSeat matchgroup=i3ConfigParen start=/ {$/ end=/^\s*}$/ contained contains=swayConfigSeatOpts,@i3ConfigValue,i3ConfigComment keepend extend
syn match swayConfigSeatIdent /[^ ]\+/ contained contains=i3ConfigOutputIdent skipwhite nextgroup=swayConfigSeat
syn region swayConfigSeat matchgroup=i3ConfigParen start=/ {$/ end=/^\s*}$/ contained contains=swayConfigSeatOpts,@i3ConfigValue,i3ConfigComment keepend
syn match swayConfigSeatIdent /[^ ,;]\+/ contained contains=@i3ConfigStrVar nextgroup=swayConfigSeat extend
syn keyword i3ConfigKeyword seat contained skipwhite nextgroup=swayConfigSeatIdent
" Output monitors
syn keyword swayConfigOutputOpts mode resolution res modeline position pos scale scale_filter subpixel transform disable enable power dpms max_render_time adaptive_sync render_bit_depth color_profile allow_tearing contained skipwhite nextgroup=swayConfigOutputOptVals,@i3ConfigValue,swayConfigOutputMode
syn keyword swayConfigOutputOptVals linear nearest smart rgb bgr vrgb vbgr none clockwise anticlockwise toggle srgb icc contained skipwhite nextgroup=swayConfigOutputOptVals,@i3ConfigValue,i3ConfigShOper
syn keyword swayConfigOutputOpts mode resolution res modeline position pos scale scale_filter subpixel transform disable enable toggle power dpms max_render_time adaptive_sync render_bit_depth color_profile allow_tearing contained skipwhite nextgroup=swayConfigOutputOptVals,@i3ConfigValue,swayConfigOutputMode
syn keyword swayConfigOutputOptVals linear nearest smart rgb bgr vrgb vbgr none toggle srgb contained skipwhite nextgroup=swayConfigOutputOptVals,@i3ConfigValue
syn keyword swayConfigOutputBgVals solid_color fill stretch fit center tile contained skipwhite nextgroup=@i3ConfigColVar
syn match swayConfigOutputBg /[#$]\S\+ solid_color/ contained contains=@i3ConfigColVar,swayConfigOutputBgVals
syn match swayConfigOutputBg /[^b# '"]\S*/ contained contains=i3ConfigShOper skipwhite nextgroup=swayConfigOutputBgVals
syn region swayConfigOutputBg start=/['"]/ end=/\ze/ contained contains=@i3ConfigIdent skipwhite nextgroup=swayConfigOutputBgVals
syn match swayConfigOutputBg /[#$]\S\+ solid_color/ contained contains=@i3ConfigColVar,swayConfigOutputBgVals skipwhite nextgroup=swayConfigOutputOpts
syn match swayConfigOutputBg /[^b# ,;][^ ,;]*/ contained contains=@i3ConfigStrVar skipwhite nextgroup=swayConfigOutputBgVals extend
syn keyword swayConfigOutputOpts bg background contained skipwhite nextgroup=swayConfigOutputBg
syn match swayConfigOutputFPS /@[0-9.]\+Hz/ contained skipwhite nextgroup=swayConfigOutputOpts
syn match swayConfigOutputMode /\(--custom \)\?[0-9]\+x[0-9]\+/ contained contains=i3ConfigShParam skipwhite nextgroup=swayConfigOutputFPS,swayConfigOutputOpts
syn match swayConfigOutputOptVals /\(flipped-\)\?\(90\|180\|270\)\|flipped\|normal/ contained contains=i3ConfigNumber skipwhite nextgroup=swayConfigOutputOptsVals
" clockwise and anticlockwise are relative -> only as bindings / user actions - not in config setup
syn match swayConfigOutputOptVals /\(\(flipped-\)\?\(90\|180\|270\)\|flipped\|normal\)\( \(anti\)\?clockwise\)\?/ contained contains=i3ConfigNumber skipwhite nextgroup=swayConfigOutputOpts
syn match swayConfigOutputICCPath /\S\+/ contained contains=@i3ConfigStrVar skipwhite nextgroup=swayConfigOutputOpts extend
syn keyword swayConfigOutputOptVals icc contained skipwhite nextgroup=swayConfigOutputICCPath
syn region swayConfigOutput start=/\s/ skip=/\\$/ end=/\ze[,;]\|$/ contained contains=swayConfigOutputOpts,@i3ConfigValue keepend
syn region swayConfigOutput matchgroup=i3ConfigParen start=/ {$/ end=/^\s*}$/ contained contains=swayConfigOutputOpts,@i3ConfigValue,i3ConfigComment keepend extend
syn match swayConfigOutputIdent /[^ ]\+/ contained contains=i3ConfigOutputIdent skipwhite nextgroup=swayConfigOutput
syn region swayConfigOutput matchgroup=i3ConfigParen start=/ {$/ end=/^\s*}$/ contained contains=swayConfigOutputOpts,@i3ConfigValue,i3ConfigComment keepend
syn match swayConfigOutputIdent /[^ ,;]\+/ contained contains=@i3ConfigIdent skipwhite nextgroup=swayConfigOutput extend
syn keyword i3ConfigKeyword output contained skipwhite nextgroup=swayConfigOutputIdent
syn keyword i3ConfigActionKeyword output contained skipwhite nextgroup=swayConfigOutputIdent
" Define the highlighting.
hi def link swayConfigFloatingModifierOpts i3ConfigOption
hi def link swayConfigBarIdent i3ConfigIdent
hi def link swayConfigXOpt i3ConfigOption
hi def link swayConfigInhibitOpts i3ConfigOption
hi def link swayConfigBindswitchArgument i3ConfigBindArgument
@@ -156,7 +165,8 @@ hi def link swayConfigBindgestureType i3ConfigMoveType
hi def link swayConfigBindgestureDir i3ConfigMoveDir
hi def link swayConfigDeviceOper i3ConfigOperator
hi def link swayConfigInputType i3ConfigMoveType
hi def link swayConfigInputIdent i3ConfigMoveDir
hi def link swayConfigInputTypeIdent i3ConfigMoveDir
hi def link swayConfigInputIdent i3ConfigIdent
hi def link swayConfigInputOptVals i3ConfigShParam
hi def link swayConfigInputOpts i3ConfigOption
hi def link swayConfigInputAngle i3ConfigNumber
@@ -165,10 +175,14 @@ hi def link swayConfigXkbOptsPair i3ConfigShParam
hi def link swayConfigXkbLayout i3ConfigParamLine
hi def link swayConfigSeatOptVals swayConfigInputOptVals
hi def link swayConfigSeatOpts swayConfigInputOpts
hi def link swayConfigSeatIdent i3ConfigIdent
hi def link swayConfigOutputOptVals swayConfigInputOptVals
hi def link swayConfigOutputBgVals swayConfigInputOptVals
hi def link swayConfigOutputBg i3ConfigString
hi def link swayConfigOutputICCPath i3ConfigString
hi def link swayConfigOutputOpts swayConfigInputOpts
hi def link swayConfigOutputFPS Constant
hi def link swayConfigOutputMode i3ConfigNumber
hi def link swayConfigOutputIdent i3ConfigIdent
let b:current_syntax = "swayconfig"

View File

@@ -0,0 +1,20 @@
>-+0#0000e05#ffffff0@1| |I|s@1|u|e| |#|1|8|7@1|6| |(|a|l@1|o|w| |s|p|a|c|e|s| |i|n| |b|a|c|k|t|i|c|k|e|d| |o|p|e|r|a|t|o|r|s|)| +0#0000000&@20
@75
|m|a|i|n| |=+0#af5f00255&| +0#0000000&|p|r|i|n|t| |(|9+0#e000002&| +0#0000000&|`+0#af5f00255&| |d|i|v| |`| +0#0000000&|4+0#e000002&|)+0#0000000&| @48
@75
|~+0#4040ff13&| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
| +0#0000000&@56|1|,|1| @10|A|l@1|

View File

@@ -0,0 +1,20 @@
> +0&#ffffff0@74
@56|*+0#ffffff16&|d+0#e000002&|i|g|r|a|p|h|-|t|a|b|l|e|*+0#ffffff16&| +0#0000000&@3
|c+0#e000e06&|h|a|r| @1|d|i|g|r|a|p|h| @2|h|e|x| @4|d|e|c| @4|o|f@1|i|c|i|a|l| |n|a|m|e| +0#ffffff16&|~| +0#0000000&@27
|^|@| @5|N|U| @5|0|x|0@1| @5|0| @4|N|U|L@1| |(|N|U|L|)| @32
|^|A| @5|S|H| @5|0|x|0|1| @5|1| @4|S|T|A|R|T| |O|F| |H|E|A|D|I|N|G| |(|S|O|H|)| @20
|^|B| @5|S|X| @5|0|x|0|2| @5|2| @4|S|T|A|R|T| |O|F| |T|E|X|T| |(|S|T|X|)| @23
|^|C| @5|E|X| @5|0|x|0|3| @5|3| @4|E|N|D| |O|F| |T|E|X|T| |(|E|T|X|)| @25
|^|D| @5|E|T| @5|0|x|0|4| @5|4| @4|E|N|D| |O|F| |T|R|A|N|S|M|I|S@1|I|O|N| |(|E|O|T|)| @17
|^|E| @5|E|Q| @5|0|x|0|5| @5|5| @4|E|N|Q|U|I|R|Y| |(|E|N|Q|)| @29
|^|F| @5|A|K| @5|0|x|0|6| @5|6| @4|A|C|K|N|O|W|L|E|D|G|E| |(|A|C|K|)| @25
|^|G| @5|B|L| @5|0|x|0|7| @5|7| @4|B|E|L@1| |(|B|E|L|)| @32
|^|H| @5|B|S| @5|0|x|0|8| @5|8| @4|B|A|C|K|S|P|A|C|E| |(|B|S|)| @28
|^|I| @5|H|T| @5|0|x|0|9| @5|9| @4|C|H|A|R|A|C|T|E|R| |T|A|B|U|L|A|T|I|O|N| |(|H|T|)| @17
|Ñ| @6|N|?| @5|0|x|d|1| @3|2|0|9| @4|L|A|T|I|N| |C|A|P|I|T|A|L| |L|E|T@1|E|R| |N| |W|I|T|H| |T|I|L|D|E| @9
@75
|I|f| |y|o|u| |a|r|e| |u|s|i|n|g| |a| ||+0#ffffff16&|m+0#00e0e07&|u|l|t|i|b|y|t|e||+0#ffffff16&| +0#0000000&|'+0#00e0003&|e|n|c|o|d|i|n|g|'|,+0#0000000&| |V|i|m| |p|r|o|v|i|d|e|s| |t|h|i|s| |e|n|h|a|n|c|e|d| |s|e|t| |o
|f| @73
|a|d@1|i|t|i|o|n|a|l| |d|i|g|r|a|p|h|s|:| @54
@75
@57|1|,|0|-|1| @8|T|o|p|

View File

@@ -0,0 +1,20 @@
|Ñ+0&#ffffff0| @6|N|?| @5|0|x|d|1| @3|2|0|9| @4|L|A|T|I|N| |C|A|P|I|T|A|L| |L|E|T@1|E|R| |N| |W|I|T|H| |T|I|L|D|E| @9
@75
|I|f| |y|o|u| |a|r|e| |u|s|i|n|g| |a| ||+0#ffffff16&|m+0#00e0e07&|u|l|t|i|b|y|t|e||+0#ffffff16&| +0#0000000&|'+0#00e0003&|e|n|c|o|d|i|n|g|'|,+0#0000000&| |V|i|m| |p|r|o|v|i|d|e|s| |t|h|i|s| |e|n|h|a|n|c|e|d| |s|e|t| |o
|f| @73
|a|d@1|i|t|i|o|n|a|l| |d|i|g|r|a|p|h|s|:| @54
> @74
@56|*+0#ffffff16&|d+0#e000002&|i|g|r|a|p|h|-|t|a|b|l|e|-|m|b|y|t
|e|*+0#ffffff16&| +0#0000000&@72
|c|h|a|r| @1|d|i|g|r|a|p|h| @2|h|e|x| @4|d|e|c| @4|o|f@1|i|c|i|a|l| |n|a|m|e| @29
|Ā| @6|A|-| @5|0|1|0@1| @3|0|2|5|6| @3|L|A|T|I|N| |C|A|P|I|T|A|L| |L|E|T@1|E|R| |A| |W|I|T|H| |M|A|C|R|O|N| @8
|ā| @6|a|-| @5|0|1|0|1| @3|0|2|5|7| @3|L|A|T|I|N| |S|M|A|L@1| |L|E|T@1|E|R| |A| |W|I|T|H| |M|A|C|R|O|N| @10
|Ă| @6|A|(| @5|0|1|0|2| @3|0|2|5|8| @3|L|A|T|I|N| |C|A|P|I|T|A|L| |L|E|T@1|E|R| |A| |W|I|T|H| |B|R|E|V|E| @9
|ă| @6|a|(| @5|0|1|0|3| @3|0|2|5|9| @3|L|A|T|I|N| |S|M|A|L@1| |L|E|T@1|E|R| |A| |W|I|T|H| |B|R|E|V|E| @11
|Ą| @6|A|;| @5|0|1|0|4| @3|0|2|6|0| @3|L|A|T|I|N| |C|A|P|I|T|A|L| |L|E|T@1|E|R| |A| |W|I|T|H| |O|G|O|N|E|K| @8
|ą| @6|a|;| @5|0|1|0|5| @3|0|2|6|1| @3|L|A|T|I|N| |S|M|A|L@1| |L|E|T@1|E|R| |A| |W|I|T|H| |O|G|O|N|E|K| @10
|Ć| @6|C|'| @5|0|1|0|6| @3|0|2|6|2| @3|L|A|T|I|N| |C|A|P|I|T|A|L| |L|E|T@1|E|R| |C| |W|I|T|H| |A|C|U|T|E| @9
|ć| @6|c|'| @5|0|1|0|7| @3|0|2|6|3| @3|L|A|T|I|N| |S|M|A|L@1| |L|E|T@1|E|R| |C| |W|I|T|H| |A|C|U|T|E| @11
|Ĉ| @6|C|>| @5|0|1|0|8| @3|0|2|6|4| @3|L|A|T|I|N| |C|A|P|I|T|A|L| |L|E|T@1|E|R| |C| |W|I|T|H| |C|I|R|C|U|M|F|L|E|X| @4
|ĉ| @6|c|>| @5|0|1|0|9| @3|0|2|6|5| @3|L|A|T|I|N| |S|M|A|L@1| |L|E|T@1|E|R| |C| |W|I|T|H| |C|I|R|C|U|M|F|L|E|X| @6
@57|1|8|,|0|-|1| @7|8|6|%|

View File

@@ -0,0 +1,20 @@
|ĉ+0&#ffffff0| @6|c|>| @5|0|1|0|9| @3|0|2|6|5| @3|L|A|T|I|N| |S|M|A|L@1| |L|E|T@1|E|R| |C| |W|I|T|H| |C|I|R|C|U|M|F|L|E|X| @6
@75
@1>v|i|m|:|t|w|=|7|8|:|t|s|=|8|:|n|o|e|t|:|f|t|=|h|e|l|p|:|n|o|r|l|:| @40
|~+0#4040ff13&| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
| +0#0000000&@56|3|2|,|2| @9|B|o|t|

View File

@@ -0,0 +1,20 @@
>%+0#0000e05#ffffff0| |H|e|a|d|e|r| |c|o|m@1|e|n|t| +0#0000000&@58
|%+0#0000e05&@1| |H|e|a|d|e|r| |c|o|m@1|e|n|t| +0#0000000&@57
|%+0#0000e05&@2| |H|e|a|d|e|r| |c|o|m@1|e|n|t| +0#0000000&@56
@75
|D+0#e000e06&|e|f|i|n|i|t|i|o|n|s|.| +0#0000000&@62
|f+0#00e0e07&|l|o|a|t|s| +0#0000000&@1|=+0#af5f00255&| +0#0000000&|(+0#e000e06&|\|+||+0#af5f00255&|-+0#e000002&|)+0#e000e06&|?+0#af5f00255&|[+0#e000e06&|0+0#e000002&|-|9|]+0#e000e06&|++0#af5f00255&|\+0#e000e06&|.|[|0+0#e000002&|-|9|]+0#e000e06&|++0#af5f00255&|(+0#e000e06&@1|E+0#e000002&||+0#af5f00255&|e+0#e000002&|)+0#e000e06&|(|\|+||+0#af5f00255&|-+0#e000002&|)+0#e000e06&|?+0#af5f00255&|[+0#e000e06&|0+0#e000002&|-|9|]+0#e000e06&|++0#af5f00255&|)+0#e000e06&|?+0#af5f00255&| +0#0000000&@22
|D+0#00e0e07&| +0#0000000&@6|=+0#af5f00255&| +0#0000000&|[+0#e000e06&|0+0#e000002&|-|9|]+0#e000e06&| +0#0000000&@59
|A+0#00e0e07&| +0#0000000&@6|=+0#af5f00255&| +0#0000000&|(+0#e000e06&|{|D|}||+0#af5f00255&|_+0#e000002&||+0#af5f00255&|@+0#e000002&|)+0#e000e06&| +0#0000000&@55
|W+0#00e0e07&|S| +0#0000000&@5|=+0#af5f00255&| +0#0000000&|(+0#e000e06&|[|\|0@2|-+0#e000002&|\+0#e000e06&|s|]||+0#af5f00255&|%+0#e000002&|.+0#e000e06&|*+0#af5f00255&|)+0#e000e06&| +0#0000000&|%+0#0000e05&| |w|h|i|t|e|s|p|a|c|e| +0#0000000&@36
@75
|R+0#e000e06&|u|l|e|s|.| +0#0000000&@68
|{+0#e000e06&|D|}|++0#af5f00255&| +0#0000000&|:+0#af5f00255&| +0#0000000&@68
@2|%+0#0000e05&| |C|o|m@1|e|n|t| +0#0000000&@63
@2|{+0#e000e06&|t+0#e000002&|o|k|e|n|,+0#0000000&|{+0#e000e06&|i+0#e000002&|n|t|e|g|e|r|,+0#0000000&|T+0#00e0e07&|o|k|e|n|L|i|n|e|,+0#0000000&|l+0#00e0e07&|i|s|t|_|t|o|_|i|n|t|e|g|e|r|(+0#0000000&|T+0#00e0e07&|o|k|e|n|C|h|a|r|s|)+0#0000000&|}+0#e000e06&@1|.+0#0000000&| @16
|{+0#e000e06&|D|}|++0#af5f00255&|\+0#e000e06&|.|{|D|}|++0#af5f00255&|(+0#e000e06&@1|E+0#0000000&||+0#af5f00255&|e+0#0000000&|)+0#e000e06&|(|\|+||+0#af5f00255&|\+0#e000e06&|-|)|?+0#af5f00255&|{+0#e000e06&|D|}|++0#af5f00255&|)+0#e000e06&|?+0#af5f00255&| +0#0000000&|:+0#af5f00255&| +0#0000000&@42
@2|%+0#0000e05&| |C|o|m|e|n|t| |w|i|t|h| |p|e|r|i|o|d|.| +0#0000000&@51
@2|{+0#e000e06&|t+0#e000002&|o|k|e|n|,+0#0000000&|{+0#e000e06&|f+0#e000002&|l|o|a|t|,+0#0000000&|T+0#00e0e07&|o|k|e|n|L|i|n|e|,+0#0000000&|l+0#00e0e07&|i|s|t|_|t|o|_|f|l|o|a|t|(+0#0000000&|T+0#00e0e07&|o|k|e|n|C|h|a|r|s|)+0#0000000&|}+0#e000e06&@1|.+0#0000000&| @20
|{+0#e000e06&|A|}| +0#0000000&|:+0#af5f00255&| +0#0000000&@1|E+0#00e0e07&|r|l|a|n|g|C|o|d|e|.+0#0000000&| |%+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@46
|{+0#e000e06&|W|S|}| +0#0000000&|:+0#af5f00255&| +0#0000000&|E+0#00e0e07&|r|l|a|n|g|C|o|d|e|.+0#0000000&| @56
@57|1|,|1| @10|T|o|p|

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