Compare commits

...

103 Commits

Author SHA1 Message Date
zeertzjq
d8558fdf4f patch 9.1.2066: :wqall! doesn't close a terminal like :qall! does
Problem:  :wqall! doesn't close a terminal buffer like :qall! does
          (after 8.0.1525).
Solution: Check eap->forceit (zeertzjq).

Ref: https://github.com/vim/vim/issues/2654#issuecomment-366803932

related: #2654
related: neovim/neovim#14061
closes:  #19129

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-08 20:23:05 +00:00
Muraoka Taro
7d632a0a77 patch 9.1.2065: GvimExt cannot be linked statically using MinGW
Problem:  When building GvimExt with MinGW, some DLLs are still linked
          even if STATIC_STDCPLUS=yes is set.
Solution: Following the Vim core, make some libraries explicitly
          statically linked.  The order of libraries is important, and
          gcc_eh must be placed before winpthread (Muraoka Taro)

closes: #19131

Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-08 20:12:58 +00:00
zeertzjq
aa58f1fe44 CI: build failure in if_perl.xs
Problem:  CI: build failure in if_perl.xs.
Solution: Add -Wno-strict-prototypes to PERL_CFLAGS_EXTRA
          (zeertzjq).

closes: #19132

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-08 20:10:09 +00:00
Cezar Dimoiu
9179ddc060 runtime(yaml): update YAML indentation for mapping keys inside list items
When a list item contains a mapping key (e.g., '- element1:'), the
content under that key was incorrectly indented. The indent function
was not accounting for the '- ' prefix when calculating indentation
for nested content.

Example that now works correctly:
  list:
    - element1:
        foo: bar  # Now correctly at indent 6, not 4

The fix adds special handling in two places:
1. When previous line ends with ':' and starts with '- '
2. When looking up previous mapping key that is a list item

Fixes indentation to account for the 2-character '- ' prefix.

fixes:  #18943
closes: #19133

Signed-off-by: Cezar Dimoiu <cezar.dimoiu@keysight.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-08 20:07:18 +00:00
Girish Palya
4895ae8c0c patch 9.1.2064: completion: segfault during file name completion
Problem:  completion: segfault during file name completion
Solution: Initialize compl_num_bests (Girish Palya)

closes: #19134

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-08 19:56:40 +00:00
Christian Brabandt
0084e4bd16 gitattributes: mark test21.ok binary, drop test42.in
This change does 2 things:
1) Mark src/testdir/test21.ok as binary by git.

After 0ed8ba3079, test21.ok was treated by Git as a text file
using LF line endings. However, the test explicitly checks handling of
files with mixed line endings, so it must retain its literal LF and CR
endings and must not be modified by Git. Therefore, mark it explicitly
as binary.

2) Remove src/testdir/test42.in

This test was converted to the new-style test in v8.2.1316 and was
therefore deleted. There is no need to keep gitattributes rules for a
non-existing file.

related: #19086

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-08 19:51:53 +00:00
Phạm Bình An
536ee91189 runtime(doc): add termdebug tag, remove term "floating window"
Problem:
- When I type `:h termdebug`, I will expect to see the introduction of
  the termdebug plugin. But instead, it shows me document of
  `termdebug_wide`, and I have to scroll up quite much to find the
  introduction.
- `:h popup` says `floating-window`? Why? As I have tried both features
  (of Vim and Neovim), I think they are _very different_ things, even
  more different than job features in Vim and Neovim.

Solution:
- In `:h terminal.txt`, add tag `*termdebug*` to the introduction of
  termdebug plugin.
- In `:h popup.txt`, "floating window" -> "popup window".

closes: #19135

Signed-off-by: Phạm Bình An <phambinhanctb2004@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-08 19:35:38 +00:00
Christian Brabandt
4ba3dadd68 runtime(sqloracle): Update syntax script
closes: #19111

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-07 21:56:03 +00:00
Christian Brabandt
5eb10c5359 runtime(xml): update XML runtime files
closes: #19112

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-07 21:54:51 +00:00
Christian Brabandt
c45e16a939 runtime(zsh): Update runtime files
closes: #19113

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-07 21:53:13 +00:00
Doug Kearns
46cc91ecbf runtime(privoxy): Update syntax file
Update to version 4.1.0.

closes: #19115

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-07 21:52:21 +00:00
zeertzjq
5e37e31496 runtime(tutor): fix wrong motion in instruction
related: neovim/neovim#37213
closes: #19117

Co-authored-by: DrNayak2306 <dhruvgnk.work@gmail.com>
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-07 21:50:37 +00:00
zeertzjq
da1c431309 patch 9.1.2063: A few typos in the code and runtime files
Problem:  A few typos in the code and runtime files
Solution: Fix those (zeertzjq).

closes: #19119

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-07 21:33:28 +00:00
Doug Kearns
e7bb907c24 runtime(wget): Update syntax files
Update to versions Wget 1.25.0 and Wget2 2.2.1.

closes: #19122

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-07 20:34:19 +00:00
Yegappan Lakshmanan
08953f7113 runtime(doc): Minor updates to version9.txt
closes: #19124

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-07 20:32:22 +00:00
Christian Brabandt
6c30628392 runtime(cpp): Announce syntax file adoption
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-06 15:55:37 +00:00
Hoang Nguyen
8d0fcff002 patch 9.1.2062: filetype: djot files are not recognized
Problem:  filetype: djot files are not recognized
Solution: Detect *.dj and *.djot files as djot filetype
          (Hoang Nguyen).

Reference:
- https://djot.net/

closes: #19105

Signed-off-by: Hoang Nguyen <folliekazetani@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-06 15:00:15 +00:00
Hoang Nguyen
969a4a0ba5 patch 9.1.2061: filetype: Koka files are not recognized
Problem:  filetype: Koka files are not recognized
Solution: Detect *.kk files as koka filetype (Hoang Nguyen).

Reference:
- https://koka-lang.github.io/koka/doc/index.html

closes: #19104

Signed-off-by: Hoang Nguyen <folliekazetani@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-06 14:56:00 +00:00
Hoang Nguyen
b084b8f1db patch 9.1.2060: filetype: Rasi include files are not recognized
Problem:  filetype: Rasi include files are not recognized
Solution: Detect *.rasinc as rasi filetype (Hoang Nguyen)

Reference:
- https://github.com/davatorium/rofi/blob/next/doc/rofi-theme.5.markdown#file-extension

closes: #19103

Signed-off-by: Hoang Nguyen <folliekazetani@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-06 14:52:13 +00:00
Hoang Nguyen
88f3ac34ea patch 9.1.2059: filetype: Nickel files are not recognized
Problem:  filetype: Nickel files are not recognized
Solution: Detect *.ncl files as nickel filetype
          (Hoang Nguyen)

Reference:
- https://nickel-lang.org/getting-started/
- https://github.com/tweag/nickel/tree/master/examples

closes: #19102

Signed-off-by: Hoang Nguyen <folliekazetani@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-06 14:49:51 +00:00
Sean Dewar
ac5c8ab6cc patch 9.1.2058: b_locked_split is not checked for :sbuffer
Problem:  b_locked_split is not checked for :sbuffer, which allows
          autocommands to leave windows open to freed buffers.
Solution: In do_buffer_ext, check just before possibly splitting, after
          handling 'switchbuf'. Leave win_split to handle the check for
          curbuf. (needed even if curbuf is not the target, as setting
          the buffer after splitting may fail) (Sean Dewar)

closes: #19096

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-06 11:58:44 +00:00
Foxe Chen
4157787be8 patch 9.1.2057: copying to clipboard register broken with 'go-P'
Problem:  Copying to clipboard register broken with 'go-P'
          (Coacher)
Solution: Verify that clip_plus is available (Foxe Chen).

fixes:  #19072
closes: #19097

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-06 11:54:40 +00:00
zeertzjq
254f844dda patch 9.1.2056: tests: inconsistent indent and line breaking in Test_maparg()
Problem:  tests: inconsistent indent and line breaking in Test_maparg().
Solution: Consistently use spaces-only indent. Reorder fields to group
          similar ones together and break lines at consistent positions.
          Remove a mapping when it is no longer used (zeertzjq).

closes: #19099

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-06 11:22:42 +00:00
RestorerZ
d5560fd395 translation(ru): Updated message file
closes: #19093

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-06 11:19:44 +00:00
RestorerZ
416d1a5e28 translation(ru): added a disclaimer to the license translation
closes: #19092

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-06 11:17:35 +00:00
RestorerZ
a735e44b3c translation(ru): updated menu files according to the patch 9.1.1989
closes: #19091

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-06 11:16:11 +00:00
RestorerZ
3ac486b8a6 translation(ru): updated tutor files
closes: #19090

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-06 11:14:57 +00:00
zeertzjq
1aa5ca4ecb patch 9.1.2055: Division by zero in :file after failing to wipe buffer
Problem:  Division by zero in :file after failing to wipe buffer
          (after 8.2.4631).
Solution: Still call buf_clear_file() when failing to wipe buffer
          (zeertzjq).

closes: #19088

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-06 11:11:16 +00:00
Muraoka Taro
0ed8ba3079 Always force LF line endings in old test .ok files
Problem: When running tests on a source tree checked out with git for
Windows, the old tests fail.

The Git for Windows installer installs git with core.autocrlf=true by
default. If you check out, build, and run tests using such a git, the
old test .ok files will likely fail because they use CRLF line endings.
Tests on Windows assume that .ok files use LF line endings, and
appropriately convert the line endings of related files.  This
assumption breaks down when .ok files use CRLF.

Solution: Force LF line endings for old test .ok files in the
.gitattributes file.  Related to that, we've stopped explicitly
specifying line endings when checking out in CI, since this is no longer
necessary.

While at it, also fix a typo in the comment of the gitattributes file.

closes: #19086

Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-06 10:36:03 +00:00
Neila
77a59be594 runtime(cangjie): Update syntax script
This commit updates `syntax/cangjie.vim` to match the latest `std.core`
library:

New Features:
* Documentation: Added highlighting for documentation keywords (e.g., `@param`, `@return`).
* Standard Library: Added highlighting for `std.core` functions, interfaces, and classes.
* Exceptions: Added highlighting for standard exception types.
* FFI Support: Added highlighting for C interoperability types (e.g., `CPointer`).

Improvements:
* Configuration: Added a unified switch (`s:enabled('builtin')`) for standard library highlighting.
* Type System: Updated `Int` and `UInt` aliases.
* Interpolation: Enabled standard library highlighting inside string interpolation.
* Cleanup: Removed non-core types like `ArrayList` and `HashMap`.

closes: #19085

Signed-off-by: Neila <wu.junkai@qq.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-06 10:18:09 +00:00
Yegappan Lakshmanan
eb577f9206 patch 9.1.2054: Can't unpack tuple from imported function
Problem:  Can't unpack tuple from imported function
          (Mao-Yining)
Solution: Support multi-variable assignment from a tuple returned by an
          imported function (Yegappan Lakshmanan)

fixes:  #19080
closes: #19083

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-06 10:13:02 +00:00
Muraoka Taro
2a3b608355 patch 9.1.2053: MS-Windows: May use wrong find command
Problem:  If another find.exe derived from findutils is installed on
          Windows, unintended behavior will occur. If MSYS2 is installed and
          prioritized over the system path, then find.exe derived from
          findutils will be launched during build, resulting in an
          unintended warning message.
Solution: Specify the absolute path including SYSTEMROOT to launch
          find.exe (Muraoka Taro)

closes: #19081

Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-06 10:04:59 +00:00
Matthias Rader
a5b19603e4 patch 9.1.2052: Compile error when disabling linebreak feature
Problem:  Compile error when disabling linebreak feature
Solution: Adjust ifdefs (Matthias Rader)

When compiling with all features except for linebreak, there were some
compiler errors. By slightly modifying some preprocessor conditions,
compiling without the linebreak feature should work as expected.

closes: #19068

Signed-off-by: Matthias Rader <matthias.rader@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-06 09:58:04 +00:00
Muraoka Taro
679c2c01fa patch 9.1.2051: tests: fix Test_cd_completion fails in Appveyor
Problem:  Test_cd_completion test fails in Appveyor. In Appveyor, a path
          containing spaces was selected as the test target. But the
          comparison failed because spaces were not taken into account
          (after v9.1.2050)
Solution: Escape spaces in paths for comparison (Muraoka Taro)

closes: #19087

Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-05 08:13:18 +00:00
Muraoka Taro
6625ba359e patch 9.1.2050: tests: Test_cd_completion may fail
Problem:  tests: Test_cd_completion() may fail depending on the contents
          of the root directory of the current drive on Windows.
          readdir() may return a directory that cannot "cd" to, causing
          this test to fail. An example of such a directory is
          "System Volume Information" which only admin can "cd" to.
Solution: When determining the directory to use for testing, use the
          directory that we actually "cd" to successfully.
          In addition, directories with '$' in their names are also
          excluded, as they are considered environment variables during
          completion and do not work as expected.
          Example: "$RECYCLE.BIN" (Muraoka Taro).

closes: #19078

Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-03 23:47:27 +00:00
Hirohito Higashi
4a9967bddf patch 9.1.2049: Vim9: unexpected E1209 error
Problem:  Vim9: unexpected E1209 error
Solution: Fix error message (Hirohito Higashi)

closes: #19067

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-03 17:16:23 +00:00
Muraoka Taro
997952a512 patch 9.1.2048: MS-Windows: backspace behavior wrong with ConPTY
Problem:  Pressing backspace in ConPTY on Windows deletes an entire
          word, not just a single character. This is the same as
          pressing Alt + backspace in cmd.exe.
Solution: When using ConPTY on Windows, the `VTERM_KEY_BACKSPACE` key is
          now sent when the Backspace key or Ctrl+H is detected.
          (Muraoka Taro)

Historically, Windows has assigned the code 0x7F (DEL) to backspace, and
it seems necessary to follow that behavior when using ConPTY.

closes: #19065

Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-03 17:06:03 +00:00
Mao-Yining
bfd4f75b5a patch 9.1.2047: MS-Windows: style issue in gui_w32.c
Problem:  MS-Windows: style issue in gui_w32.c
Solution: Fix indentation, drop unnecessary braces
          (Mao-Yining)

closes: #19073

Signed-off-by: Mao-Yining <101858210+mao-yining@users.noreply.github.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-03 17:00:09 +00:00
Mao-Yining
8be4610588 patch 9.1.2046: MS-Windows: compile warnings
Problem:  MS-Windows: compile warnings in os_win32.c,
          acp_to_enc() requires char_u* but others require char*
          (John Marriott, after v9.1.2013)
Solution: Cast the variables (Mao-Yining)

closes: #19074

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-03 16:51:47 +00:00
Larson, Eric
93eb081eee runtime(doc): Clarify visual mark behavior in getpos(), setpos()
Add documentation notes explaining that visual marks '< and '> have
different behaviors in getpos() and setpos().

Also fix a small typo.

closes: #19070

Signed-off-by: Larson, Eric <numeric.larson@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-03 16:46:59 +00:00
Christian Brabandt
57352b279d runtime: mention subscription only ml, fix typo in maintainer email
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-03 16:29:07 +00:00
Muraoka Taro
0115da33b4 CI: Missing test of Vim with ConPTY on Windows
Problem:  Current CI Windows testing does not test Vim using ConPTY.

Solution: Added a configuration to enable ConPTY to the Windows matrix.
          This configuration suppresses the installation of winpty,
          allowing testing with ConPTY.

Since the fixes made at the end of last year, all tests now pass when
using ConPTY, just like when using winpty. ConPTY itself is stable on
recent versions of Windows, so there are no longer any reasons not to
test it.

closes: #19066

Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-03 11:08:26 +00:00
Antonio Giovanni Colombo
5beb6b58c9 translation(it): Update Italian translation
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-02 14:29:17 +00:00
Christian Brabandt
bc12a938d9 patch 9.1.2045: Mac: Build failure with Mac OS X 10.6
Problem:  Mac: Build failure with Mac OS X 10.6
          (Sergey Fedorov, after: v9.1.1748)
Solution: Add ifdefs MAC_OS_X_VERSION_10_7 around the code that sets the
          scheduler priority.

fixes:   #19044
related: #18120
closes:  #19054

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-02 14:24:42 +00:00
John Marriott
a7e671fbb9 patch 9.1.2044: Inefficient use of ga_concat()
Problem:  Inefficient use of ga_concat()
Solution: Use ga_concat_len() when the length is already known to avoid
          use of strlen() (John Marriott).

Additionally the following changes are done:
os_unix.c:
- in function `socket_server_list_sockets()` use a `string_T` for the
  strings `buf` and `path` for use in `ga_concat_len()`
  and drop un-needed variable `dir`.

quickfix.c:
- in function `qf_jump_print_msg()` use a `string_T` for the string
  `IObuff` for use in `ga_concat_len()`.
- in function `qf_range_text()` use a `string_T` for the string `buf`
  for use in `ga_concat_len()`.

register.c:
- simplify function `execreg_line_continuation()`.

terminal.c:
- in function `read_dump_file()` use a `string_T` for the
  string `prev_char` for use in `ga_concat_len()`.

tuple.c:
- in function `tuple_join_inner()` use a `string_T` for the
  string `s` for use in `ga_concat_len()`. Also, change local struct
  `join_T` to use `string_T`.

vim9type.c:
- in functions `type_name_tuple()` and `type_name_func()`
  use a `string_T` for the string `arg_type` for use in
  `ga_concat_len()`.

closes: #19038

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-02 14:11:58 +00:00
Chris Dragan
96a1caac6b patch 9.1.2043: filetype: kos files are not reconized
Problem:  filetype: kos files are not reconized
Solution: Detect *.kos files as kos filetype
          (Chris Dragan)

Reference:
- https://github.com/kos-lang/kos

closes: #19056

Signed-off-by: Chris Dragan <chris@dragan.dev>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-02 14:06:55 +00:00
Ac5000
0f93c988e9 patch 9.1.2042: filetype: systemd quadlet files are not recognized
Problem:  filetype: systemd quadlet files are not recognized
Solution: Detect additional patterns as systemd filetype
          (Ac5000)

Reference:
- https://docs.podman.io/en/latest/markdown/podman.1.html
- https://docs.podman.io/en/latest/markdown/podman-systemd.unit.5.html
- https://docs.podman.io/en/latest/markdown/podman-quadlet.1.html

fixes:  #15078
closes: #19057

Signed-off-by: Ac5000 <15003210+Ac5000@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-02 13:58:30 +00:00
Christian Brabandt
7f5c60b31e patch 9.1.2041: tests: test_menu.vim leaves swapfiles behind
Problem:  tests: test_menu.vim leaves swapfiles behind
Solution: Close open buffers using :bw! instead of :close!

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-02 13:49:18 +00:00
Doug Kearns
19442ad118 patch 9.1.2040: :tlunmenu incorrectly accepts a range
Problem:  :tlnumenu incorrectly accepts a range.
Solution: Remove EX_RANGE and EX_ZEROR from the command definition and
          use ADDR_NONE (Doug Kearns).

closes: #19055

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-02 13:45:46 +00:00
Paulo Moura
cc71684ab0 runtime(logtalk): Update Logtalk runtime files for the latest language spec
closes: #19058

Signed-off-by: Paulo Moura <pmoura@logtalk.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-02 13:42:57 +00:00
Yee Cheng Chin
871d2cc2ef patch 9.1.2039: if_ruby: crash when using Ruby/dyn 4.0
Problem:  if_ruby: crash when using Ruby/dyn 4.0
          (after v9.1.2036)
Solution: Fix Ruby 4.0 dynamic builds correctly by inlining
          rb_check_typeddata (Yee Cheng Chin)

Ruby 4.0 broke Vim compilation in dynamic builds. That's because the
function `rb_check_typeddata` is now used in an inline function defined
in Ruby headers, which causes it to link against the lib statically
rather than using the one we load in dynamically
(`dll_rb_check_typeddata`) as we only remap it later (after the Ruby
header include).

A previous fix (v9.1.2036) did a wrong fix by stubbing in the actual
inline function `rbimpl_check_typeddata` instead. This does not work
because the inline function is not part of the dynamic lib and therefore
it's not possible to load it in dynamically (the patch also did not
actually attempt to load in the stub). With that patch, Vim would
crash when this function is used as the function pointer is null.

Fix this properly by reverting the previous change, and simply stub
`rb_check_typeddata` using similar mechanisms the file had already set
up for similar situations.

fixes:   #18884
related: #19051
closes:  #19060

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-01 16:25:10 +00:00
Christian Brabandt
4fe7301df9 patch 9.1.2038: tests: test_marks.vim leaves swapfiles behind
Problem:  tests: test_marks.vim leaves swapfiles behind
Solution: Close open buffers using :bw! instead of :close!

closes: #19061

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-01 16:20:08 +00:00
Christian Brabandt
62d8f3dab5 runtime: Revert several "mark invalid contact addresses" commits
This reverts commits:
- 6b652a7850
- 2f689d5abd
- a025a46d41

Several email addresses that are known to be valid caused bounces
due to an issue with my email setup. The previous commits incorrectly
marked these addresses as invalid. So revert the whole thing again.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-01 15:14:14 +00:00
altermo
a722da29c1 patch 9.1.2037: undo: cursor position not correctly restored
Problem:  undo: cursor position not correctly restored
Solution: Do not override the saved cursor position (altermo)

closes: #19052

Signed-off-by: altermo <107814000+altermo@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-01 14:32:50 +00:00
EnumDev
eea85983cb patch 9.1.2036: if_ruby: build error with ruby 4.0
Problem:  if_ruby: build error with ruby 4.0
          (Mamoru Tasaka)
Solution: Always define rb_check_typeddata (EnumDev).

fixes:  #18884
closes: #19051

Signed-off-by: EnumDev <enumdev@enumerated.dev>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-01-01 14:25:38 +00:00
Christian Brabandt
a025a46d41 runtime: mark more invalid email addresses
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-31 17:18:13 +00:00
Christian Brabandt
2f689d5abd runtime: mark more invalid email addresses
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-31 16:38:08 +00:00
Christian Brabandt
6b652a7850 runtime: mark invalid contact addresses
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-31 12:03:36 +00:00
Christian Brabandt
ea189a6f4d patch 9.1.2035: filetype: filetype: Fennel fnlm files are not recognized
Problem:  filetype: Fennel fnlm files are not recognized
          (Alexei Mozaidze, after v9.1.2034)
Solution: Detect *.fnlm files as fennel filetype, revert detecting
          *.fnml files

related: #19047

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-31 11:52:34 +00:00
Christian Brabandt
9c87af5c3c patch 9.1.2034: filetype: Fennel fnml files are not recognized
Problem:  filetype: Fennel fnml files are not recognized
          (Alexei Mozaidze)
Solution: Detect *.fnml files as fennel filetype

Reference:
- https://fennel-lang.org/changelog#160--2025-10-13

fixes: #19047

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-31 09:57:09 +00:00
Muraoka Taro
9d71fdaf3a patch 9.1.2033: tests: Test_terminal_cwd flaky when using ConPTY
Problem:  tests: Test_terminal_cwd in test_terminal.vim fails flaky
          in the Windows ConPTY terminal.
Solution: In ConPTY, the timeout is extended to 1msec when reading a
          channel associated with a job that is about to finish.  This
          allows Vim to read the last output of a process in a pseudo
          console. Add comments to make the reasoning clear.
          (Muraoka Taro)

Processes that terminate too quickly in the ConPTY terminal cause Vim to
miss their final output.

In my environment, the probability of the "cmd /D /c cd" used in
Test_terminal_cwd occurring is about 1/4.  For a simple statically
linked Hello World, the probability of it occurring is about 3/4.

closes: #19036

Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-31 09:42:02 +00:00
Foxe Chen
83fc7c4d8e patch 9.1.2032: Vim9: error when using class member in Lambda
Problem:  Vim9: error when using class member in Lambda
Solution: Compare against uf_defclass variable
          (Foxe Chen)

closes: #19041

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-31 09:30:51 +00:00
Mao-Yining
10dc693ea0 translation(zh_CN): Update the Simplify Chinese translation
closes: #19034

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-31 09:28:45 +00:00
Brian Carbone
5c2b594d0e runtime(rust): Update indentation after nested array literal
fixes:  #18974
closes: #19042

Signed-off-by: Brian Carbone <brian@briancarbone.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-31 09:26:20 +00:00
Christian Brabandt
d09be15847 runtime(doc): Update Contributing.md on the use of AI
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-31 09:20:37 +00:00
Christian Brabandt
ce1636548d runtime(doc): Emphasize adding tests when contributing
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-31 09:07:18 +00:00
Christian Brabandt
7a6d9454c8 README.md: remove the warp ad again
related: #18153

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-30 10:35:10 +01:00
Christian Brabandt
1bc3610b0a runtime(rust): partly revert e426245b, it causes more issues than it solves
related: #18974

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-29 09:41:17 +01:00
Thomas Petazzoni
6df5360691 patch 9.1.2031: Makefile: cannot run make installinks twice
Problem:  Makefile: cannot run make installinks twice
Solution: Change "ln -s" to "ln -sf" to force creation of the symlinks
          (Thomas Petazzoni)

Running "make installlinks" twice towards the same destination
directory will fail, as symlink will already exist. This is not really
expected as "make install" is normally expected to work again and
again towards the same destination directory.

Fix this by using ln -sf.

closes: #19035

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-28 14:26:52 +00:00
John Marriott
32b801abc3 patch 9.1.2030: inefficient use of ga_concat()
Problem:  inefficient use of ga_concat()
Solution: Use ga_concat_len() when length is known.
          (John Marriott)

closes: #19027

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-28 14:14:41 +00:00
Yegappan Lakshmanan
1dd301a4b3 patch 9.1.2029: tests: the test_vim9_class.vim testfile is too long
Problem:  tests: the test_vim9_class.vim testfile is too long
Solution: Split out the interface related test cases into a new
          test file test_vim9_interface.vim (Yegappan Lakshmanan)

closes: #19032

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-28 14:08:21 +00:00
Victorhck
e74e40dc43 runtime(tutor): Improve Spanish translation for chapter 2 after 757b42a
related: #18950
closes:  #19014

Signed-off-by: Victorhck <victorhck@mailbox.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-28 14:03:25 +00:00
Christian Brabandt
ea2b98b9e9 runtime(indent-tests): Include a simple Rust indent test
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-28 14:00:44 +00:00
Christian Brabandt
e426245bb3 runtime(rust): clean-up indent script, handle opening empty line correctly
fixes: #18974

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-28 13:57:33 +00:00
Christian Brabandt
f99de42a9f patch 9.1.2028: [security]: Buffer-overflow with incomplete multi-byte chars
Problem:  Buffer overflow in buf_write() when converting incomplete
          multi-byte characters (Kevin Goodsell)
Solution: Make the buffer slightly larger

closes: #19007

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-27 15:46:44 +00:00
Stanislaw Gruszka
ee3f10af87 runtime(bpftrace): add indention plugin
Problem:  No indention support when editing bpftrace files.
Solution: Add indention settings based on cindent with custom options.

closes: #19030

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-27 15:37:53 +00:00
Mao-Yining
dab78ec4a2 translation(zh_CN): Update the Simplify Chinese translation
closes: #19031

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-27 15:33:21 +00:00
Mao-Yining
a7f703c215 runtime(doc): improve :catch documentation
related: #18984
closes:  #19029

Signed-off-by: Mao-Yining <101858210+mao-yining@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-27 15:28:26 +00:00
Scott McKendry
4e722fdfdd patch 9.1.2027: filetype: bicep filetype used for 2 bicep file types
Problem:  filetype: bicep filetype used for 2 bicep file types
Solution: Detect *.bicepparam files as bicep-param filetype, include
          new bicep-params and bicep filetype plugin
          (Scott McKendry)

The bicep language server handles parameter files differently than
regular bicep files. Treating them the same at the editor level leads to
false positive diagnostics in the editor.

References:

Bicep Language Constants:
- 51392d32ca/src/Bicep.Core/LanguageConstants.cs (L23)
VS Code Extension definition:
- 51392d32ca/src/vscode-bicep/package.json (L47)

closes: #19026

Signed-off-by: Scott McKendry <me@scottmckendry.tech>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-27 15:20:39 +00:00
zeertzjq
78046cc539 patch 9.1.2026: tests: patch 9.1.2019 not tested properly
Problem:  tests: patch 9.1.2019 not tested properly.
Solution: Add missing :exe (zeertzjq).

closes: #19028

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-27 15:07:52 +00:00
Muraoka Taro
9f5b09ea1f patch 9.1.2025: conpty terminal process may not start
Problem:  Conpty terminal process may not start.
Solution: Do not close the input handle at EOF when conpty is in use.
          (Muraoka Taro)

It causes the following tests to fail in Windows conpty:

          - Test_terminal_duplicate_eof_arg()
          - Test_terminal_eof_arg()
          - Test_terminal_eof_arg_win32_ctrl_z()

To be precise, the process is launched, but immediately after it is
launched, the input handle to the console is closed with the EOF of the
input, and the console is terminated. When the console is terminated,
the associated process is also terminated.

In the Windows pseudo console, input and output handles are closed after
the process in the console has terminated.  This is not explicitly
stated in Microsoft's documentation.  However, looking at the code for
Windows Terminal, which is presented as a complete example of the pseudo
console, it is implemented exactly this way.

See the sample codes below:

- https://github.com/microsoft/terminal/blob/main/samples/ConPTY/EchoCon/EchoCon/EchoCon.cpp
- https://github.com/microsoft/terminal/blob/main/samples/ConPTY/GUIConsole/GUIConsole.ConPTY/Terminal.cs
- https://github.com/microsoft/terminal/blob/main/samples/ConPTY/MiniTerm/MiniTerm/Terminal.cs

The handle that is not closed at EOF is closed when Vim detects the end
of the job, so there is no risk of them being forgotten and leaking.

`ch_anonymous_pipe`, which was used to determine whether a channel was
for conpty, was set to TRUE only when conpty was being used. The
definition also had the comment `// ConPTY` attached to it.  This name
is not very appropriate, but I felt it would be rude to add a new field
to `channel_T` just for this purpose, so I reused it.

closes: #19025

Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-27 14:36:31 +00:00
glepnir
4d5b303726 patch 9.1.2024: 'fsync' option cannot be set per buffer
Problem:  'fsync' option cannot be set per buffer
Solution: Make 'fsync' option global-local
          (glepnir)

closes: #19019

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-27 14:32:47 +00:00
Christian Brabandt
9266a2a197 patch 9.1.2023: [security]: Use-after-free in alist_add() with nasty autocmd
Problem:  A BufAdd autocommand may cause alist_add() to use freed
          memory, this is caused by the w_locked variable unset too
          early (henices)
Solution: in trigger_undo_ftplugin() only set w_locked to false, if it
          was false when calling the function.

related: v9.1.0678
closes: #19023

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-27 14:10:37 +00:00
Konfekt
1ff2239053 runtime(compiler): add pyright Python type checker
closes: #19017

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-27 14:07:21 +00:00
Mao-Yining
08aaa7ae19 runtime(doc): remove some fixed items from todo.txt
closes: #19024

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-26 16:01:31 +00:00
Wei Tang
43b87938f5 patch 9.1.2022: using C++ keyword class as member variable name
Problem:  A recent commit introduced a member variable named `class` in
          the `exarg` structure, which conflicts with the C++ keyword
          `class`. This causes compilation issues on Windows when VIM
          is compiled with OLE enabled, as "if_ole.cpp" cannot compile
          due to the keyword conflict (after v9.1.2012).
Solution: Rename the member variable of `exarg` from `class` to `ea_class`.
          (Wei Tang)

related: #18949
closes:  #19016

Signed-off-by: Wei Tang <gauchyler@uestc.edu.cn>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-26 15:54:46 +00:00
tao
538da34ad3 runtime(netrw): Fix reading UNC paths on windows
Problem:  When Vim is launched with a UNC directory, netrw treats it as a
          relative path and compose it again.
Solution: This is due to `exists("g:netrw_cygwin")` always being true.
          We can directly use `g:netrw_cygwin`.

closes: #19015

Signed-off-by: tao <2471314@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-26 15:51:32 +00:00
Konfekt
ffd5c52d23 runtime(compiler): ignore 'Found' messages in ruff and ty compiler
while at it, also update the ty command line

closes: #19012

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-26 15:33:39 +00:00
ners
b91b30643a patch 9.1.2021: filetype: fluent files are not recognized
Problem:  filetype: fluent files are not recognized
Solution: Detect *.ftl files as fluent filetype (ners)

References:
- https://projectfluent.org/

closes: #19011

Signed-off-by: ners <ners@gmx.ch>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-26 15:27:19 +00:00
Miguel Barro
c721b69e88 runtime(termdebug): update v:shell_error condition test.
vim9 conditions only admit 0 or 1 integers, however the return value of
shells is not limited to either 0 or 1 (e.g. powershell)

closes: #19010

Signed-off-by: Miguel Barro <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-26 15:19:41 +00:00
Christian Brabandt
a8a0ee5004 patch 9.1.2020: tests: test_virtualedit.vim leaves swapfiles behind
Problem:  tests: test_virtualedit.vim leaves swapfiles behind
Solution: Close open buffers using :bw! instead of :close!

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-26 15:16:46 +00:00
McAuley Penney
491f0fa457 patch 9.1.2019: inconsistent cursor encoding past EOL with ve=all
Problem:  When virtualedit is set to all, the cursor is supposed to be
          permitted to reside anywhere, including on the virtual space
          beyond the end of the buffer's text. Switching modes triggered
          a routine that "fixed" a cursor that was past the end of the
          line by shifting it back to the last actual character in the
          line and compensating with a virtual column offset. While
          visually identical, this re-encoding changed the underlying
          byte index, causing position-reporting functions to return
          inconsistent values after a mode change.
Solution: Skip this coordinate adjustment when virtual editing is fully
          enabled. By treating the line terminator as a valid, stable
          position, the cursor’s internal representation remains
          unchanged when entering or exiting Visual mode, ensuring
          consistent coordinate reporting. Add a regression test to
          check this functionality.
          (McAuley Penney)

fixes:  #16276
closes: #19009

Signed-off-by: McAuley Penney <jacobmpenney@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-26 15:10:01 +00:00
tao
eb3007b417 patch 9.1.2018: proto: ops.pro outdated
Problem:  proto: ops.pro outdated (after v9.1.2017)
Solution: Regenerate the ops.pro proto file (Tao)

closes: #19018

Signed-off-by: tao <2471314@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-26 15:04:24 +00:00
Foxe Chen
e6a11d45e5 runtime(osc52): A few minor fixes
- If g:osc52_disable_paste is enabled, then return an empty list instead
  of a list with a single empty string.
- use `echo` instead of `echom` when printing osc waiting message

closes: #19002

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-26 14:59:01 +00:00
Christian Brabandt
2006415016 runtime(doc): add reference to searchcount() function
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-23 22:22:38 +00:00
Christian Brabandt
6d211bc4f0 runtime(doc): Improve :catch documentation
fixes: #18984

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-23 21:58:57 +00:00
Beleswar Prasad Padhi
519dc391d8 runtime(make): Makefile highlighting breaks with ')' in string
Problem:  Makefile syntax highlighting incorrectly ends function calls
          when encountering ')' inside double or single quoted strings,
          causing incorrect highlighting for the remainder of the line.
Solution: Add makeDString and makeSString to the contains list for
          makeIdent regions. This allows strings to be recognized inside
          variable references and function calls.

fixes:  #18687
closes: #18818

Signed-off-by: Beleswar Prasad Padhi <beleswarprasad@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-23 21:32:10 +00:00
Yiyang Wu
aded55463a runtime(make): Move target greedy match after $() to avoid region matching overflow
Partially revert 2a33b499a3, where all
syn match makeIdent are moved before syn region makeIdent to match $()
(reason: see https://github.com/vim/vim/pull/18403#issuecomment-3341161566)

However this results in https://github.com/vim/vim/issues/18890 ,
because lines like
`$(a) =`
will first start a region search beginning with `$(`
but then the whole target including `)` will be matched by
`syn match makeIdent "^ *[^:#= \t]*\s*="me=e-1`
which leaves the region search for the never-found `)` and let the
region matching overflow.

Same for

`$(a) ::`
`$(a) +=`

The solution is to move those greedy target match back, so they take
priority and prevents region match from happening.

fixes:  #18890
closes: #18938

Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-23 21:25:04 +00:00
McAuley Penney
8ea0e7205c patch 9.1.2017: getregionpos() depends on 'linebreak' setting
Problem:  getregionpos() depends on 'linebreak' setting
Solution: Reset linebreak setting temporarily (McAuley Penney)

When a line is wrapped on word boundaries, getregionpos() may report a
different end column for a visual block than the cursor position used to
define the selection.

Update the blockwise calculation in getregionpos() to use the same
wrapping assumptions as visual block mode, so the reported region
matches the selection boundaries.

Add a regression test that forces wrapping and checks that the end
position stays consistent under "setlocal wrap" and "setlocal
linebreak".

closes: #19006

Signed-off-by: McAuley Penney <jacobmpenney@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-23 20:51:25 +00:00
Anttoni Erkkilä
9d661b057e patch 9.1.2016: cindent wrong indentation after do-while loop
Problem:  At "if(0) do if(0); while(0); else", else should be aligned
          with outer if, but is aligned with inner if.
Solution: In function find_match, ignore "if" and "else" inside a
          do-while loop, when looking for "if". (Anttoni Erkkilä)

closes: #19004

Signed-off-by: Anttoni Erkkilä <anttoni.erkkila@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-23 20:42:57 +00:00
Foxe Chen
60c87056b4 patch 9.1.2015: blob2string() stopped after an empty line
Problem:  blob2string() stopped after an empty line
Solution: Specifically check for empty content (Foxe Chen)

closes: #19001

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-23 20:37:19 +00:00
Foxe Chen
11c3c62aa8 patch 9.1.2014: clipboard: clipboard register corrupted with clipboard provider
Problem:  clipboard: clipboard register corrupted with clipboard
          provider (Satoru Kitaguchi and mikoto2000 after v9.1.1972)
Solution: Only adjust clipboard register points to the unnamed register
          (Foxe Chen)

fixes:  #18983
fixes:  #18988
closes: #19000

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-23 20:29:08 +00:00
Muraoka Taro
90e17110c4 patch 9.1.2013: tests: Test_terminal_shell_option fails with conpty
Problem:  tests: When opening a conpty terminal, if process startup
          fails, it will silently exit.  As a result, the
          Test_terminal_shell_option in test_terminal3.vim failed in
          conpty.

          In a winpty terminal, the winpty-provided error message
          "CreateProcess failed" was displayed.  The test is designed to
          catch this error as an exception.

Solution: Make conpty fail with an error messages in the same way as winpty.
          (Muraoka Taro)

In addition, since the GetWin32Error() function can obtain more detailed
error messages, the format has been changed to "CreateProcess failed:
{localized message from the OS}" for conpty.

Also, since the GetWin32Error() function returns errors in ACP (Active
Code Page) encoding, these have been converted to Vim's internal
encoding, enc.  This will prevent messages from being garbled in
Japanese environments, etc.  The output of this function was basically
used by the semsg() function in other places, so this change also fixes
potential similar garbled characters.

The test now errors out immediately in places where it is expected not
to be reached, and comments have been added about the expected content
of the winpty and conpty error messages.

closes: #18998

Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-23 20:22:54 +00:00
179 changed files with 4356 additions and 3149 deletions

13
.gitattributes vendored
View File

@@ -1,4 +1,13 @@
src/testdir/test42.in diff
# The old test .ok files are expected to use LF line endings, even on Windows.
# In src/testdir/Make_mvc.mak and src/testdir/Make_ming.mak, the test result
# files .out are converted to LF line endings before being compared.
# Therefore, if the .ok files' line endings are not specified and are
# converted to CRLF, the comparison between .ok and .out will fail.
src/testdir/test*.ok text eol=lf
# This ok file contains literal CR LF endings. Should not be touched by git,
# so handle as binary
src/testdir/test21.ok -text
# `vim.pot` is updated every time any of the *.c files are modified. And as it
# contains line numbers for strings from *.c files, inserting a line into a
@@ -24,7 +33,7 @@ src/po/vim.pot -diff
src/po/vim.pot diff=ignore_vim_pot
# GitHub reacts to the `linguist-generated` attribute, by ignoring marked files
# for the repository's language statistics and hiddning changes in these files
# for the repository's language statistics and hiding changes in these files
# by default in diffs.
#
# https://docs.github.com/en/repositories/working-with-files/managing-files/customizing-how-changed-files-appear-on-github

7
.github/MAINTAINERS vendored
View File

@@ -127,6 +127,8 @@ runtime/ftplugin/asy.vim @avidseeker
runtime/ftplugin/autohotkey.vim @telemachus
runtime/ftplugin/awk.vim @dkearns
runtime/ftplugin/basic.vim @dkearns
runtime/ftplugin/bicep.vim @scottmckendry
runtime/ftplugin/bicep-params.vim @scottmckendry
runtime/ftplugin/brighterscript.vim @ribru17
runtime/ftplugin/brightscript.vim @ribru17
runtime/ftplugin/bst.vim @tpope
@@ -228,6 +230,8 @@ runtime/ftplugin/less.vim @genoma
runtime/ftplugin/lex.vim @ribru17
runtime/ftplugin/lf.vim @andis-sprinkis
runtime/ftplugin/liquid.vim @tpope
runtime/ftplugin/logtalk.dict @pmoura
runtime/ftplugin/logtalk.vim @pmoura
runtime/ftplugin/lua.vim @dkearns
runtime/ftplugin/lynx.vim @dkearns
runtime/ftplugin/m17ndb.vim @dseomn
@@ -336,6 +340,7 @@ runtime/import/dist/vimhighlight.vim @lacygoill
runtime/indent/arduino.vim @k-takata
runtime/indent/astro.vim @wuelnerdotexe
runtime/indent/basic.vim @dkearns
runtime/indent/bpftrace.vim @sgruszka
runtime/indent/bst.vim @tpope
runtime/indent/cdl.vim @dkearns
runtime/indent/chatito.vim @ObserverOfTime
@@ -382,6 +387,7 @@ runtime/indent/ld.vim @dkearns
runtime/indent/lf.vim @andis-sprinkis
runtime/indent/less.vim @genoma
runtime/indent/liquid.vim @tpope
runtime/indent/logtalk.vim @pmoura
runtime/indent/lua.vim @marcuscf
runtime/indent/m17ndb.vim @dseomn
runtime/indent/make.vim @dkearns
@@ -559,6 +565,7 @@ runtime/syntax/less.vim @genoma
runtime/syntax/lf.vim @andis-sprinkis
runtime/syntax/liquid.vim @tpope
runtime/syntax/log.vim @mao-yining
runtime/syntax/logtalk.vim @pmoura
runtime/syntax/lua.vim @marcuscf
runtime/syntax/lynx.vim @dkearns
runtime/syntax/lyrics.vim @ObserverOfTime

View File

@@ -522,6 +522,7 @@ jobs:
- { features: HUGE, toolchain: mingw, VIMDLL: yes, GUI: yes, arch: x86, python3: stable, coverage: yes }
- { features: HUGE, toolchain: msvc, VIMDLL: no, GUI: yes, arch: x86 }
- { features: HUGE, toolchain: mingw, VIMDLL: yes, GUI: no, arch: x64, coverage: yes }
- { features: HUGE, toolchain: msvc, VIMDLL: no, GUI: no, arch: x64, ttytype: conpty }
- { features: NORMAL, toolchain: msvc, VIMDLL: yes, GUI: no, arch: x86 }
- { features: NORMAL, toolchain: mingw, VIMDLL: no, GUI: yes, arch: x64 }
- { features: TINY, toolchain: msvc, VIMDLL: yes, GUI: yes, arch: x64 }
@@ -535,8 +536,6 @@ jobs:
# Show Windows version
cmd /c ver
git config --global core.autocrlf input
if ${{ matrix.arch == 'x64' }}; then
cygreg=registry
pyreg=
@@ -616,11 +615,13 @@ jobs:
call :downloadfile %LUA${{ env.BITS }}_URL% downloads\lua.zip
7z x downloads\lua.zip -o%LUA_DIR% > nul || exit 1
echo %COL_GREEN%Download winpty%COL_RESET%
call :downloadfile %WINPTY_URL% downloads\winpty.zip
7z x -y downloads\winpty.zip -oD:\winpty > nul || exit 1
copy /Y D:\winpty\%WARCH%\bin\winpty.dll src\winpty%BITS%.dll
copy /Y D:\winpty\%WARCH%\bin\winpty-agent.exe src\
if not "${{ matrix.ttytype }}" == "conpty" (
echo %COL_GREEN%Download winpty%COL_RESET%
call :downloadfile %WINPTY_URL% downloads\winpty.zip
7z x -y downloads\winpty.zip -oD:\winpty > nul || exit 1
copy /Y D:\winpty\%WARCH%\bin\winpty.dll src\winpty%BITS%.dll
copy /Y D:\winpty\%WARCH%\bin\winpty-agent.exe src\
)
echo %COL_GREEN%Download libsodium%COL_RESET%
if "${{ matrix.toolchain }}"=="msvc" (

View File

@@ -12,10 +12,10 @@ A pull request has the advantage that it will trigger the Continuous
Integration tests, you will be warned of problems (you can ignore the coverage
warning, it's noisy).
Please consider adding a test. All new functionality should be tested and bug
fixes should be tested for regressions: the test should fail before the fix and
pass after the fix. Look through recent patches for examples and find help
with ":help testing". The tests are located under "src/testdir".
Please always add a test, if possible. All new functionality should be tested
and bug fixes should be tested for regressions: the test should fail before the
fix and pass after the fix. Look through recent patches for examples and find
help with ":help testing". The tests are located under "src/testdir".
Contributions will be distributed with Vim under the Vim license. Providing a
change to be included implies that you agree with this and your contribution
@@ -46,6 +46,15 @@ When merging PRs into Vim, the current maintainer @chrisbra usually adds missing
anybody that explicitly *ACK*s a pull request as a statement that those
approvers are happy with that particular change.
## Using AI
When using AI for contributions, please disclose this. Any AI-generated code
must follow the Vim code style. In particular, [test_codestyle.vim][18]
must not report any failures. Check the CI output for any test failures.
Ensure that changes are properly tested. Do not submit a single PR that
addresses multiple unrelated issues.
# Reporting issues
We use GitHub [issues][17], but that is not a requirement. Writing to the Vim
@@ -160,3 +169,4 @@ mailing list. For other questions please use the [Vi Stack Exchange][8] website,
[15]: https://en.wikipedia.org/wiki/Developer_Certificate_of_Origin
[16]: https://github.com/vim/vim/blob/master/runtime/doc/helphelp.txt
[17]: https://github.com/vim/vim/issues
[18]: https://github.com/vim/vim/blob/master/src/testdir/test_codestyle.vim

View File

@@ -1,16 +1,3 @@
<div align="center" markdown="1">
<sup>Special thanks for supporting Vim by donating to the <a href="https://iccf-holland.org/">ICCF</a>:</sup>
<br>
<br>
<a href="https://go.warp.dev/vim">
<img alt="Warp sponsorship" width="400" src="https://raw.githubusercontent.com/warpdotdev/brand-assets/refs/heads/main/Github/Sponsor/Warp-Github-LG-03.png">
</a>
### [Warp, built for coding with multiple AI agents.](https://www.warp.dev/vim)
[Available for MacOS, Linux, & Windows](https://www.warp.dev/vim)<br>
</div>
<hr>
# [![Vim The editor](https://github.com/vim/vim/raw/master/runtime/vimlogo.gif)](https://www.vim.org)
[![Github Build status](https://github.com/vim/vim/workflows/GitHub%20CI/badge.svg)](https://github.com/vim/vim/actions?query=workflow%3A%22GitHub+CI%22)

View File

@@ -1,3 +1,3 @@
/^CFLAGS[[:blank:]]*=/s/$/ -Wall -Wextra -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Werror -Wno-deprecated-declarations/
/^PERL_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-function -Wno-shadow/
/^PERL_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-function -Wno-strict-prototypes -Wno-shadow/
/^RUBY_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-parameter -Wno-strict-prototypes/

View File

@@ -1,3 +1,8 @@
Примечание. Данный текст перевода лицензии Vim предоставляется с целью
ознакомления и не является юридически значимым. Переводчик не несёт
ответственности за возможные неточности и ошибки при переводе лицензии.
Единственно юридически значимым является текст лицензии Vim на английском языке.
ЛИЦЕНЗИЯ VIM
I) Неизменённые копии программы Vim могут распространяться без ограничения
@@ -29,15 +34,15 @@ II) Изменённую (или дополненную) версию прогр
будут распространяться на условиях настоящей лицензии или более
поздней её версии. Лица, в данное время являющиеся ответственными
за разработку, указаны в перечне, размещённом по адресу:
https://github.com/orgs/vim/people. В случае изменения этой
информации, актуальные данные будут опубликованы на
соответствующих ресурсах (вероятнее всего по интернет‐адресам
vim.sf.net, www.vim.org и/или comp.editors). В случае полной
невозможности установить контакт с ответственным разработчиком,
обязательства по отправке изменений утрачивают силу. После
передачи подтверждения о получении изменений от ответственного
разработчика, необходимость в повторной отправке копии изменённой
программы Vim неприменима.
https://github.com/orgs/vim/people.
При изменении этой информации, актуальные данные будут
опубликованы на соответствующих ресурсах (вероятнее всего
по интернет‐адресам vim.sf.net, www.vim.org и/или comp.editors).
В случае полной невозможности связаться с ответственным
разработчиком, обязательства по отправке изменений утрачивают
силу. После передачи подтверждения о получении изменений
от ответственного разработчика, необходимость в повторной
отправке копии изменённой программы Vim неприменима.
b) Если лицом получена изменённая версия программа Vim,
распространяющаяся на условиях, указанных в ч. II) п. 2) пп. а)
допускается дальнейшее её распространение этим лицом без внесения

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 Dec 22
# Last Change: 2026 Jan 06
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
# These functions are moved here from runtime/filetype.vim to make startup
@@ -1746,7 +1746,7 @@ const ft_from_ext = {
"bst": "bst",
# Bicep
"bicep": "bicep",
"bicepparam": "bicep",
"bicepparam": "bicep-params",
# BIND zone
"zone": "bindzone",
# Blank
@@ -1876,6 +1876,9 @@ const ft_from_ext = {
"elv": "elvish",
# Faust
"lib": "faust",
# Fennel
"fnl": "fennel",
"fnlm": "fennel",
# Libreoffice config files
"xcu": "xml",
"xlb": "xml",
@@ -1914,6 +1917,9 @@ const ft_from_ext = {
# Diff files
"diff": "diff",
"rej": "diff",
# Djot
"dj": "djot",
"djot": "djot",
# DOT
"dot": "dot",
"gv": "dot",
@@ -1976,6 +1982,8 @@ const ft_from_ext = {
"fish": "fish",
# Flix
"flix": "flix",
# Fluent
"ftl": "fluent",
# Focus Executable
"fex": "focexec",
"focexec": "focexec",
@@ -2229,6 +2237,10 @@ const ft_from_ext = {
"k": "kwt",
# Kivy
"kv": "kivy",
# Koka
"kk": "koka",
# Kos
"kos": "kos",
# Kotlin
"kt": "kotlin",
"ktm": "kotlin",
@@ -2361,6 +2373,8 @@ const ft_from_ext = {
# N1QL
"n1ql": "n1ql",
"nql": "n1ql",
# Nickel
"ncl": "nickel",
# Nim file
"nim": "nim",
"nims": "nim",
@@ -3002,6 +3016,7 @@ const ft_from_ext = {
"usd": "usd",
# Rofi stylesheet
"rasi": "rasi",
"rasinc": "rasi",
# Zsh module
# mdd: https://github.com/zsh-users/zsh/blob/57248b88830ce56adc243a40c7773fb3825cab34/Etc/zsh-development-guide#L285-L288
# mdh, pro: https://github.com/zsh-users/zsh/blob/57248b88830ce56adc243a40c7773fb3825cab34/Etc/zsh-development-guide#L268-L271

View File

@@ -3,7 +3,7 @@
" Language: Ada (GNAT)
" $Id: gnat.vim 887 2008-07-08 14:29:01Z krischik $
" Copyright: Copyright (C) 2006 Martin Krischik
" Maintainer: Martin Krischi <krischik@users.sourceforge.net>k
" Maintainer: Martin Krischi <krischik@users.sourceforge.net>
" Ned Okie <nokie@radford.edu>
" $Author: krischik $
" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $

View File

@@ -1,5 +1,5 @@
" Vim plugin for formatting XML
" Last Change: 2020 Jan 06
" Last Change: 2023 March 15th
" Version: 0.3
" Author: Christian Brabandt <cb@256bit.org>
" Repository: https://github.com/chrisbra/vim-xml-ftplugin
@@ -37,13 +37,17 @@ func! xmlformat#Format() abort
" Keep empty input lines?
if empty(line)
call add(result, '')
let current += 1
continue
elseif line !~# '<[/]\?[^>]*>'
let nextmatch = match(list, '<[/]\?[^>]*>', current)
if nextmatch > -1
let line .= ' '. join(list[(current + 1):(nextmatch-1)], " ")
call remove(list, current+1, nextmatch-1)
let nextmatch = match(list, '^\s*$\|<[/]\?[^>]*>', current)
if nextmatch > -1
let lineEnd = nextmatch
else
let lineEnd = len(list)
endif
let line .= ' '. join(list[(current + 1):(lineEnd-1)], " ")
call remove(list, current+1, lineEnd-1)
endif
" split on `>`, but don't split on very first opening <
" this means, items can be like ['<tag>', 'tag content</tag>']
@@ -79,9 +83,13 @@ func! xmlformat#Format() abort
if s:EndTag(t[1])
call s:DecreaseIndent()
endif
"for y in t[1:]
let result+=s:FormatContent(t[1:])
"endfor
let result+=s:FormatContent(t[1:])
if s:IsTag(t[1])
let lastitem = t[1]
continue
endif
elseif s:IsComment(item)
let result+=s:FormatContent([item])
else
call add(result, s:Indent(item))
endif
@@ -94,7 +102,7 @@ func! xmlformat#Format() abort
if !empty(result)
let lastprevline = getline(v:lnum + count_orig)
let delete_lastline = v:lnum + count_orig - 1 == line('$')
exe v:lnum. ",". (v:lnum + count_orig - 1). 'd'
exe 'silent ' .. v:lnum. ",". (v:lnum + count_orig - 1). 'd'
call append(v:lnum - 1, result)
" Might need to remove the last line, if it became empty because of the
" append() call

View File

@@ -3,7 +3,7 @@
" Language: Ada (GNAT)
" $Id: gnat.vim 887 2008-07-08 14:29:01Z krischik $
" Copyright: Copyright (C) 2006 Martin Krischik
" Maintainer: Martin Krischi <krischik@users.sourceforge.net>k
" Maintainer: Martin Krischi <krischik@users.sourceforge.net>
" Ned Okie <nokie@radford.edu>
" $Author: krischik $
" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $

View File

@@ -1,6 +1,6 @@
" Vim compiler file
" Compiler: Perl syntax checks (perl -Wc)
" Maintainer: vim-perl <vim-perl@googlegroups.com>
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
" Author: Christian J. Robinson <heptite@gmail.com>
" Homepage: https://github.com/vim-perl/vim-perl
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues

View File

@@ -1,6 +1,6 @@
" Vim compiler file
" Compiler: perlcritic
" Maintainer: vim-perl <vim-perl@googlegroups.com>
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
" Author: Doug Kearns <dougkearns@gmail.com>
" Homepage: https://github.com/vim-perl/vim-perl
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues

View File

@@ -1,6 +1,6 @@
" Vim compiler file
" Compiler: podchecker
" Maintainer: vim-perl <vim-perl@googlegroups.com>
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
" Author: Doug Kearns <dougkearns@gmail.com>
" Homepage: https://github.com/vim-perl/vim-perl
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues

View File

@@ -0,0 +1,25 @@
" Vim compiler file
" Compiler: Pyright (Python Type Checker)
" Maintainer: @konfekt
" Last Change: 2025 Dec 26
if exists("current_compiler") | finish | endif
let current_compiler = "pyright"
let s:cpo_save = &cpo
set cpo&vim
" CompilerSet makeprg=pyright
" CompilerSet makeprg=basedpyright
exe 'CompilerSet makeprg=' .. escape(
\ get(b:, 'pyright_makeprg', get(g:, 'pyright_makeprg', 'pyright')),
\ ' \|"')
CompilerSet errorformat=
\%E%f:%l:%c\ -\ error:\ %m,
\%W%f:%l:%c\ -\ warning:\ %m,
\%N%f:%l:%c\ -\ note:\ %m,
\%C[ \t]\ %.%#,
\%-G%.%#
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@@ -4,6 +4,7 @@
" Last Change: 2024 Nov 07
" 2024 Nov 19 by the Vim Project (properly escape makeprg setting)
" 2025 Nov 06 by the Vim Project (do not set buffer-local makeprg)
" 2024 Dec 24 by the Vim Project (mute Found messages)
if exists("current_compiler") | finish | endif
let current_compiler = "ruff"
@@ -16,6 +17,7 @@ exe 'CompilerSet makeprg=' .. escape('ruff check --output-format=concise '
\ ..get(b:, 'ruff_makeprg_params', get(g:, 'ruff_makeprg_params', '--preview')),
\ ' \|"')
CompilerSet errorformat=%f:%l:%c:\ %m,%f:%l:\ %m,%f:%l:%c\ -\ %m,%f:
CompilerSet errorformat+=%-GFound\ %.%#
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@@ -1,7 +1,7 @@
" Vim compiler file
" Compiler: Ty (Python Type Checker)
" Maintainer: @konfekt
" Last Change: 2024 Dec 18
" Last Change: 2024 Dec 24
if exists("current_compiler") | finish | endif
let current_compiler = "ty"
@@ -11,9 +11,10 @@ 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', ' \|"')
\ get(b:, 'ty_makeprg', get(g:, 'ty_makeprg', 'ty check --no-progress --color=never'))
\ ..' --output-format=concise', ' \|"')
CompilerSet errorformat=%f:%l:%c:\ %m,%f:%l:\ %m,%f:%l:%c\ -\ %m,%f:
CompilerSet errorformat+=%-GFound\ %.%#
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@@ -1,4 +1,4 @@
*builtin.txt* For Vim version 9.1. Last change: 2025 Dec 21
*builtin.txt* For Vim version 9.1. Last change: 2026 Jan 03
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -4879,6 +4879,11 @@ getpos({expr}) *getpos()*
within the line. To get the character position in the line,
use |getcharpos()|.
The visual marks |'<| and |'>| refer to the beginning and end
of the visual selection relative to the buffer. Note that
this differs from |setpos()|, where they are relative to the
cursor position.
Note that for '< and '> Visual mode matters: when it is "V"
(visual line mode) the column of '< is zero and the column of
'> is a large number equal to |v:maxcol|.
@@ -10152,9 +10157,14 @@ setpos({expr}, {list}) *setpos()*
preferred column is not set. When it is present and setting a
mark position it is not used.
Note that for '< and '> changing the line number may result in
the marks to be effectively be swapped, so that '< is always
before '>.
Note that for |'<| and |'>| changing the line number may
result in the marks to be effectively swapped, so that |'<| is
always before |'>|.
The visual marks |'<| and |'>| refer to the beginning and end
of the visual selection relative to the cursor position.
Note that this differs from |getpos()|, where they are
relative to the buffer.
Returns 0 when the position could be set, -1 otherwise.
An error message is given if {expr} is invalid.

View File

@@ -1,4 +1,4 @@
*eval.txt* For Vim version 9.1. Last change: 2025 Dec 21
*eval.txt* For Vim version 9.1. Last change: 2025 Dec 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3718,13 +3718,16 @@ text...
matching {pattern} is being thrown and has not yet
been caught by a previous `:catch`. Otherwise, these
commands are skipped.
When {pattern} is omitted all errors are caught.
Examples: >
Pattern can start with "Vim({cmd})" to indicate an
exception that occurred when executing the Ex command
{cmd}. When {pattern} is omitted all errors are
caught. Examples: >
:catch /^Vim:Interrupt$/ " catch interrupts (CTRL-C)
:catch /^Vim\%((\a\+)\)\=:E/ " catch all Vim errors
:catch /^Vim\%((\a\+)\)\=:/ " catch errors and interrupts
:catch /^Vim\%((\S\+)\)\=:E/ " catch all Vim errors
:catch /^Vim\%((\S\+)\)\=:/ " catch errors and interrupts
:catch /^Vim(write):/ " catch all errors in :write
:catch /^Vim\%((\a\+)\)\=:E123:/ " catch error E123
:catch /^Vim(!):/ " catch all errors in :!
:catch /^Vim\%((\S\+)\)\=:E123:/ " catch error E123
:catch /my-exception/ " catch user exception
:catch /.*/ " catch everything
:catch " same as /.*/

View File

@@ -1,4 +1,4 @@
*insert.txt* For Vim version 9.1. Last change: 2025 Nov 09
*insert.txt* For Vim version 9.1. Last change: 2026 Jan 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1720,7 +1720,7 @@ Complete:
Notes
- It doesn't complete command arguments that rely on 'shellcmd' completion
type in Windows and WSL due to general slowness of canditate gathering,
type in Windows and WSL due to general slowness of candidate gathering,
e.g.
>
terminal dir

View File

@@ -1,4 +1,4 @@
*options.txt* For Vim version 9.1. Last change: 2025 Dec 21
*options.txt* For Vim version 9.1. Last change: 2026 Jan 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1823,7 +1823,7 @@ A jump table for the options with a short description can be found at |Q_op|.
prepend, e.g.: >
set clipboard^=unnamed
< When using the GUI see |'go-A'|.
When using the |clipboard-providers| feature, only the "unamed" and
When using the |clipboard-providers| feature, only the "unnamed" 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
@@ -4274,7 +4274,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'fsync'* *'fs'* *'nofsync'* *'nofs'*
'fsync' 'fs' boolean (default on)
global
global or local to buffer |global-local|
When on, the library function fsync() will be called after writing a
file. This will flush a file to disk, ensuring that it is safely
written even on filesystems which do metadata-only journaling. This
@@ -4283,6 +4283,8 @@ A jump table for the options with a short description can be found at |Q_op|.
turning this off increases the chances of data loss after a crash. On
systems without an fsync() implementation, this variable is always
off.
This is a |global-local| option, so it can be set per buffer, for
example when writing to a slow filesystem.
Also see 'swapsync' for controlling fsync() on swap files.
'fsync' also applies to |writefile()| (unless a flag is used to
overrule it) and when writing undo files (see |undo-persistence|).
@@ -6039,7 +6041,8 @@ A jump table for the options with a short description can be found at |Q_op|.
When the number of matches exceeds this value, Vim shows ">" instead
of the exact count to keep searching fast.
Note: larger values may impact performance.
The value must be between 1 and 9999.
The value must be between 1 and 9999. See also the |searchcount()|
function.
*'menuitems'* *'mis'*
'menuitems' 'mis' number (default 25)
@@ -7860,7 +7863,8 @@ A jump table for the options with a short description can be found at |Q_op|.
"search hit TOP, continuing at BOTTOM" messages are only
indicated by a "W" (Mnemonic: Wrapped) letter before the
search count statistics. The maximum limit can be set with
the 'maxsearchcount' option.
the 'maxsearchcount' option, see also |searchcount()|
function.
This gives you the opportunity to avoid that a change between buffers
requires you to hit <Enter>, but still gives as useful a message as
@@ -8137,7 +8141,7 @@ A jump table for the options with a short description can be found at |Q_op|.
when it is turned off. It is also reset when 'compatible' is set.
The 'L' flag in 'cpoptions' alters tab behavior when 'list' is
enabled. See also |ins-expandtab| ans user manual section |30.5| for
enabled. See also |ins-expandtab| and user manual section |30.5| for
in-depth explanations.
If Vim is compiled with the |+vartabs| feature then the value of

View File

@@ -1,10 +1,10 @@
*popup.txt* For Vim version 9.1. Last change: 2025 Nov 09
*popup.txt* For Vim version 9.1. Last change: 2026 Jan 08
VIM REFERENCE MANUAL by Bram Moolenaar
Displaying text in a floating window. *popup* *popup-window* *popupwin*
Displaying text in a popup window. *popup* *popup-window* *popupwin*
1. Introduction |popup-intro|

View File

@@ -1,4 +1,4 @@
*quickfix.txt* For Vim version 9.1. Last change: 2025 Dec 21
*quickfix.txt* For Vim version 9.1. Last change: 2025 Dec 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1654,6 +1654,13 @@ b/g:mypy_makeprg_params variable. For example: >
The global default is "--strict --ignore-missing-imports".
PYRIGHT TYPE CHECKER *compiler-pyright*
Commonly used compiler options can be added to 'makeprg' by setting the
b/g:pyright_makeprg_params variable.
The global default is "pyright".
TY TYPE CHECKER *compiler-ty*
Commonly used compiler options and executable can be set by the

View File

@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 9.1. Last change: 2025 Oct 14
*syntax.txt* For Vim version 9.1. Last change: 2026 Jan 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1125,6 +1125,7 @@ new-generation language oriented to full-scenario intelligence.
All highlighting is enabled by default. To disable highlighting for a
specific group, set the corresponding variable to 0 in your |vimrc|.
All options to disable highlighting are: >
:let g:cangjie_builtin_color = 0
:let g:cangjie_comment_color = 0
:let g:cangjie_identifier_color = 0
:let g:cangjie_keyword_color = 0

View File

@@ -6772,6 +6772,7 @@ compiler-mypy quickfix.txt /*compiler-mypy*
compiler-pandoc quickfix.txt /*compiler-pandoc*
compiler-perl quickfix.txt /*compiler-perl*
compiler-pylint quickfix.txt /*compiler-pylint*
compiler-pyright quickfix.txt /*compiler-pyright*
compiler-pytest quickfix.txt /*compiler-pytest*
compiler-pyunit quickfix.txt /*compiler-pyunit*
compiler-ruff quickfix.txt /*compiler-ruff*
@@ -10975,6 +10976,7 @@ termcap-cursor-shape term.txt /*termcap-cursor-shape*
termcap-options term.txt /*termcap-options*
termcap-title term.txt /*termcap-title*
termda1-variable eval.txt /*termda1-variable*
termdebug terminal.txt /*termdebug*
termdebug-commands terminal.txt /*termdebug-commands*
termdebug-communication terminal.txt /*termdebug-communication*
termdebug-customizing terminal.txt /*termdebug-customizing*

View File

@@ -1,4 +1,4 @@
*terminal.txt* For Vim version 9.1. Last change: 2025 Nov 28
*terminal.txt* For Vim version 9.1. Last change: 2026 Jan 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1263,7 +1263,7 @@ Alternatively, press "s" to swap the first and second dump. Do this several
times so that you can spot the difference in the context of the text.
==============================================================================
6. Debugging *terminal-debug* *terminal-debugger* *package-termdebug*
6. Debugging *terminal-debug* *terminal-debugger* *package-termdebug* *termdebug*
The Terminal debugging plugin can be used to debug a program with gdb and view
the source code in a Vim window. Since this is completely contained inside

View File

@@ -1,4 +1,4 @@
*todo.txt* For Vim version 9.1. Last change: 2025 Dec 09
*todo.txt* For Vim version 9.1. Last change: 2025 Dec 26
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -205,11 +205,8 @@ Popup windows:
positioned? PopupNew? Could be used to set some options or move it out of
the way. (#5737)
However, it may also cause trouble, changing the popup of another plugin.
- Should popup_getoptions() also return the mask? #7774
- Add a way to use popup_menu() synchronously: instead of invoking the
callback, return the choice. (Ben Jackson, #6534)
- When using a popup for the info of a completion menu, and there is not
enough space, let the popup overlap with the menu. (#4544)
- Implement flip option.
- Make redrawing more efficient and avoid flicker:
- put popup menu also in popup_mask?
@@ -368,9 +365,6 @@ Can we not request XT key sequences, or reduce them drastically?
Issue #10512: Dynamic loading broken with Perl 5.36
Damien has a patch (2022 Dec 4)
Request #11965: Allow several "%=" items in 'statusline', makes it possible
to have text in the center.
Add some kind of ":whathappend" command and functions to make visible what the
last few typed keys and executed commands are. To be used when the user
wonders what went wrong. Could also be used for statistics #12046.
@@ -380,10 +374,6 @@ wonders what went wrong. Could also be used for statistics #12046.
- executed command lines
- with more verbosity: what scripts/functions/autocommands were executed
NFA regexp does not handle composing characters well: #10286
[ɔ̃] matches both ɔ and ɔ̃
\(ɔ\|ɔ̃\) matches ɔ and not ɔ̃
Is there a way to make 'autowriteall' make a clean exit when the xterm is
closed? (Dennis Nazic says files are preserved, okt 28). Perhaps handle TERM
like HUP?
@@ -417,8 +407,6 @@ In a timer callback, when using ":echo" and then input() the message is
overwritten. Could use ":echowin" and call redraw_cmd() in get_user_input().
#11299
Syntax include problem: #11277. Related to Patch 8.2.2761
To avoid flicker: add an option that when a screen clear is requested, instead
of clearing it draws everything and uses "clear to end of line" for every line.
Resetting 't_ut' already causes this?
@@ -517,8 +505,6 @@ there is a match do not scan the directory (possibly speeds up :find a lot).
globpath() does not use 'wildignorecase' at all? (related to #8350)
mksession uses :buffer instead of :edit in one place but not another. #10629
Add 'termguiattr' option, use "gui=" attributes in the terminal? Would work
with 'termguicolors'. #1740
@@ -5781,7 +5767,6 @@ Argument list:
Registers:
8 Don't display empty registers with ":display". (Etienne)
8 Add put command that overwrites existing text. Should also work for
blocks. Useful to move text around in a table. Works like using "R ^R r"
for every line.

View File

@@ -1,4 +1,4 @@
*uganda.txt* For Vim version 9.1. Last change: 2025 Nov 13
*uganda.txt* For Vim version 9.1. Last change: 2026 Jan 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -21,7 +21,7 @@ ICCF Holland and Kuwasha~
|Bram| Moolenaar's charity, ICCF Holland, has long supported the education of
children in Uganda through the Kibaale Children's Centre. Following Bram's
passing in 2023, ICCF Holland transfered all activities to its sister charity
passing in 2023, ICCF Holland transferred all activities to its sister charity
Kuwasha in Canada and dissolved at the end of 2025.
Donations from Vim users are still welcome and will continue to go directly to

View File

@@ -1,4 +1,4 @@
*version9.txt* For Vim version 9.1. Last change: 2025 Dec 21
*version9.txt* For Vim version 9.1. Last change: 2026 Jan 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -41727,6 +41727,7 @@ Options: ~
- '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.
- 'fsync' is now a |global-local| option.
Ex commands: ~
- allow to specify a priority when defining a new sign |:sign-define|
@@ -41830,6 +41831,7 @@ Functions: ~
|id()| get unique identifier for a Dict, List, Object,
Channel or Blob variable
|list2tuple()| turn a List of items into a Tuple
|listener_add()| add a callback to listen to changes
|matchbufline()| all the matches of a pattern in a buffer
|matchstrlist()| all the matches of a pattern in a List of strings
|ngettext()| lookup single/plural message translation
@@ -41881,11 +41883,13 @@ Commands: ~
Ex-Commands: ~
|:clipreset| choose a new method for accessing the clipboard
|:iput| like |:put| but adjust indent
|:pbuffer| Edit buffer [N] from the buffer list in the preview
window
|:redrawtabpanel| Force updating the 'tabpanel'.
|:uniq| Deduplicate text in the current buffer.
|:wlrestore| reinitialize the wayland compositor connection
Options: ~
@@ -41904,6 +41908,7 @@ Options: ~
'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
'osctimeoutlen' OSC terminator receive timeout
'pumborder' define popup border and decorations
'pummaxwidth' maximum width for the completion popup menu
'showtabpanel' When to show the |tabpanel|
@@ -41911,12 +41916,12 @@ Options: ~
'tabpanel' Optional vertical panel for displaying tabpages
|tabpanel|
'tabpanelopt' Optional settings for the |tabpanel|
't_xo' Terminal uses XON/XOFF handshaking (e.g. vt420)
't_CF' Support for alternate font highlighting terminal code
't_xo' Terminal uses XON/XOFF handshaking (e.g. vt420)
'winfixbuf' Keep buffer focused in a window
'wlseat' Specify Wayland seat to use for the |wayland| feature
'wlsteal' Steal focus to access the |wayland| clipboard
'wltimeout' Specify the connection timeout for the |wayland|
'wltimeoutlen' Specify the connection timeout for the |wayland|
compositor
Vim Variables: ~
@@ -41924,8 +41929,8 @@ Vim Variables: ~
|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.
|v:t_enumvalue| Value of |enumvalue|.
|v:t_tuple| Value of |Tuple| type.
|v:termda1| The escape sequence returned for the primary device
attribute query (DA1).

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 Nov 11
" Last Change: 2026 Jan 02
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" If the filetype can be detected from extension or file name(the final path component),
@@ -435,7 +435,7 @@ au BufNewFile,BufRead *.app call dist#ft#FTapp()
au BufNewFile,BufRead *esmtprc setf esmtprc
" Fennel
au BufNewFile,BufRead *.fnl,{,.}fennelrc setf fennel
au BufNewFile,BufRead {,.}fennelrc setf fennel
" Flatpak config
au BufNewFile,BufRead */flatpak/repo/config setf dosini
@@ -1127,6 +1127,15 @@ au BufNewFile,BufRead */etc/systemd/system/*.d/.#* setf systemd
au BufNewFile,BufRead */etc/systemd/system/.#* setf systemd
au BufNewFile,BufRead */.config/systemd/user/*.d/.#* setf systemd
au BufNewFile,BufRead */.config/systemd/user/.#* setf systemd
" Podman Quadlet files
au BufNewFile,BufRead */containers/systemd/*.{artifact,build,container,image,kube,network,pod,volume} setf systemd
" Podman Quadlet rootless files not already captured by previous line
au BufNewFile,BufRead */etc/containers/systemd/users/*/*.{artifact,build,container,image,kube,network,pod,volume} setf systemd
au BufNewFile,BufRead */etc/containers/systemd/users/*.{artifact,build,container,image,kube,network,pod,volume} setf systemd
" Podman Quadlet overrides
au BufNewFile,BufRead */containers/systemd/*.d/*.conf setf systemd
au BufNewFile,BufRead */etc/containers/systemd/users/*/*.d/*.conf setf systemd
au BufNewFile,BufRead */etc/containers/systemd/users/*.d/*.conf setf systemd
" Sudoers
au BufNewFile,BufRead */etc/sudoers,sudoers.tmp setf sudoers

View File

@@ -0,0 +1,3 @@
" Placeholder for maximum compatibility. While bicepparam files are treated as distinct filetypes,
" they are should share the same ftplugin settings as bicep files.
runtime! ftplugin/bicep.vim

View File

@@ -0,0 +1,14 @@
" Vim filetype plugin
" Language: Bicep
" Maintainer: Scott McKendry <me@scottmckendry.tech>
" Last Change: 2025 Dec 27
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
setlocal comments=s1:/*,mb:*,ex:*/,://
setlocal commentstring=//\ %s
let b:undo_ftplugin = "setlocal comments< commentstring<"

View File

@@ -72,6 +72,7 @@ deprecated
discontiguous
div
domain_error
consistency_error
duplicated_directives
dynamic
dynamic_declarations
@@ -144,6 +145,7 @@ min
missing_directives
mod
mode
mode_non_terminal
modules
multifile
nl

View File

@@ -1,6 +1,6 @@
" Vim filetype plugin file
" Language: Perl
" Maintainer: vim-perl <vim-perl@googlegroups.com>
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
" Homepage: https://github.com/vim-perl/vim-perl
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
" License: Vim License (see :help license)

View File

@@ -1,6 +1,6 @@
" Vim filetype plugin file
" Language: Perl POD format
" Maintainer: vim-perl <vim-perl@googlegroups.com>
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
" Author: Doug Kearns <dougkearns@gmail.com>
" Homepage: https://github.com/vim-perl/vim-perl
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues

View File

@@ -1,6 +1,6 @@
" Vim filetype plugin file
" Language: Raku
" Maintainer: vim-perl <vim-perl@googlegroups.com>
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
" Homepage: https://github.com/Raku/vim-raku
" Bugs/requests: https://github.com/Raku/vim-raku/issues
" Last Change: 2021 Apr 16

View File

@@ -1,6 +1,6 @@
" Vim filetype plugin file
" Language: Verbose TAP Output
" Maintainer: vim-perl <vim-perl@googlegroups.com>
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
" Homepage: https://github.com/vim-perl/vim-perl
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
" License: Vim License (see :help license)

View File

@@ -1,6 +1,6 @@
" Vim filetype plugin file
" Language: TT2 embedded with HTML
" Maintainer: vim-perl <vim-perl@googlegroups.com>
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
" Homepage: https://github.com/vim-perl/vim-perl
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
" License: Vim License (see :help license)

View File

@@ -1,12 +1,11 @@
" Vim filetype plugin file
" Language: xml
" Maintainer: Christian Brabandt <cb@256bit.org>
" Last Changed: Dec 07th, 2018
" 2024 Jan 14 by Vim Project (browsefilter)
" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
" Repository: https://github.com/chrisbra/vim-xml-ftplugin
" Previous Maintainer: Dan Sharp
" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin
" Last Changed: 2024 May 24
" Repository: https://github.com/chrisbra/vim-xml-ftplugin
" Previously
" Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net>
" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin
if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1
@@ -54,12 +53,8 @@ command! -nargs=? XMLent call xmlcomplete#CreateEntConnection(<f-args>)
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter="XML Files (*.xml)\t*.xml\n" .
\ "DTD Files (*.dtd)\t*.dtd\n" .
\ "XSD Files (*.xsd)\t*.xsd\n"
if has("win32")
let b:browsefilter .= "All Files (*.*)\t*\n"
else
let b:browsefilter .= "All Files (*)\t*\n"
endif
\ "XSD Files (*.xsd)\t*.xsd\n" .
\ "All Files (*.*)\t*.*\n"
endif
" Undo the stuff we changed.

View File

@@ -1,6 +1,6 @@
" Vim filetype plugin file
" Language: XS (Perl extension interface language)
" Maintainer: vim-perl <vim-perl@googlegroups.com>
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
" Homepage: https://github.com/vim-perl/vim-perl
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
" License: Vim License (see :help license)

View File

@@ -2,11 +2,9 @@
" Language: Zsh shell script
" Maintainer: Christian Brabandt <cb@256bit.org>
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2024 Sep 19
" Latest Revision: 2025 Jul 23
" License: Vim (see :h license)
" Repository: https://github.com/chrisbra/vim-zsh
" Last Change:
" 2025 Jul 23 by Vim Project (use :hor term #17822)
if exists("b:did_ftplugin")
finish
@@ -20,9 +18,14 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
let b:undo_ftplugin = "setl com< cms< fo< "
if get(g:, 'zsh_fold_enable', 0)
setlocal foldmethod=syntax
let b:undo_ftplugin .= "fdm< "
endif
if executable('zsh') && &shell !~# '/\%(nologin\|false\)$'
if exists(':terminal') == 2
command! -buffer -nargs=1 ZshKeywordPrg silent exe ':hor term zsh -c "autoload -Uz run-help; run-help <args>"'
command! -buffer -nargs=1 ZshKeywordPrg silent exe ':hor :term zsh -c "autoload -Uz run-help; run-help <args>"'
else
command! -buffer -nargs=1 ZshKeywordPrg echo system('MANPAGER= zsh -c "autoload -Uz run-help; run-help <args> 2>/dev/null"')
endif

View File

@@ -0,0 +1,19 @@
" Vim indent file
" Language: bpftrace
" Author: Stanislaw Gruszka <stf_xl@wp.pl>
" Last Change: 2025 Dec 27
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
setlocal noautoindent nosmartindent
setlocal cindent
setlocal cinoptions=+0,(0,[0,Ws,J1,j1,m1,>s
setlocal cinkeys=0{,0},!^F,o,O,#0
setlocal cinwords=
let b:undo_indent = "setlocal autoindent< smartindent< cindent< cinoptions< cinkeys< cinwords<"

View File

@@ -1,6 +1,6 @@
" Vim indent file
" Language: Perl
" Maintainer: vim-perl <vim-perl@googlegroups.com>
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
" Homepage: https://github.com/vim-perl/vim-perl
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
" License: Vim License (see :help license)

View File

@@ -1,6 +1,6 @@
" Vim indent file
" Language: Perl 6
" Maintainer: vim-perl <vim-perl@googlegroups.com>
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
" Homepage: https://github.com/vim-perl/vim-perl
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
" Last Change: 2020 Apr 15

View File

@@ -2,7 +2,9 @@
" Language: Rust
" Author: Chris Morgan <me@chrismorgan.info>
" Last Change: 2023-09-11
" 2024 Jul 04 by Vim Project: use shiftwidth() instead of hard-coding shifted values (#15138)
" 2024 Jul 04 by Vim Project: use shiftwidth() instead of hard-coding shifted values #15138
" 2025 Dec 29 by Vim Project: clean up
" 2025 Dec 31 by Vim Project: correcly indent after nested array literal #19042
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
" Note: upstream seems umaintained: https://github.com/rust-lang/rust.vim/issues/502
@@ -86,16 +88,6 @@ function! s:is_string_comment(lnum, col)
endif
endfunction
if exists('*shiftwidth')
function! s:shiftwidth()
return shiftwidth()
endfunc
else
function! s:shiftwidth()
return &shiftwidth
endfunc
endif
function GetRustIndent(lnum)
" Starting assumption: cindent (called at the end) will do it right
" normally. We just want to fix up a few cases.
@@ -204,6 +196,22 @@ function GetRustIndent(lnum)
endif
endif
" Prevent cindent from becoming confused when pairing square brackets, as
" in
"
" let arr = [[u8; 4]; 2] = [
" [0; 4],
" [1, 3, 5, 9],
" ];
" | ← indentation placed here
"
" for which it calculates too much indentation in the line following the
" close of the array.
if prevline =~# '^\s*\]' && l:last_prevline_character ==# ';'
\ && line !~# '^\s*}'
return indent(prevlinenum)
endif
if l:last_prevline_character ==# ","
\ && s:get_line_trimmed(a:lnum) !~# '^\s*[\[\]{})]'
\ && prevline !~# '^\s*fn\s'
@@ -240,43 +248,6 @@ function GetRustIndent(lnum)
return indent(prevlinenum)
endif
if !has("patch-7.4.355")
" cindent before 7.4.355 doesn't do the module scope well at all; e.g.::
"
" static FOO : &'static [bool] = [
" true,
" false,
" false,
" true,
" ];
"
" uh oh, next statement is indented further!
" Note that this does *not* apply the line continuation pattern properly;
" that's too hard to do correctly for my liking at present, so I'll just
" start with these two main cases (square brackets and not returning to
" column zero)
call cursor(a:lnum, 1)
if searchpair('{\|(', '', '}\|)', 'nbW',
\ 's:is_string_comment(line("."), col("."))') == 0
if searchpair('\[', '', '\]', 'nbW',
\ 's:is_string_comment(line("."), col("."))') == 0
" Global scope, should be zero
return 0
else
" At the module scope, inside square brackets only
"if getline(a:lnum)[0] == ']' || search('\[', '', '\]', 'nW') == a:lnum
if line =~# "^\\s*]"
" It's the closing line, dedent it
return 0
else
return shiftwidth()
endif
endif
endif
endif
" Fall back on cindent, which does it mostly right
return cindent(a:lnum)
endfunction

View File

@@ -0,0 +1,42 @@
// vim: set ft=rust ts=8 sw=4 sts=4 et :
// START_INDENT
use std::fs::File;
use std::io::prelude::*;
use std::path::Path;
fn main() {
// Create a path to the desired file
let path = Path::new("hello.txt");
let display = path.display();
// Open the path in read-only mode, returns `io::Result<File>`
let mut file = match File::open(&path) {
Err(why) => panic!("couldn't open {}: {}", display, why),
Ok(file) => file,
};
// Start doing nothing forever
loop {
let arr1 = [[u8; 4]; 2] = [
[0; 4],
[1, 3, 5, 9],
];
}
// Plan for a future that will never come
let arr2 = [[u8; 4]; 2] = [
[1; 4],
[2, 4, 6, 8],
];
let arr2_ref = &arr2;
// Read the file contents into a string, returns `io::Result<usize>`
let mut s = String::new();
match file.read_to_string(&mut s) {
Err(why) => panic!("couldn't read {}: {}", display, why),
Ok(_) => print!("{} contains:\n{}", display, s),
}
// file goes out of scope, and the "hello.txt" file gets closed
}
// END_INDENT

View File

@@ -0,0 +1,42 @@
// vim: set ft=rust ts=8 sw=4 sts=4 et :
// START_INDENT
use std::fs::File;
use std::io::prelude::*;
use std::path::Path;
fn main() {
// Create a path to the desired file
let path = Path::new("hello.txt");
let display = path.display();
// Open the path in read-only mode, returns `io::Result<File>`
let mut file = match File::open(&path) {
Err(why) => panic!("couldn't open {}: {}", display, why),
Ok(file) => file,
};
// Start doing nothing forever
loop {
let arr1 = [[u8; 4]; 2] = [
[0; 4],
[1, 3, 5, 9],
];
}
// Plan for a future that will never come
let arr2 = [[u8; 4]; 2] = [
[1; 4],
[2, 4, 6, 8],
];
let arr2_ref = &arr2;
// Read the file contents into a string, returns `io::Result<usize>`
let mut s = String::new();
match file.read_to_string(&mut s) {
Err(why) => panic!("couldn't read {}: {}", display, why),
Ok(_) => print!("{} contains:\n{}", display, s),
}
// file goes out of scope, and the "hello.txt" file gets closed
}
// END_INDENT

View File

@@ -18,3 +18,11 @@ map: |
line1
line2
# END_INDENT
# START_INDENT
list:
- element1:
foo: bar
- element2:
foo: bar
# END_INDENT

View File

@@ -18,3 +18,11 @@ map: |
line1
line2
# END_INDENT
# START_INDENT
list:
- element1:
foo: bar
- element2:
foo: bar
# END_INDENT

View File

@@ -88,7 +88,9 @@ endfun
" [-- return the sum of indents of a:lnum --]
fun! <SID>XmlIndentSum(line, style, add)
if <SID>IsXMLContinuation(a:line) && a:style == 0 && !<SID>IsXMLEmptyClosingTag(a:line)
if <SID>IsXMLContinuation(a:line) &&
\ a:style == 0 &&
\ !<SID>IsXMLEmptyClosingTag(a:line)
" no complete tag, add one additional indent level
" but only for the current line
return a:add + shiftwidth()
@@ -157,6 +159,17 @@ fun! XmlIndentGet(lnum, use_syntax_check)
" no extra indent, looks like a text continuation line
return pind
endif
elseif empty(syn_name_start) && syn_name_end =~? 'xmlTag'
" Special case: such a line, shouldn't be indented, just because it
" ends with a tag
" 'foobar <i>inline tags</i>'
if (match(curline, '<\([:a-zA-Z_]\+\)[^>]*>.*</\1>') > -1)
return pind
endif
endif
if curline =~ '^\s*</[a-zA-Z_]>'
return <SID>ReturnIndentForMatchingTag(curline)
endif
" Get indent from previous tag line
@@ -181,6 +194,21 @@ func! <SID>IsXMLEmptyClosingTag(line)
return a:line =~? '<[^>]*/>\s*$'
endfunc
func! <SID>ReturnIndentForMatchingTag(line)
" For a line with just a simple closing tag
" get the indent from a matching opening tag
if a:line =~? '^\s*</[a-z_]*>'
let _c = getcursorpos()
let pat = matchstr(a:line, '^\s*</\zs[a-z_]\+\ze>')
" position cursor before the opening tag
norm! 0
" get the indent from the matching opening tag
let match_line = searchpair('<' .. pat .. '>', '', '</' .. pat .. '>', 'bn')
call setpos('.', _c)
return indent(match_line)
endif
endfunc
" return indent for a commented line,
" the middle part might be indented one additional level
func! <SID>XmlIndentComment(lnum)

View File

@@ -5,6 +5,7 @@
" Last Change: 2022 Jun 17
" 2024 Feb 29 by Vim project: disable mulitline indent by default
" 2024 Aug 14 by Vim project: fix re-indenting when commenting out lines
" 2026 Jan 08 by Vim project: fix object indentation in array
" Only load this indent file when no other was loaded.
if exists('b:did_indent')
@@ -114,7 +115,13 @@ function GetYAMLIndent(lnum)
"
" - |-
" Block scalar without indentation indicator
return previndent+shiftwidth()
if prevline =~# '^\s*-\s.*:$'
" Special case: list item with mapping key (- key:)
" Need to account for the "- " prefix
return previndent + 2 + shiftwidth()
else
return previndent+shiftwidth()
endif
elseif prevline =~# '\v[:-]\ [|>]%(\d+[+\-]?|[+\-]?\d+)%(\#.*|\s*)$'
" - |+2
" block scalar with indentation indicator
@@ -136,7 +143,10 @@ function GetYAMLIndent(lnum)
let prevmapline = s:FindPrevLEIndentedLineMatchingRegex(a:lnum,
\ s:mapkeyregex)
if getline(prevmapline) =~# '^\s*- '
return indent(prevmapline) + 2
" Previous mapping key is in a list item (- key:)
" The key effectively starts at indent + 2 (after "- ")
" Content under it should be indented relative to the key position
return indent(prevmapline) + 2 + shiftwidth()
else
return indent(prevmapline)
endif

View File

@@ -2,15 +2,14 @@
" Maintainer: Restorer, <restorer@mail2k.ru>
" Previous Maintainer: Sergey Alyoshin, <alyoshin.s@gmail.com>
" vassily ragosin, <vrr[at]users.sourceforge.net>
" Last Change: 23 Aug 2023
" Generated from menu_ru_ru.utf-8.vim, DO NOT EDIT
" Last Change: 28 Dec 2025
" URL: https://github.com/RestorerZ/RuVim
"
"
" Adopted for RuVim project by Vassily Ragosin.
" First translation: Tim Alexeevsky, <realtim [at] mail.ru>,
" based on ukrainian translation by Bohdan Vlasyuk, <bohdan@vstu.edu.ua>
"
" Generated from menu_ru_ru.utf-8.vim, DO NOT EDIT
"
" Quit when menu translations have already been done.
"
@@ -44,7 +43,7 @@ menutrans &Find\.\.\. &
"--------------------
menutrans &Credits Ñî&àâòîðû
menutrans Co&pying &Ëèöåíçèÿ
menutrans &Sponsor/Register Ñîä&åéñòâèå\ è\ ðåãèñòðàöèÿ
menutrans &Sponsor Ñîä&åéñòâèå\ ïðîåêòó
menutrans O&rphans &Áëàãîòâîðèòåëüíîñòü
"--------------------
menutrans &Version &Òåêóùàÿ\ âåðñèÿ
@@ -264,7 +263,7 @@ menutrans Cu&t &
menutrans &Copy &Êîïèðîâàòü
menutrans &Paste Âñò&àâèòü
menutrans &Delete &Óäàëèòü
menutrans Select\ Blockwise Áëîêîâîå\ âûäåëåíèå
menutrans Select\ Blockwise Áëî÷íîå\ âûäåëåíèå
menutrans Select\ &Word Âûäåëèòü\ ñ&ëîâî
menutrans Select\ &Line Âûäåëèòü\ ñ&òðîêó
menutrans Select\ &Block Âûäåëèòü\ &áëîê
@@ -347,7 +346,7 @@ let menutrans_no_file = "[
" Menus to handle Russian encodings
" Thanks to Pavlo Bohmat for the idea
" vassily ragosin <vrr[at]users.sourceforge.net>
" vassily ragosin, <vrr[at]users.sourceforge.net>
"
an 10.355 &File.-SEP- <Nop>
an 10.360.20 &File.Îòêðûòü\ â\ êîäèðîâêå\.\.\..CP1251 :browse e ++enc=cp1251<CR>

View File

@@ -2,15 +2,14 @@
" Maintainer: Restorer, <restorer@mail2k.ru>
" Previous Maintainer: Sergey Alyoshin, <alyoshin.s@gmail.com>
" vassily ragosin, <vrr[at]users.sourceforge.net>
" Last Change: 23 Aug 2023
" Generated from menu_ru_ru.utf-8.vim, DO NOT EDIT
" Last Change: 28 Dec 2025
" URL: https://github.com/RestorerZ/RuVim
"
"
" Adopted for RuVim project by Vassily Ragosin.
" First translation: Tim Alexeevsky, <realtim [at] mail.ru>,
" based on ukrainian translation by Bohdan Vlasyuk, <bohdan@vstu.edu.ua>
"
" Generated from menu_ru_ru.utf-8.vim, DO NOT EDIT
"
" Quit when menu translations have already been done.
"
@@ -44,7 +43,7 @@ menutrans &Find\.\.\. &
"--------------------
menutrans &Credits óÏ&Á×ÔÏÒÙ
menutrans Co&pying &ìÉÃÅÎÚÉÑ
menutrans &Sponsor/Register óÏÄ&ÅÊÓÔ×ÉÅ\ É\ ÒÅÇÉÓÔÒÁÃÉÑ
menutrans &Sponsor óÏÄ&ÅÊÓÔ×ÉÅ\ ÐÒÏÅËÔÕ
menutrans O&rphans &âÌÁÇÏÔ×ÏÒÉÔÅÌØÎÏÓÔØ
"--------------------
menutrans &Version &ôÅËÕÝÁÑ\ ×ÅÒÓÉÑ
@@ -264,7 +263,7 @@ menutrans Cu&t &
menutrans &Copy &ëÏÐÉÒÏ×ÁÔØ
menutrans &Paste ÷ÓÔ&Á×ÉÔØ
menutrans &Delete &õÄÁÌÉÔØ
menutrans Select\ Blockwise âÌÏËÏ×ÏÅ\ ×ÙÄÅÌÅÎÉÅ
menutrans Select\ Blockwise âÌÏÞÎÏÅ\ ×ÙÄÅÌÅÎÉÅ
menutrans Select\ &Word ÷ÙÄÅÌÉÔØ\ Ó&ÌÏ×Ï
menutrans Select\ &Line ÷ÙÄÅÌÉÔØ\ Ó&ÔÒÏËÕ
menutrans Select\ &Block ÷ÙÄÅÌÉÔØ\ &ÂÌÏË
@@ -347,7 +346,7 @@ let menutrans_no_file = "[
" Menus to handle Russian encodings
" Thanks to Pavlo Bohmat for the idea
" vassily ragosin <vrr[at]users.sourceforge.net>
" vassily ragosin, <vrr[at]users.sourceforge.net>
"
an 10.355 &File.-SEP- <Nop>
an 10.360.20 &File.ïÔËÒÙÔØ\ ×\ ËÏÄÉÒÏ×ËÅ\.\.\..CP1251 :browse e ++enc=cp1251<CR>

View File

@@ -2,15 +2,14 @@
" Maintainer: Restorer, <restorer@mail2k.ru>
" Previous Maintainer: Sergey Alyoshin, <alyoshin.s@gmail.com>
" vassily ragosin, <vrr[at]users.sourceforge.net>
" Last Change: 23 Aug 2023
" Original translations
" Last Change: 28 Dec 2025
" URL: https://github.com/RestorerZ/RuVim
"
"
" Adopted for RuVim project by Vassily Ragosin.
" First translation: Tim Alexeevsky, <realtim [at] mail.ru>,
" based on ukrainian translation by Bohdan Vlasyuk, <bohdan@vstu.edu.ua>
"
" Original translations
"
" Quit when menu translations have already been done.
"
@@ -44,7 +43,7 @@ menutrans &Find\.\.\. &Найти\.\.\.
"--------------------
menutrans &Credits Со&авторы
menutrans Co&pying &Лицензия
menutrans &Sponsor/Register Сод&ействие\ и\ регистрация
menutrans &Sponsor Сод&ействие\ проекту
menutrans O&rphans &Благотворительность
"--------------------
menutrans &Version &Текущая\ версия
@@ -264,7 +263,7 @@ menutrans Cu&t &Вырезать
menutrans &Copy &Копировать
menutrans &Paste Вст&авить
menutrans &Delete &Удалить
menutrans Select\ Blockwise Блоковое\ выделение
menutrans Select\ Blockwise Блочное\ выделение
menutrans Select\ &Word Выделить\ с&лово
menutrans Select\ &Line Выделить\ с&троку
menutrans Select\ &Block Выделить\ &блок
@@ -347,7 +346,7 @@ let menutrans_no_file = "[Безымянный]"
" Menus to handle Russian encodings
" Thanks to Pavlo Bohmat for the idea
" vassily ragosin <vrr[at]users.sourceforge.net>
" vassily ragosin, <vrr[at]users.sourceforge.net>
"
an 10.355 &File.-SEP- <Nop>
an 10.360.20 &File.Открыть\ в\ кодировке\.\.\..CP1251 :browse e ++enc=cp1251<CR>

View File

@@ -16,6 +16,7 @@
" 2025 Nov 13 by Vim Project don't wipe unnamed buffers #18740
" 2025 Nov 18 by Vim Project use UNC paths when using scp and Windows paths #18764
" 2025 Nov 28 by Vim Project fix undefined variable in *NetrwMenu #18829
" 2025 Dec 26 by Vim Project fix use of g:netrw_cygwin #19015
" 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
@@ -213,7 +214,7 @@ call s:NetrwInit("g:netrw_dirhistmax" , 10)
call s:NetrwInit("g:netrw_fastbrowse" , 1)
call s:NetrwInit("g:netrw_ftp_browse_reject", '^total\s\+\d\+$\|^Trying\s\+\d\+.*$\|^KERBEROS_V\d rejected\|^Security extensions not\|No such file\|: connect to address [0-9a-fA-F:]*: No route to host$')
if !exists("g:netrw_ftp_list_cmd")
if has("unix") || (exists("g:netrw_cygwin") && g:netrw_cygwin)
if has("unix") || g:netrw_cygwin
let g:netrw_ftp_list_cmd = "ls -lF"
let g:netrw_ftp_timelist_cmd = "ls -tlF"
let g:netrw_ftp_sizelist_cmd = "ls -slF"
@@ -320,7 +321,7 @@ call s:NetrwInit("g:netrw_menu" , 1)
call s:NetrwInit("g:netrw_mkdir_cmd" , g:netrw_ssh_cmd." USEPORT HOSTNAME mkdir")
call s:NetrwInit("g:netrw_mousemaps" , (exists("+mouse") && &mouse =~# '[anh]'))
call s:NetrwInit("g:netrw_retmap" , 0)
if has("unix") || (exists("g:netrw_cygwin") && g:netrw_cygwin)
if has("unix") || g:netrw_cygwin
call s:NetrwInit("g:netrw_chgperm" , "chmod PERM FILENAME")
elseif has("win32")
call s:NetrwInit("g:netrw_chgperm" , "cacls FILENAME /e /p PERM")
@@ -442,7 +443,7 @@ function netrw#Explore(indx,dosplit,style,...)
" record current directory
let curdir = simplify(b:netrw_curdir)
if !exists("g:netrw_cygwin") && has("win32")
if !g:netrw_cygwin && has("win32")
let curdir= substitute(curdir,'\','/','g')
endif
let curfiledir = substitute(expand("%:p"),'^\(.*[/\\]\)[^/\\]*$','\1','e')
@@ -520,7 +521,7 @@ function netrw#Explore(indx,dosplit,style,...)
NetrwKeepj norm! 0
if a:0 > 0
if a:1 =~ '^\~' && (has("unix") || (exists("g:netrw_cygwin") && g:netrw_cygwin))
if a:1 =~ '^\~' && (has("unix") || g:netrw_cygwin)
let dirname= simplify(substitute(a:1,'\~',expand("$HOME"),''))
elseif a:1 == '.'
let dirname= simplify(exists("b:netrw_curdir")? b:netrw_curdir : getcwd())
@@ -3234,7 +3235,7 @@ function s:NetrwFile(fname)
let b:netrw_curdir= getcwd()
endif
if !exists("g:netrw_cygwin") && has("win32")
if !g:netrw_cygwin && has("win32")
if fname =~ '^\' || fname =~ '^\a:\'
" windows, but full path given
let ret= fname

View File

@@ -12,7 +12,7 @@ enddef
var sent_message: bool = false
def OSCMessage(id: number)
echom "Waiting for OSC52 response... Press CTRL-C to cancel"
echo "Waiting for OSC52 response... Press CTRL-C to cancel"
sent_message = true
enddef
@@ -20,7 +20,7 @@ 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", [""])
return ("c", [])
endif
# Some terminals like Kitty respect the selection type parameter on both X11

View File

@@ -4,7 +4,7 @@ vim9script
# Author: Bram Moolenaar
# Copyright: Vim license applies, see ":help license"
# Last Change: 2025 Oct 08
# Last Change: 2025 Dec 26
# Converted to Vim9: Ubaldo Tiberi <ubaldo.tiberi@gmail.com>
# WORK IN PROGRESS - The basics works stable, more to come
@@ -454,7 +454,7 @@ def GetRemotePtyCmd(gdb_cmd: list<string>): list<string>
term_cmd = gdb_cmd[0 : gdb_pos - 1]
# roundtrip to check if socat is available on the remote side
silent call system(join(term_cmd, ' ') .. ' socat -h')
if v:shell_error
if v:shell_error != 0
Echowarn('Install socat on the remote machine for a program window better experience')
else
# create a devoted tty slave device and link to stdin/stdout

View File

@@ -2,7 +2,7 @@
" Language: Cangjie
" Maintainer: Wu Junkai <wu.junkai@qq.com>
" URL: https://github.com/WuJunkai2004/cangjie.vim
" Last Change: 2025 Oct 12
" Last Change: 2026 Jan 5
"
" The Cangjie programming language is a new-generation programming
" language oriented to full-scenario intelligence. It features
@@ -33,9 +33,13 @@ endfunction
syn case match
" 1. comments
syn keyword cangjieTodo TODO FIXME XXX NOTE BUG contained
syn match cangjieComment /\v\/\/.*/ contains=cangjieTodo
syn region cangjieComment start=/\/\*/ end=/\*\// contains=cangjieTodo,@Spell
syn keyword cangjieTodo TODO FIXME XXX NOTE BUG contained
syn match cangjieDocKeyword /\v\c\@(brief|param|return|note|warning|deprecated)/ contained
syn match cangjieDocKeyword /\v\c\@(author|version|date|since|file|copyright)/ contained
syn match cangjieDocKeyword /\v\c\@(details|link|see|throws|exception|example)/ contained
syn match cangjieDocKeyword /\v\c\@(private|protected|public|internal)/ contained
syn match cangjieComment /\v\/\/.*/ contains=cangjieTodo,cangjieDocKeyword
syn region cangjieComment start=/\/\*/ end=/\*\// contains=cangjieTodo,cangjieDocKeyword,@spell
" 2. keywords
syn keyword cangjieDeclaration abstract extend macro foreign
@@ -65,27 +69,48 @@ syn match cangjieTypeName /\h\w*/ contained
syn region cangjieSpIdentifier start=/`/ end=/`/ oneline
" 6. types
syn keyword cangjieSpType Any Nothing Range Unit Iterable
syn keyword cangjieArrayType Array ArrayList VArray
syn keyword cangjieHashType HashMap HashSet
syn keyword cangjieSpType Nothing Range Unit LibC Duration DefaultHasher
syn keyword cangjieArrayType Array VArray
syn keyword cangjieCommonType Bool Byte Rune String
syn keyword cangjieFloatType Float16 Float32 Float64
syn keyword cangjieIntType Int8 Int16 Int32 Int64 IntNative
syn keyword cangjieUIntType UInt8 UInt16 UInt32 UInt64 UIntNative
syn keyword cangjieIntType Int Int8 Int16 Int32 Int64 IntNative
syn keyword cangjieUIntType UInt UInt8 UInt16 UInt32 UInt64 UIntNative
syn keyword cangjieFFIType CPointer CPointerHandle CPointerResource CString CStringResource
syn cluster cangjieTypeCluster contains=
\ cangjieSpType,
\ cangjieArrayType,
\ cangjieHashType,
\ cangjieCommonType,
\ cangjieFloatType,
\ cangjieIntType,
\ cangjieUIntType
\ cangjieUIntType,
\ cangjieFFIType
" 6.1. builtin function/interface/class
syn keyword cangjieCoreFunc acquireArrayRawData alignOf eprint eprintln ifNone ifSome max min
syn keyword cangjieCoreFunc print println readln refEq releaseArrayRawData sizeOf sleep zeroValue
syn keyword cangjieCoreItf Any Hasher ThreadContext Countable Collection Less Greater
syn keyword cangjieCoreItf LessOrEqual GreaterOrEqual Comparable Equal NotEqual Equatable
syn keyword cangjieCoreItf Hashable Iterable Resource ToString CType
syn keyword cangjieCoreClass ArrayIterator Box Future Iterator Object RangeIterator
syn keyword cangjieCoreClass StackTraceElement StringBuilder Thread ThreadLocal
syn keyword cangjieCoreError ArithmeticException Error Exception IllegalArgumentException
syn keyword cangjieCoreError IllegalFormatException IllegalMemoryException IllegalStateException
syn keyword cangjieCoreError IncompatiblePackageException IndexOutOfBoundsException InternalError
syn keyword cangjieCoreError NegativeArraySizeException NoneValueException OutOfMemoryError
syn keyword cangjieCoreError OverflowException SpawnException StackOverflowError
syn keyword cangjieCoreError TimeoutException UnsupportedException
syn cluster cangjieBuiltinCluster contains=
\ cangjieCoreFunc,
\ cangjieCoreItf,
\ cangjieCoreClass,
\ cangjieCoreError
" 7. character and strings
syn cluster cangjieInterpolatedPart contains=
\ @cangjieKeywordCluster,
\ cangjieSpIdentifier,
\ @cangjieTypeCluster,
\ @cangjieBuiltinCluster,
\ @cangjieNumberCluster,
\ cangjieOperator
syn region cangjieInterpolation contained keepend start=/\${/ end=/}/ contains=@cangjieInterpolatedPart
@@ -139,6 +164,7 @@ syn region cangjieFoldBrackets transparent fold start='\[' end='\]' contains=ALL
" finally, link the syntax groups to the highlight groups
if s:enabled('comment')
hi def link cangjieTodo Todo
hi def link cangjieDocKeyword SpecialComment
hi def link cangjieComment Comment
endif
if s:enabled('identifier')
@@ -151,6 +177,12 @@ if s:enabled('keyword')
hi def link cangjieVariable Keyword
hi def link cangjieOption Keyword
endif
if s:enabled('builtin')
hi def link cangjieCoreFunc Function
hi def link cangjieCoreItf Type
hi def link cangjieCoreClass Type
hi def link cangjieCoreError Structure
endif
if s:enabled('macro')
hi def link cangjieMacro PreProc
endif
@@ -178,11 +210,11 @@ if s:enabled('type')
hi def link cangjieTypeName Type
hi def link cangjieSpType Type
hi def link cangjieArrayType Type
hi def link cangjieHashType Type
hi def link cangjieCommonType Type
hi def link cangjieFloatType Type
hi def link cangjieIntType Type
hi def link cangjieUIntType Type
hi def link cangjieFFIType Type
endif
let b:current_syntax = "cangjie"

View File

@@ -1,9 +1,11 @@
" Vim syntax file
" Language: C++
" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
" Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
" Maintainer: This runtime file is looking for a new maintainer.
" Previous Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
" Ken Shan <ccshan@post.harvard.edu>
" Last Change: 2024 May 04
" 2024 May 04 by Vim Project (fix digit separator in octals and floats)
" 2026 Jan 06 by Vim Project (announce adoption)
" quit when a syntax file was already loaded
if exists("b:current_syntax")

View File

@@ -1,6 +1,7 @@
" Vim syntax file
" Language: Haskell
" Maintainer: Haskell Cafe mailinglist <haskell-cafe@haskell.org>
" (need to be subscribed to post)
" 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>

View File

@@ -3,6 +3,7 @@
" Markdown style, TeX style and plain text surrounding
" \begin{code} \end{code} blocks
" Maintainer: Haskell Cafe mailinglist <haskell-cafe@haskell.org>
" (need to be subscribed to post)
" Original Author: Arthur van Leeuwen <arthurvl@cs.uu.nl>
" Last Change: 2020 Feb 25
" Version: 1.05

View File

@@ -2,7 +2,7 @@
"
" Language: Logtalk
" Maintainer: Paulo Moura <pmoura@logtalk.org>
" Last Change: December 16, 2023
" Last Change: October 6, 2025
@@ -37,7 +37,7 @@ syn region logtalkAtom start=+'+ skip=+\\'+ end=+'+ contains=logtalkEscapeSequ
syn match logtalkEscapeSequence contained "\\\([\\abfnrtv\"\']\|\(x[a-fA-F0-9]\+\|[0-7]\+\)\\\)"
" Logtalk message sending operators
" Logtalk message-sending operators
syn match logtalkOperator "::"
syn match logtalkOperator "\(0'\)\@<!:"
@@ -85,6 +85,7 @@ syn region logtalkDir matchgroup=logtalkDirTag start=":- encoding(" matchgroup
syn region logtalkDir matchgroup=logtalkDirTag start=":- initialization(" matchgroup=logtalkDirTag end=")\." contains=ALL
syn region logtalkDir matchgroup=logtalkDirTag start=":- info(" matchgroup=logtalkDirTag end=")\." contains=ALL
syn region logtalkDir matchgroup=logtalkDirTag start=":- mode(" matchgroup=logtalkDirTag end=")\." contains=logtalkOperator, logtalkAtom
syn region logtalkDir matchgroup=logtalkDirTag start=":- mode_non_terminal(" matchgroup=logtalkDirTag end=")\." contains=logtalkOperator, logtalkAtom
syn region logtalkDir matchgroup=logtalkDirTag start=":- dynamic(" matchgroup=logtalkDirTag end=")\." contains=ALL
syn match logtalkDirTag ":- built_in\."
syn match logtalkDirTag ":- dynamic\."
@@ -189,7 +190,7 @@ syn match logtalkOperator "-->"
syn match logtalkOperator "->"
syn match logtalkKeyword "\<throw\ze("
syn match logtalkKeyword "\<\(instantiation\|system\)_error\>"
syn match logtalkKeyword "\<\(uninstantiation\|type\|domain\|existence\|permission\|representation\|evaluation\|resource\|syntax\)_error\ze("
syn match logtalkKeyword "\<\(uninstantiation\|type\|domain\|consistency\|existence\|permission\|representation\|evaluation\|resource\|syntax\)_error\ze("
" Term unification

View File

@@ -7,6 +7,8 @@
" 2025 Apr 15 by Vim project: rework Make flavor detection (#17089)
" 2025 Oct 12 by Vim project: update makeDefine highlighting (#18403)
" 2025 Oct 25 by Vim project: update makeTargetinDefine highlighting (#18570)
" 2025 Dec 23 by Vim project: fix too greedy match (#18938)
" 2025 Dec 23 by Vim project: wrong highlight with paranthesis inside quotes (#18818)
" quit when a syntax file was already loaded
if exists("b:current_syntax")
@@ -40,21 +42,21 @@ syn match makeIdent "\$\$\w*"
syn match makeIdent "\$\$\$\$\w*" containedin=makeDefine
syn match makeIdent "\$[^({]"
syn match makeIdent "\$\$[^({]" containedin=makeDefine
if get(b:, 'make_flavor', s:make_flavor) == 'microsoft'
syn region makeIdent start="\$(" end=")" contains=makeStatement,makeIdent,makeDString,makeSString
syn region makeIdent start="\${" end="}" contains=makeStatement,makeIdent,makeDString,makeSString
syn region makeIdent start="\$\$(" end=")" containedin=makeDefine contains=makeStatement,makeIdent,makeDString,makeSString
syn region makeIdent start="\$\${" end="}" containedin=makeDefine contains=makeStatement,makeIdent,makeDString,makeSString
else
syn region makeIdent start="\$(" skip="\\)\|\\\\" end=")" contains=makeStatement,makeIdent,makeDString,makeSString
syn region makeIdent start="\${" skip="\\}\|\\\\" end="}" contains=makeStatement,makeIdent,makeDString,makeSString
syn region makeIdent start="\$\$(" skip="\\)\|\\\\" end=")" containedin=makeDefine contains=makeStatement,makeIdent,makeDString,makeSString
syn region makeIdent start="\$\${" skip="\\}\|\\\\" end="}" containedin=makeDefine contains=makeStatement,makeIdent,makeDString,makeSString
endif
syn match makeIdent "^ *[^:#= \t]*\s*[:+?!*]="me=e-2
syn match makeIdent "^ *[^:#= \t]*\s*::="me=e-3
syn match makeIdent "^ *[^:#= \t]*\s*="me=e-1
syn match makeIdent "%"
if get(b:, 'make_flavor', s:make_flavor) == 'microsoft'
syn region makeIdent start="\$(" end=")" contains=makeStatement,makeIdent
syn region makeIdent start="\${" end="}" contains=makeStatement,makeIdent
syn region makeIdent start="\$\$(" end=")" containedin=makeDefine contains=makeStatement,makeIdent
syn region makeIdent start="\$\${" end="}" containedin=makeDefine contains=makeStatement,makeIdent
else
syn region makeIdent start="\$(" skip="\\)\|\\\\" end=")" contains=makeStatement,makeIdent
syn region makeIdent start="\${" skip="\\}\|\\\\" end="}" contains=makeStatement,makeIdent
syn region makeIdent start="\$\$(" skip="\\)\|\\\\" end=")" containedin=makeDefine contains=makeStatement,makeIdent
syn region makeIdent start="\$\${" skip="\\}\|\\\\" end="}" containedin=makeDefine contains=makeStatement,makeIdent
endif
" Makefile.in variables
syn match makeConfig "@[A-Za-z0-9_]\+@"

View File

@@ -1,6 +1,6 @@
" Vim syntax file
" Language: Mason (Perl embedded in HTML)
" Maintainer: vim-perl <vim-perl@googlegroups.com>
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
" Homepage: https://github.com/vim-perl/vim-perl
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
" License: Vim License (see :help license)

View File

@@ -1,6 +1,6 @@
" Vim syntax file
" Language: Perl
" Maintainer: vim-perl <vim-perl@googlegroups.com>
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
" Homepage: https://github.com/vim-perl/vim-perl
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
" License: Vim License (see :help license)

View File

@@ -1,6 +1,6 @@
" Vim syntax file
" Language: Perl POD format
" Maintainer: vim-perl <vim-perl@googlegroups.com>
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
" Previously: Scott Bigham <dsb@killerbunnies.org>
" Homepage: https://github.com/vim-perl/vim-perl
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues

View File

@@ -1,10 +1,9 @@
" Vim syntax file
" Language: Privoxy actions file
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/syntax/privoxy.vim
" Last Change: 2007 Mar 30
" Last Change: 2026 Jan 07
" Privoxy 3.0.6
" Privoxy 4.1.0
if exists("b:current_syntax")
finish
@@ -13,59 +12,172 @@ endif
let s:cpo_save = &cpo
set cpo&vim
setlocal iskeyword=@,48-57,_,-
syn region privoxyActionsBlock matchgroup=privoxyBraces start="^\s*\zs{" end="}"
\ contains=@privoxyActionPrefix,privoxyLineContinuation
syn keyword privoxyTodo contained TODO FIXME XXX NOTE
" Actions {{{
let s:actions =<< trim END
add-header
block
change-x-forwarded-for
client-header-filter
client-body-filter
client-body-tagger
client-header-tagger
content-type-overwrite
crunch-client-header
crunch-if-none-match
crunch-incoming-cookies
crunch-outgoing-cookies
crunch-server-header
deanimate-gifs
delay-response
downgrade-http-version
external-filter
fast-redirects
filter
filter-client-headers
filter-server-headers
force-text-mode
forward-override
handle-as-empty-document
handle-as-image
hide-accept-language
hide-content-disposition
hide-forwarded-for-headers
hide-from-header
hide-if-modified-since
hide-referrer
hide-referer
hide-user-agent
https-inspection
ignore-certificate-errors
limit-connect
limit-cookie-lifetime
prevent-compression
prevent-keeping-cookies
overwrite-last-modified
redirect
server-header-filter
server-header-tagger
suppress-tag
session-cookies-only
set-image-blocker
END
for s:action in s:actions
exe 'syn match privoxyAction "\<' .. s:action .. '\>" contained nextgroup=privoxyParams'
endfor
unlet s:action s:actions
syn region privoxyParams matchgroup=privoxyParamBraces start="{" end="}" contained
syn match privoxyFilterAction "\<filter\>-\@!" contained nextgroup=privoxyFilterParams
syn region privoxyFilterParams matchgroup=privoxyParamBraces start="{" end="}" contained contains=privoxyFilterArg
syn cluster privoxyAction contains=privoxyAction,privoxyFilterAction
" }}}
" Filters {{{
let s:filters =<< trim END
allow-autocompletion
all-popups
banners-by-link
banners-by-size
blogspot
bundeswehr
content-cookies
crude-parental
demoronizer
frameset-borders
fun
github
google
html-annoyances
ie-exploits
iframes
imdb
img-reorder
js-annoyances
js-events
jumping-windows
msn
no-ping
quicktime-kioskmode
refresh-tags
shockwave-flash
site-specifics
sourceforge
tiny-textforms
unsolicited-popups
webbugs
yahoo
x-httpd-php-to-html
html-to-xml
xml-to-html
less-download-windows
privoxy-control
hide-tor-exit-notation
no-brotli-accepted
privoxy-control
remove-first-byte
remove-test
overwrite-test-value
END
for s:filter in s:filters
exe 'syn match privoxyFilterArg "\<' .. s:filter .. '\>" contained"'
endfor
unlet s:filter s:filters
" }}}
syn match privoxyEnablePrefix "\%(^\|\s\|{\)\@1<=+\l\@=" nextgroup=privoxy.*Action contained
syn match privoxyDisablePrefix "\%(^\|\s\|{\)\@1<=-\l\@=" nextgroup=privoxy.*Action contained
syn cluster privoxyActionPrefix contains=privoxyDisablePrefix,privoxyEnablePrefix
syn match privoxySettingsHeader "^\s*\zs{{settings\}}" contains=privoxyBraces nextgroup=privoxySettingsSection skipnl skipwhite
syn match privoxyDescriptionHeader "^\s*\zs{{description\}}" contains=privoxyBraces nextgroup=privoxyDescriptionSection skipnl
syn match privoxyAliasHeader "^\s*\zs{{alias\}}" contains=privoxyBraces nextgroup=privoxyAliasSection skipnl
syn region privoxySettingsSection start="." end="^\s*\ze{" contained contains=privoxyComment,privoxySettingName
syn region privoxyDescriptionSection start="." end="^\s*\ze{" contained
syn region privoxyAliasSection start="." end="^\s*\ze{" contained contains=privoxyComment,privoxyAliasName
syn match privoxySettingName "\<[a-z][a-z-]*" contained nextgroup=privoxySettingEqual
syn match privoxySettingEqual "=" contained nextgroup=privoxySettingValue
syn match privoxySettingValue ".*" contained
syn match privoxyAliasName "[+-]\<[a-z][a-z-]*" contained nextgroup=privoxyAliasEqual skipwhite
syn match privoxyAliasEqual "=" contained nextgroup=privoxyAliasValue skipwhite
syn region privoxyAliasValue start="\S" skip="\\$" end="$" contained contains=@privoxyAction,@privoxyActionPrefix,privoxyLineContinuation
syn match privoxyBraces "[{}]" contained
syn match privoxyLineContinuation "\\$" contained
syn keyword privoxyTodo TODO FIXME XXX NOTE contained
syn match privoxyComment "#.*" contains=privoxyTodo,@Spell
syn region privoxyActionLine matchgroup=privoxyActionLineDelimiter start="^\s*\zs{" end="}\ze\s*$"
\ contains=privoxyEnabledPrefix,privoxyDisabledPrefix
syn match privoxyEnabledPrefix "\%(^\|\s\|{\)\@<=+\l\@=" nextgroup=privoxyAction,privoxyFilterAction contained
syn match privoxyDisabledPrefix "\%(^\|\s\|{\)\@<=-\l\@=" nextgroup=privoxyAction,privoxyFilterAction contained
syn match privoxyAction "\%(add-header\|block\|content-type-overwrite\|crunch-client-header\|crunch-if-none-match\)\>" contained
syn match privoxyAction "\%(crunch-incoming-cookies\|crunch-outgoing-cookies\|crunch-server-header\|deanimate-gifs\)\>" contained
syn match privoxyAction "\%(downgrade-http-version\|fast-redirects\|filter-client-headers\|filter-server-headers\)\>" contained
syn match privoxyAction "\%(filter\|force-text-mode\|handle-as-empty-document\|handle-as-image\)\>" contained
syn match privoxyAction "\%(hide-accept-language\|hide-content-disposition\|hide-forwarded-for-headers\)\>" contained
syn match privoxyAction "\%(hide-from-header\|hide-if-modified-since\|hide-referrer\|hide-user-agent\|inspect-jpegs\)\>" contained
syn match privoxyAction "\%(kill-popups\|limit-connect\|overwrite-last-modified\|prevent-compression\|redirect\)\>" contained
syn match privoxyAction "\%(send-vanilla-wafer\|send-wafer\|session-cookies-only\|set-image-blocker\)\>" contained
syn match privoxyAction "\%(treat-forbidden-connects-like-blocks\)\>"
syn match privoxyFilterAction "filter{[^}]*}" contained contains=privoxyFilterArg,privoxyActionBraces
syn match privoxyActionBraces "[{}]" contained
syn keyword privoxyFilterArg js-annoyances js-events html-annoyances content-cookies refresh-tags unsolicited-popups all-popups
\ img-reorder banners-by-size banners-by-link webbugs tiny-textforms jumping-windows frameset-borders demoronizer
\ shockwave-flash quicktime-kioskmode fun crude-parental ie-exploits site-specifics no-ping google yahoo msn blogspot
\ x-httpd-php-to-html html-to-xml xml-to-html hide-tor-exit-notation contained
" Alternative spellings
syn match privoxyAction "\%(kill-popup\|hide-referer\|prevent-keeping-cookies\)\>" contained
" Pre-3.0 compatibility
syn match privoxyAction "\%(no-cookie-read\|no-cookie-set\|prevent-reading-cookies\|prevent-setting-cookies\)\>" contained
syn match privoxyAction "\%(downgrade\|hide-forwarded\|hide-from\|image\|image-blocker\|no-compression\)\>" contained
syn match privoxyAction "\%(no-cookies-keep\|no-cookies-read\|no-cookies-set\|no-popups\|vanilla-wafer\|wafer\)\>" contained
syn match privoxySetting "\<for-privoxy-version\>"
syn match privoxyHeader "^\s*\zs{{\%(alias\|settings\)}}\ze\s*$"
hi def link privoxyAction Identifier
hi def link privoxyFilterAction Identifier
hi def link privoxyActionLineDelimiter Delimiter
hi def link privoxyDisabledPrefix SpecialChar
hi def link privoxyEnabledPrefix SpecialChar
hi def link privoxyHeader PreProc
hi def link privoxySetting Identifier
hi def link privoxyFilterArg Constant
hi def link privoxyAliasEqual Operator
hi def link privoxyAliasHeader Title
hi def link privoxyBraces Delimiter
hi def link privoxyComment Comment
hi def link privoxyDescriptionHeader Title
hi def link privoxyDisablePrefix Added
hi def link privoxyEnablePrefix Removed
hi def link privoxyFilterAction privoxyAction
hi def link privoxyFilterArg Constant
hi def link privoxyLineContinuation Special
hi def link privoxyParamBraces privoxyBraces
hi def link privoxySettingEqual Operator
hi def link privoxySettingName Keyword
hi def link privoxySettingsHeader Title
hi def link privoxySettingValue Constant
hi def link privoxyTodo Todo
let b:current_syntax = "privoxy"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: ts=8 fdm=marker

View File

@@ -1,6 +1,6 @@
" Vim syntax file
" Language: Raku
" Maintainer: vim-perl <vim-perl@googlegroups.com>
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
" Homepage: https://github.com/Raku/vim-raku
" Bugs/requests: https://github.com/Raku/vim-raku/issues
" Last Change: 2021-04-16

View File

@@ -4,7 +4,7 @@
" Repository: https://github.com/chrisbra/vim-sqloracle-syntax
" License: Vim
" Previous Maintainer: Paul Moore
" Last Change: 2018 June 24
" Last Change: 2022 February 10
" Changes:
" 02.04.2016: Support for when keyword
@@ -12,6 +12,7 @@
" 22.07.2016: Support Oracle Q-Quote-Syntax
" 25.07.2016: Support for Oracle N'-Quote syntax
" 22.06.2018: Remove skip part for sqlString (do not escape strings)
" 10.02.2022: Add some more Oracle SQLKeywords https://github.com/vim/vim/issues/9737
" (https://web.archive.org/web/20150922065035/https://mariadb.com/kb/en/sql-99/character-string-literals/)
if exists("b:current_syntax")
@@ -33,7 +34,7 @@ syn keyword sqlKeyword maxextents maxtrans mode modify monitoring
syn keyword sqlKeyword nocache nocompress nologging noparallel nowait of offline on online start
syn keyword sqlKeyword parallel successful synonym table tablespace then to trigger uid
syn keyword sqlKeyword unique user validate values view when whenever
syn keyword sqlKeyword where with option order pctfree pctused privileges procedure
syn keyword sqlKeyword where with within option order pctfree pctused privileges procedure
syn keyword sqlKeyword public resource return row rowlabel rownum rows
syn keyword sqlKeyword session share size smallint type using
syn keyword sqlKeyword join cross inner outer left right
@@ -86,7 +87,7 @@ syn sync ccomment sqlComment
" (Oracle 11g)
" Aggregate Functions
syn keyword sqlFunction avg collect corr corr_s corr_k count covar_pop covar_samp cume_dist dense_rank first
syn keyword sqlFunction group_id grouping grouping_id last max median min percentile_cont percentile_disc percent_rank rank
syn keyword sqlFunction group_id grouping grouping_id last listagg max median min percentile_cont percentile_disc percent_rank rank
syn keyword sqlFunction regr_slope regr_intercept regr_count regr_r2 regr_avgx regr_avgy regr_sxx regr_syy regr_sxy
syn keyword sqlFunction stats_binomial_test stats_crosstab stats_f_test stats_ks_test stats_mode stats_mw_test
syn keyword sqlFunction stats_one_way_anova stats_t_test_one stats_t_test_paired stats_t_test_indep stats_t_test_indepu
@@ -95,7 +96,7 @@ syn keyword sqlFunction sys_xmlagg var_pop var_samp variance xmlagg
" Char Functions
syn keyword sqlFunction ascii chr concat initcap instr length lower lpad ltrim
syn keyword sqlFunction nls_initcap nls_lower nlssort nls_upper regexp_instr regexp_replace
syn keyword sqlFunction regexp_substr replace rpad rtrim soundex substr translate treat trim upper
syn keyword sqlFunction regexp_substr replace rpad rtrim soundex substr translate treat trim upper wm_concat
" Comparison Functions
syn keyword sqlFunction greatest least
" Conversion Functions

View File

@@ -0,0 +1,20 @@
>#+0#0000e05#ffffff0| |c|o|m@1|e|n|t| +0#0000000&@65
@75
|a+0#00e0e07&| |=+0#0000000&| |b| @69
|$+0#00e0e07&|(|a|)| |=+0#0000000&| |1| @66
@75
|$+0#00e0e07&|(|a|)|:@1| +0#0000000&@68
| +0#e000e06&@7|@|e+0#e000002&|c|h|o| |d|o|u|b|l|e|-|c|o|l|o|n| |r|u|l|e| +0#0000000&@43
@75
|$+0#00e0e07&|(|a|)| |++0#0000000&|=| |o|u|t|p|u|t| @60
@75
|d+0#e000e06&|e|f|i|n|e| |s|a|y| +0#0000000&@64
| +0#e000e06&@7|e|c|h|o| |$+0#00e0e07&|1| +0#0000000&@59
|e+0#e000e06&|n|d|e|f| +0#0000000&@69
@75
|d+0#00e0e07&|e|f|a|u|l|t|:| +0#0000000&@66
| +0#e000002&@7|$+0#00e0e07&|(|c+0#af5f00255&|a|l@1| +0#00e0e07&|s|a|y|,|"+0#e000002&|H|e|l@1|o| |(|w|o|r|l|d|)|!|"|)+0#00e0e07&| +0#0000000&@38
|~+0#4040ff13&| @73
|~| @73
|~| @73
| +0#0000000&@56|1|,|1| @10|A|l@1|

View File

@@ -0,0 +1,16 @@
# comment
a = b
$(a) = 1
$(a)::
@echo double-colon rule
$(a) += output
define say
echo $1
endef
default:
$(call say,"Hello (world)!")

View File

@@ -1,6 +1,6 @@
" Vim syntax file
" Language: TT2 (Perl Template Toolkit)
" Maintainer: vim-perl <vim-perl@googlegroups.com>
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
" Author: Moriki, Atsushi <4woods+vim@gmail.com>
" Homepage: https://github.com/vim-perl/vim-perl
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues

View File

@@ -1,6 +1,6 @@
" Vim syntax file
" Language: TT2 embedded with HTML
" Maintainer: vim-perl <vim-perl@googlegroups.com>
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
" Author: Moriki, Atsushi <4woods+vim@gmail.com>
" Homepage: https://github.com/vim-perl/vim-perl
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues

View File

@@ -1,9 +1,9 @@
" Vim syntax file
" Language: Wget configuration file (/etc/wgetrc ~/.wgetrc)
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2023 Nov 05
" Last Change: 2026 Jan 07
" GNU Wget 1.21 built on linux-gnu.
" GNU Wget 1.25 built on linux-gnu.
if exists("b:current_syntax")
finish

View File

@@ -1,9 +1,9 @@
" Vim syntax file
" Language: Wget2 configuration file (/etc/wget2rc ~/.wget2rc)
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2023 Nov 05
" Last Change: 2026 Jan 07
" GNU Wget2 2.1.0 - multithreaded metalink/file/website downloader
" GNU Wget2 2.2.1 - multithreaded metalink/file/website downloader
if exists("b:current_syntax")
finish
@@ -189,6 +189,7 @@ let s:commands =<< trim EOL
save-headers
secure-protocol
server-response
show-progress
signature-extensions
span-hosts
spider
@@ -223,7 +224,7 @@ EOL
"}}}
for cmd in s:commands
exe 'syn match wget2Command "\<' .. substitute(cmd, '-', '[-_]\\=', "g") .. '\>" nextgroup=wget2AssignmentOperator skipwhite contained'
exe 'syn match wget2Command "\<\%(no[-_]\)\=' .. substitute(cmd, '-', '[-_]\\=', "g") .. '\>" nextgroup=wget2AssignmentOperator skipwhite contained'
endfor
unlet s:commands

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: XS (Perl extension interface language)
" Author: Autogenerated from perl headers, on an original basis of Michael W. Dodge <sarge@pobox.com>
" Maintainer: vim-perl <vim-perl@googlegroups.com>
" Maintainer: vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
" Previous: Vincent Pit <perl@profvince.com>
" Homepage: https://github.com/vim-perl/vim-perl
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues

View File

@@ -2,7 +2,7 @@
" Language: Zsh shell script
" Maintainer: Christian Brabandt <cb@256bit.org>
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2024 Jan 04
" Latest Revision: 2025 Feb 18
" License: Vim (see :h license)
" Repository: https://github.com/chrisbra/vim-zsh
@@ -37,9 +37,6 @@ endfunction
let s:contained=s:ContainedGroup()
syn iskeyword @,48-57,_,192-255,#,-
if get(g:, 'zsh_fold_enable', 0)
setlocal foldmethod=syntax
endif
syn match zshQuoted '\\.'
syn match zshPOSIXQuoted '\\[xX][0-9a-fA-F]\{1,2}'
@@ -157,6 +154,8 @@ syn case ignore
syn match zshOptStart
\ /\v^\s*%(%(un)?setopt|set\s+[-+]o)/
\ nextgroup=zshOption skipwhite
" this list is generated using the make-options.zsh script and the zsh source repository
syn keyword zshOption nextgroup=zshOption,zshComment skipwhite contained
\ auto_cd no_auto_cd autocd noautocd auto_pushd no_auto_pushd autopushd noautopushd cdable_vars
\ no_cdable_vars cdablevars nocdablevars cd_silent no_cd_silent cdsilent nocdsilent chase_dots
@@ -193,16 +192,16 @@ syn keyword zshOption nextgroup=zshOption,zshComment skipwhite contained
\ nonumericglobsort rc_expand_param no_rc_expand_param rcexpandparam norcexpandparam rematch_pcre
\ no_rematch_pcre rematchpcre norematchpcre sh_glob no_sh_glob shglob noshglob unset no_unset nounset
\ warn_create_global no_warn_create_global warncreateglobal nowarncreateglobal warn_nested_var
\ no_warn_nested_var warnnestedvar no_warnnestedvar append_history no_append_history appendhistory
\ noappendhistory bang_hist no_bang_hist banghist nobanghist extended_history no_extended_history
\ extendedhistory noextendedhistory hist_allow_clobber no_hist_allow_clobber histallowclobber
\ nohistallowclobber hist_beep no_hist_beep histbeep nohistbeep hist_expire_dups_first
\ no_hist_expire_dups_first histexpiredupsfirst nohistexpiredupsfirst hist_fcntl_lock
\ no_hist_fcntl_lock histfcntllock nohistfcntllock hist_find_no_dups no_hist_find_no_dups
\ histfindnodups nohistfindnodups hist_ignore_all_dups no_hist_ignore_all_dups histignorealldups
\ nohistignorealldups hist_ignore_dups no_hist_ignore_dups histignoredups nohistignoredups
\ hist_ignore_space no_hist_ignore_space histignorespace nohistignorespace hist_lex_words
\ no_hist_lex_words histlexwords nohistlexwords hist_no_functions no_hist_no_functions
\ no_warn_nested_var warnnestedvar no_warnnestedvar nowarnnestedvar append_history no_append_history
\ appendhistory noappendhistory bang_hist no_bang_hist banghist nobanghist extended_history
\ no_extended_history extendedhistory noextendedhistory hist_allow_clobber no_hist_allow_clobber
\ histallowclobber nohistallowclobber hist_beep no_hist_beep histbeep nohistbeep
\ hist_expire_dups_first no_hist_expire_dups_first histexpiredupsfirst nohistexpiredupsfirst
\ hist_fcntl_lock no_hist_fcntl_lock histfcntllock nohistfcntllock hist_find_no_dups
\ no_hist_find_no_dups histfindnodups nohistfindnodups hist_ignore_all_dups no_hist_ignore_all_dups
\ histignorealldups nohistignorealldups hist_ignore_dups no_hist_ignore_dups histignoredups
\ nohistignoredups hist_ignore_space no_hist_ignore_space histignorespace nohistignorespace
\ hist_lex_words no_hist_lex_words histlexwords nohistlexwords hist_no_functions no_hist_no_functions
\ histnofunctions nohistnofunctions hist_no_store no_hist_no_store histnostore nohistnostore
\ hist_reduce_blanks no_hist_reduce_blanks histreduceblanks nohistreduceblanks hist_save_by_copy
\ no_hist_save_by_copy histsavebycopy nohistsavebycopy hist_save_no_dups no_hist_save_no_dups
@@ -334,7 +333,7 @@ hi def link zshKeyword Keyword
hi def link zshFunction None
hi def link zshKSHFunction zshFunction
hi def link zshHereDoc String
hi def link zshOperator None
hi def link zshOperator Operator
hi def link zshRedir Operator
hi def link zshVariable None
hi def link zshVariableDef zshVariable

View File

@@ -59,7 +59,7 @@ Final exercise: (Modify "this" text) by [applying {various} operations]<
**MNEMONIC**: *into register(") named (a) (y)ank (i)nner (w)ord*
3. Navigate forward to the word 'cookie' (`fk`{normal} or `2fc`{normal}
3. Navigate forward to the word 'cookie' (`fk`{normal} or `3fc`{normal}
or `$2b`{normal} or `/co`{normal} `<ENTER>`{normal}) and type `"byiw`{normal}
4. Navigate to any point on the word 'Vince' and type `ciw<CTRL-R>a<ESC>`{normal}

View File

@@ -1,6 +1,6 @@
# ДОБРО ПОЖАЛОВАТЬ НА ЗАНЯТИЯ ПО РЕДАКТОРУ Vim
## ГЛАВА ПЕРВАЯ
# ГЛАВА ПЕРВАЯ
Программа Vim — это очень мощный текстовый редактор, имеющий множество
команд, и все их просто невозможно описать в рамках этого учебника.
@@ -53,11 +53,11 @@
** Чтобы перемещать каретку в указанных направлениях, нажмите клавиши
`h`, `j`, `k`, `l`**
*Подсказка.*
k Клавиша `h`{normal} слева и удобна для перемещения влево.
*Подсказка.*
k Клавиша `h`{normal} слева и удобна для перемещения влево.
← h l → Клавиша `l`{normal} справа и удобна для перемещения вправо.
j Клавиша `j`{normal} похожа на стрелку »вниз».
j Клавиша `j`{normal} похожа на стрелку »вниз».
1. Перемещайте каретку в разных направлениях, пока не ощутите уверенность.
2. Удерживайте нажатой клавишу «вниз» (`j`{normal}) для беспрерывного
@@ -281,9 +281,9 @@
этот оператор.
Так, например, формат команды удаления с оператором [d](d) следующий:
d объект
d объект
где
d - оператор удаления;
d - оператор удаления;
объект - область текста (указаны ниже), к которой будет применён оператор.
Краткий перечень объектов:
@@ -410,7 +410,7 @@
укажите их число, например, `2w`{normal}
6. Формат команд изменения:
оператор [число] объект
оператор [число] объект
где
оператор - необходимые действия, например, [d](d) для удаления;
[число] - количество подпадающих под действие оператора объектов,
@@ -539,7 +539,7 @@
где c - оператор изменения;
[число] - количество изменяемых объектов (необязательная часть);
объект - объект текста, который будет изменён.
объект - объект текста, который будет изменён.
Теперь переходите к следующему уроку.
@@ -836,7 +836,7 @@
Некоторые полезные примеры:
(Windows) (UNIX)
`:!dir`{vim} `:!ls`{vim} - вывести перечень файлов в каталоге;
`:!dir`{vim} `:!ls`{vim} - вывести перечень файлов в каталоге;
`:!del ФАЙЛ`{vim} `:!rm ФАЙЛ`{vim} - удалить файл с указанным названием.
2. По команде [:w](:w) ФАЙЛ — текущий редактируемый файл будет записан
@@ -1099,13 +1099,21 @@
4. Нажмите клавиши `<CTRL-D>`{normal}, и будет показан перечень команд
редактора Vim начинающихся с буквы «e».
5. Нажмите клавиши `d<TAB>`{normal}, и будет подставлено полное название
команды `:edit`{vim}.
5. Нажмите клавиши `d<TAB>`{normal}, и будет отображено меню с возожными
наименованиями команд для подстановки (или подставлено соответствующее
наименование, если введёная команда достаточно уникально, например, для
`:ed`{vim}<TAB> будет подставлена команда `:edit`{vim}).
6. Теперь напечатайте пробел и начало наименования существующего файла
6. Используйте <TAB> или <CTRL-N> для перехода к следующему соответствию.
Или <SHIFT-TAB> либо CTRL-P> для перехода к предыдущему соответствию.
7. Выберите пункт edit. И команда `edit`{vim} будет автоматически подставлена
в командную строку.
8. Теперь напечатайте пробел и начало наименования существующего файла
`:edit TE`{vim}
7. Нажмите клавишу `<TAB>`{normal} и будет подставлено наименование файла,
9. Нажмите клавишу `<TAB>`{normal} и будет подставлено наименование файла,
если оно уникальное.
**Примечание.**

View File

@@ -1,6 +1,6 @@
# ДОБРО ПОЖАЛОВАТЬ НА ЗАНЯТИЯ ПО РЕДАКТОРУ Vim
## ГЛАВА ВТОРАЯ
# ГЛАВА ВТОРАЯ
Что‐то неожиданное и непонятное?
Если это ваше первое знакомство с редактором Vim и вы планировали начать
@@ -11,12 +11,54 @@
~~~
Или просто откройте по ссылке [первую главу](@tutor:vim-01-beginner) учебника.
Приблизительное время, необходимое для изучения второй главы учебника
Приблизительное время, необходимое для изучения второй главы учебника,
составляет около 810 минут, и зависит от того, сколько времени вы посвятите
выполнению заданий.
# Урок 2.1.1. ИМЕНОВАННЫЕ РЕГИСТРЫ В РЕДАКТОРЕ Vim
# Урок 2.1.1. ОСВОЕНИЕ ТЕКСТОВЫХ ОБЪЕКТОВ
** Точечные операции с логическими частями текста используя текстовые объекты **
1. Попрактикуйтесь в аккуратной работе со словами:
- Поместите каретку на любое слово в строке почеченной ✓
- Наберите `diw`{normal}, чтобы удалить ТОЛЬКО слово
(слово без окружающих пробелов)
- Наберите `daw`{normal}, чтобы удалить СЛОВО (включая конечные пробелы)
- Попробуйте другие операторы: `ciw`{normal} (изменить),
`yiw`{normal} (копировать), `gqiw`{normal} (форматировать)
Потренируйтесь здесь на словах: «Vim'овский», (text_object) и 'мощный'.
2. Работа с содержимым скобок:
- Поместите каретку внутри любой пары () {} [] <> в строке помеченной ✓
- Наберите `di(`{normal} или `dib`{normal}
(удалить всё, что внутри круглых скобок)
- Наберите `da(`{normal} или `dab`{normal}
(удалить внутри круглых скобок и сами скобки)
- Попробуйте то же самое с `i"`{normal} и `a"`{normal} для машинописных
кавычек или `it`{normal} и `at`{normal} для тегов HTML и XML.
Примеры: {фигурные}, [прямоугольные], <угловые>, (круглые) и "quoted".
3. Операции с абзацами и предложениями:
- Наберите `dip`{normal} для удаления ТОЛЬКО абзаца
(каретка может быть в любом месте абзаца)
- Наберите `vap`{normal} для визуального выделения всего абзаца
- Попробуйте `das`{normal} для удаления предложения
(работает при наличии знаков препинания .!? )
4. Расширенные комбинации:
- `ciwnew<ESC>`{normal} — изменить текущее слово на «new»
- `ciw"<CTRL-R>-"<ESC>`{normal} — обернуть всю строку в кавычки
- `gUit`{normal} — преобразовать внутреннее содержимое HTML-тега в верхний
регистр
- `va"p`{normal} — выделить текст в кавычках и вставить поверх него
Итоговое задание: (Измените "этот" текст) [применив {различные} операции]<
# Урок 2.1.2. ИМЕНОВАННЫЕ РЕГИСТРЫ В РЕДАКТОРЕ Vim
** Копирование с сохранением двух разных слов и последующая их вставка в текст **
@@ -35,13 +77,13 @@
`"byiw`{normal}
4. Переместите каретку на любой символ слова «Виктор» и наберите на клавиатуре
`ciw<CTRL-r>a<ESC>`{normal}
`ciw<CTRL-R>a<ESC>`{normal}
Эта команда означает следующее:
*изменить(c) только(i) слово(w) на <содержимое регистра(r)> с названием(a)*
5. Установите каретку на любой символ слова «тортов» и наберите
`ciw<CTRL-r>b<ESC>`{normal}
`ciw<CTRL-R>b<ESC>`{normal}
а) Отныне Эдуард будет отвечать за раздачу печенья
б) Таким образом Виктор имеет единоличные права по распределению тортов
@@ -58,7 +100,7 @@
[CTRL-R](i_CTRL-R)
# Урок 2.1.2. РЕГИСТР РЕЗУЛЬТАТА ВЫЧИСЛЕНИЙ
# Урок 2.1.3. РЕГИСТР РЕЗУЛЬТАТА ВЫЧИСЛЕНИЙ
** Вставка результатов вычислений напрямую в текст **
@@ -66,11 +108,11 @@
2. Установите каретку на любой цифре приведённого числа
3. Наберите на клавиатуре `ciw<CTRL-r>=60*60*24`{normal} `<ENTER>`{normal}
3. Наберите на клавиатуре `ciw<CTRL-R>=60*60*24`{normal} `<ENTER>`{normal}
4. Переместите каретку в конец следующей строки, переключите редактор в режим
вставки, и добавьте сегодняшнюю дату с помощью следующей команды
`<CTRL-r>=`{normal}`system('date')`{vim} `<ENTER>`{normal}
`<CTRL-R>=`{normal}`system('date')`{vim} `<ENTER>`{normal}
Примечание.
Результат вызова функции `system()`{vim} зависит от текущей операционной
@@ -88,14 +130,14 @@
[регистр результата вычислений](quote=)
# Урок 2.1.3. НУМЕРОВАННЫЕ РЕГИСТРЫ В РЕДАКТОРЕ Vim
# Урок 2.1.4. НУМЕРОВАННЫЕ РЕГИСТРЫ В РЕДАКТОРЕ Vim
** Как команды `yy`{normal} и `dd`{normal} влияют на содержимое регистров **
1. Переместите каретку к строке помеченной ✓
2. Скопируйте эту строку и проверьте состояние регистров с помощью команды
`:reg`{vim} `<ENTER>`{normal}
2. Скопируйте строку, начинающуюся с цифры 0, и проверьте состояние регистров
с помощью команды `:reg`{vim} `<ENTER>`{normal}
3. Удалите строку, начинающуюся с цифры 0, с помощью команды `"cdd`{normal}
и ещё раз проверьте состояние регистров (где будет строка, начинающаяся
@@ -132,7 +174,58 @@
[нумерованные регистры](quote_number)
# Урок 2.1.4. ИЗЯЩЕСТВО ЗАКЛАДОК
# Урок 2.1.5. СПЕЦИАЛЬНЫЕ РЕГИСТРЫ
** Применение регистров буфера обмена и «чёрная дыра» для расширенной правки **
Примечание.
Для использования системного буфера обмена в системе Linux требуются
библиотеки X11 или Wayland, и сам редактор Vim должен быть скомпилирован
с включённым компонентом «+clipboard» (обычно это максимальная версия).
Это можно проверить с помощью следующих команд редактора Vim:
`:version`{vim} и `:echo has('clipboard_working')`{vim}
1. Регистры буфера обмена `+`{normal} и `*`{normal}:
- `"+y`{normal} — копирование в системный буфер обмена
(например, по команде `"+yy`{normal} будет скопирована текущая строка)
- `"+p`{normal} — вставка из системного буфера обмена
- `"*`{normal} — основной выбор в X11 (средняя кнопка «мыши»),
а `"+`{normal} — буфер обмена
"+yy в этой строке, затем вставьте в другое приложение по Ctrl+V или Cmd+V
2. Регистр «чёрная дыра» `_`{normal} стирает текст:
- `"_daw`{normal} — сотрёт слово без сохранения в регистре
- Полезно, когда вы не хотите перезаписывать регистр по умолчанию `"`{normal}
- Обратите внимание, что здесь используется текстовый объект «a Word»,
описанный в предыдущем уроке
- `"_dd`{normal} — сотрёт строку без сохранения
- `"_dap`{normal} — сотрёт абзац без сохранения
- Комбинируйте со счётчиками: `3"_dw`{normal}
"_diw на любом слове, чтобы удалить его, не затрагивая историю копирования
3. Совместите с визуальным выделением:
- Выделите текст с помощью <SHIFT-V>, a затем `"+y`{normal}
- Чтобы вставить из буфера обмена в режиме вставки — `<CTRL-R>+`{normal}
- Попробуйте открыть другое приложение и вставить из системного буфера обмена
4. Запомните:
- Регистры буфера обмена доступны между разными экземплярами редактора Vim
- Регистр буфера обмена не всегда работает
- Регистр «чёрная дыра» предотвращает случайную перезапись других регистров
- Регистр `"`{normal} по-прежнему доступен для копирования и вставки
- Именованные регистры (a-z) остаются частными для каждой сессии Vim
5. Устранение неполадок с буфером обмена:
- Проверьте доступность с помощью команды
`:echo has('clipboard_working')`{vim}
- При выводе 1 — означает доступно, 0 — означает, что компонент не включен
- В систме Linux может потребоваться пакет vim-gtk или vim-x11
(посмотрите вывод команды `:version`{vim})
# Урок 2.1.6. ИЗЯЩЕСТВО ЗАКЛАДОК
** Избегайте действий, свойственных для дятлокодеров **
@@ -140,7 +233,7 @@
При написании программ часто возникает необходимость перемещения больших
фрагментов кода. Приём, приведённый далее, поможет избежать подсчёта номеров
строк, требуемых для операций вроде `"a147d`{normal} или `:945,1091d a`{vim},
или даже хуже — `i<CTRL-r>=1091-935<ENTER>`{normal}, как первое действие.
или даже хуже — `i<CTRL-R>=1091-935<ENTER>`{normal}, как первое действие.
1. Переместите каретку к строке помеченной ✓
@@ -165,7 +258,7 @@
~~~ cmd
AAA
function itGotRealBigRealFast() {
function ItGotRealBigRealFast() {
if ( somethingIsTrue ) {
doIt()
}
@@ -193,33 +286,47 @@ CCC
# РЕЗЮМЕ УРОКА 2.1
1. Чтобы сохранить (при удалении или копировании) текст для последующей
1. Текстовые объекты обеспечивают точное редактирование:
- `iw`{normal} или `aw`{normal} — только или включая слово
- `i[`{normal} или `a[`{normal} — внутри или включая скобки
- `i"`{normal} или `a"`{normal} — внутри или включая кавычки
- `it`{normal} или `at`{normal} — внутри или включая теги
- `ip`{normal} или `ap`{normal} — только или включая абзаца
- `is`{normal} или `as`{normal} — только или включая предложения
2. Чтобы сохранить (при удалении или копировании) текст для последующей
вставки, используйте имеющиеся 26 именованных регистра (a-z).
2. Чтобы скопировать целое слово при нахождении каретки на любом символе
3. Чтобы скопировать целое слово при нахождении каретки на любом символе
в этом слове, воспользуйтесь командой `yiw`{normal}
3. Чтобы изменить целое слово при нахождении каретки на любом символе в этом
4. Чтобы изменить целое слово при нахождении каретки на любом символе в этом
слове, воспользуйтесь командой `ciw`{normal}
4. Чтобы в режиме вставки вставить текст непосредственно из регистра,
воспользуйтесь командой `<CTRL-r>a`{normal}
5. Чтобы в режиме вставки вставить текст непосредственно из регистра,
воспользуйтесь командой `<CTRL-R>a`{normal}
5. Чтобы в режиме вставки вставить результат вычисления простых математических
операций, воспользуйтесь командой `<CTRL-r>=60*60`{normal} `<ENTER>`{normal}
6. Чтобы в режиме вставки вставить результат выполнения команд системы,
воспользуйтесь командой `<CTRL-r>=`{normal}`system('ls -l')`{vim}
6. Чтобы в режиме вставки вставить результат вычисления простых математических
операций, воспользуйтесь командой `<CTRL-R>=60*60<ENTER>`{normal}
7. Чтобы в режиме вставки вставить результат выполнения команд системы,
воспользуйтесь командой `<CTRL-R>=`{normal}`system('ls -l')`{vim}
7. Чтобы просмотреть содержимое регистров, воспользуйтесь командой `:reg`{vim}
8. Учитывайте распределение удалённых целиком строк по команде `dd`{normal} —
8. Чтобы просмотреть содержимое регистров, воспользуйтесь командой `:reg`{vim}
9. Учитывайте распределение удалённых целиком строк по команде `dd`{normal} —
это нумерованные регистры в порядке убывания, т. е. от 1 до 9.
Помните, что в нумерованных регистрах дольше хранятся те строки, которые
были уделены целиком, в отличие от любых других операций
9. Учитывайте, что в нумерованных регистрах кратковременно сохраняется всё
10. Учитывайте, что в нумерованных регистрах кратковременно сохраняется всё
что скопировано.
10. Чтобы установить закладку в режиме команд, воспользуйтесь командой
11. Чтобы установить закладку в режиме команд, воспользуйтесь командой
`m[a-zA-Z0-9]`{normal}
11. Чтобы переместить каретку на строку в которой установлена закладка,
12. Чтобы переместить каретку на строку в которой установлена закладка,
воспользуйтесь командой `'`{normal}
13. Специальные регистры:
- `"+`{normal} и `"*`{normal} — системный буфер обмена (зависит от ОС)
- `"_`{normal} — «чёрная дыра» (стирание удалённого или скопированного текста)
- `"=`{normal} — регистр результата вычислений
- `"-`{normal} — регистр малых удалений
# ЗАКЛЮЧЕНИЕ
@@ -227,5 +334,6 @@ CCC
Работа над этой главой будет продолжена.
Вторая глава учебника была написана Полом Д. Паркером (Paul D. Parker).
и Кристианом Брабандт (Christian Brabandt).
Restorer, перевод на русский язык, 2025, restorer@mail2k.ru

View File

@@ -1,10 +1,15 @@
{
"expect": {
"46": -1,
"47": "б) Таким образом Эдуард имеет единоличные права по распределению печенья",
"80": "Правильно ли я помню, что в сутках 86400 секунд?",
"81": -1,
"114": -1,
"167": -1
"31": -1,
"42": -1,
"58": -1,
"88": -1,
"89": "б) Таким образом Эдуард имеет единоличные права по распределению печенья",
"122": "Правильно ли я помню, что в сутках 86400 секунд?",
"123": -1,
"156": -1,
"195": -1,
"206": -1,
"260": -1
}
}

View File

@@ -983,7 +983,9 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
На этом можно завершить первую часть занятий посвящённых редактору Vim.
Далее вы можете ознакомиться со второй частью занятий.
Далее вы можете ознакомиться со второй частью занятий, в которой
рассматриваются такие понятия как регистры, закладки и работа с текстовыми
объектами.
Целью данного курса было дать краткий обзор редактора Vim, достаточный для
того, чтобы не возникало сложностей при его использовании. Это далеко не

View File

@@ -59,7 +59,7 @@
MNEMONIC: into register(") named (a) (y)ank (i)nner (w)ord
3. Navigate forward to the word 'cookie' (fk or 2fc or $2b or /co<ENTER>)
3. Navigate forward to the word 'cookie' (fk or 3fc or $2b or /co<ENTER>)
and type "byiw
4. Navigate to any point on the word 'Vince' and type ciw<CTRL-R>a<ESC>

View File

@@ -4,11 +4,11 @@
= CAPÍTULO DOS =
===============================================================================
Hic Sunt Dracones: si esta es tu primera vez usando vim y tienes la
Hic Sunt Dracones: si esta es tu primera vez usando Vim y tienes la
intención de aprovechar el capítulo de introducción, simplemente escribe
:q!<ENTER> y ejecuta vimtutor para empezar por el Capítulo 1.
El tiempo aproxiomado para completar este capítulo es de 8-10 minutos,
El tiempo aproximado para completar este capítulo es de 8-10 minutos,
dependiendo de cuanto tiempo dediques a experimentar.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -30,10 +30,10 @@
2. Trabaja con contenido entre paréntesis, corchetes o llaves:
- Situa el cursor dentro de cualquier par de los símbolos () {} [] <>
- Escribe di( o dib (eliminar dentro de los símbolos)
- Escribe da( o dab (eliminar alrededor de los símbolos)
- Prueba lo mismo con i"/a" para las comillas
- Prueba con it/at para etiquetas HTML/XML
- Escribe di( o dib (eliminar dentro de los paréntesis)
- Escribe da( o dab (eliminar alrededor de los paréntesis)
- Prueba lo mismo con i" o con a" para las comillas
- Prueba con it o con at para etiquetas HTML/XML
---> Ejemplos de prueba: con {llaves}, [corchetes], <ángulos> y "comillas".
@@ -44,12 +44,11 @@
(funciona entre símbolos de puntuación .!?)
4. Combinaciones avanzadas:
- ciwnuevo<ESC> - Cambiar la palabra actual por "nuevo"
- yss"<ESC> - Encerrar la línea completa entre comillas
(similar al comlemento vim-surround)
- gUit - Convertir a mayúsculas el contenido de la
etiqueta HTML donde esté el cursor
- va"p - Seleccionar el texto entre comillas y pegarlo sobre él
- ciwnuevo<ESC> - Cambiar la palabra actual por "nuevo"
- ciw"<CTRL-R>-"<ESC> - Encierra la palabra actual entre comillas
- gUit - Convertir a mayúsculas el contenido de la
etiqueta HTML donde esté el cursor
- va"p - Seleccionar el texto entre comillas y pegarlo sobre él
---> Ejercicio final: (Modificar "el" texto) al [aplicar {varias} operaciones]<
@@ -101,7 +100,7 @@ REFERENCIAS: Registros :h registers
2. Navega hasta cualquier parte del número que se muestra
3. Escribe ciw<CTRL-R> seguido por =60*60*24<ENTER>
3. Escribe ciw<CTRL-R> seguido por =60*60*24<ENTER>
4. En la línea siguiente, entra en modo insertar y añade la fecha actual con
<CTRL-R> seguido por =system('date')<ENTER>

View File

@@ -11,13 +11,53 @@
ещё раз, набрав в командной оболочке такую команду
vimtutor --chapter 1 ru
Приблизительное время, необходимое для изучения второй главы учебника
Приблизительное время, необходимое для изучения второй главы учебника,
составляет около 810 минут, и зависит от того, сколько времени вы посвятите
выполнению заданий.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 2.1.1. ИМЕНОВАННЫЕ РЕГИСТРЫ В РЕДАКТОРЕ Vim
Урок 2.1.1. ОСВОЕНИЕ ТЕКСТОВЫХ ОБЪЕКТОВ
** Точечные операции с логическими частями текста используя текстовые объекты **
1. Попрактикуйтесь в аккуратной работе со словами:
- Поместите каретку на любое слово в строке почеченной --->
- Наберите diw , чтобы удалить ТОЛЬКО слово (слово без окружающих пробелов)
- Наберите daw , чтобы удалить СЛОВО (включая конечные пробелы)
- Попробуйте другие операторы: ciw (изменить), yiw (копировать),
gqiw (форматировать)
---> Потренируйтесь здесь на словах: «Vim'овский», (text_object) и 'мощный'.
2. Работа с содержимым скобок:
- Поместите каретку внутри любой пары () {} [] <> в строке помеченной --->
- Наберите di( или dib (удалить всё, что внутри круглых скобок)
- Наберите da( или dab (удалить внутри круглых скобок и сами скобки)
- Попробуйте то же самое с i" и a" для машинописных кавычек или
it и at для тегов HTML и XML.
---> Примеры: {фигурные}, [прямоугольные], <угловые>, (круглые) и "quoted".
3. Операции с абзацами и предложениями:
- Наберите dip для удаления ТОЛЬКО абзаца
(каретка может быть в любом месте абзаца)
- Наберите vap для визуального выделения всего абзаца
- Попробуйте das для удаления предложения
(работает при наличии знаков препинания .!? )
4. Расширенные комбинации:
- ciwnew<ESC> — изменить текущее слово на «new»
- ciw"<CTRL-R>-"<ESC> — обернуть всю строку в кавычки
- gUit — преобразовать внутреннее содержимое HTML-тега в верхний
регистр
- va"p — выделить текст в кавычках и вставить поверх него
---> Итоговое задание: (Измените "этот" текст) [применив {различные} операции]<
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 2.1.2. ИМЕНОВАННЫЕ РЕГИСТРЫ В РЕДАКТОРЕ Vim
** Копирование с сохранением двух разных слов и последующая их вставка в текст **
@@ -34,13 +74,13 @@
"byiw
4. Переместите каретку на любой символ слова «Виктор» и наберите на клавиатуре
ciw<C-r>a<ESC>
ciw<CTRL-R>a<ESC>
Эта команда означает следующее:
изменить(c) только(i) слово(w) на <содержимое регистра(r)> с названием(a)
5. Установите каретку на любой символ слова «тортов» и наберите
ciw<C-r>b<ESC>
ciw<CTRL-R>b<ESC>
---> а) Отныне Эдуард будет отвечать за раздачу печенья
б) Таким образом Виктор имеет единоличные права по распределению тортов
@@ -58,7 +98,7 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 2.1.2. РЕГИСТР РЕЗУЛЬТАТА ВЫЧИСЛЕНИЙ
Урок 2.1.3. РЕГИСТР РЕЗУЛЬТАТА ВЫЧИСЛЕНИЙ
** Вставка результатов вычислений напрямую в текст **
@@ -66,11 +106,11 @@
2. Установите каретку на любой цифре приведённого числа
3. Наберите на клавиатуре ciw<C-r>=60*60*24<ENTER>
3. Наберите на клавиатуре ciw<CTRL-R>=60*60*24<ENTER>
4. Переместите каретку в конец следующей строки, переключите редактор в режим
вставки, и добавьте сегодняшнюю дату с помощью следующей команды
<C-r>=system('date')<ENTER>
<CTRL-R>=system('date')<ENTER>
Примечание.
Результат вызова функции system() зависит от текущей операционной системы,
@@ -89,7 +129,7 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 2.1.3. НУМЕРОВАННЫЕ РЕГИСТРЫ В РЕДАКТОРЕ Vim
Урок 2.1.4. НУМЕРОВАННЫЕ РЕГИСТРЫ В РЕДАКТОРЕ Vim
** Как команды yy и dd влияют на содержимое регистров **
@@ -132,7 +172,59 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 2.1.4. ИЗЯЩЕСТВО ЗАКЛАДОК
Урок 2.1.5. СПЕЦИАЛЬНЫЕ РЕГИСТРЫ
** Применение регистров буфера обмена и «чёрная дыра» для расширенной правки **
Примечание.
Для использования системного буфера обмена в системе Linux требуются
библиотеки X11 или Wayland, и сам редактор Vim должен быть скомпилирован
с включённым компонентом «+clipboard» (обычно это максимальная версия).
Это можно проверить с помощью следующих команд редактора Vim:
:version
и
:echo has('clipboard_working')
1. Регистры буфера обмена + и * :
- "+y — копирование в системный буфер обмена
(например, по команде "+yy будет скопирована текущая строка)
- "+p — вставка из системного буфера обмена
- "* — основной выбор в X11 (средняя кнопка «мыши»), а "+ — буфер обмена
---> "+yy в этой строке, затем вставьте в другое приложение по Ctrl+V или Cmd+V
2. Регистр «чёрная дыра» _ стирает текст:
- "_daw — сотрёт слово без сохранения в регистре
- Полезно, когда вы не хотите перезаписывать регистр по умолчанию "
- Обратите внимание, что здесь используется текстовый объект «a Word»,
описанный в предыдущем уроке
- "_dd — сотрёт строку без сохранения
- "_dap — сотрёт абзац без сохранения
- Комбинируйте со счётчиками: 3"_dw
---> "_diw на любом слове, чтобы удалить его, не затрагивая историю копирования
3. Совместите с визуальным выделением:
- Выделите текст с помощью <SHIFT-V>, a затем "+y
- Чтобы вставить из буфера обмена в режиме вставки — <CTRL-R> +
- Попробуйте открыть другое приложение и вставить из системного буфера обмена
4. Запомните:
- Регистры буфера обмена доступны между разными экземплярами редактора Vim
- Регистр буфера обмена не всегда работает
- Регистр «чёрная дыра» предотвращает случайную перезапись других регистров
- Регистр по умолчанию " по-прежнему доступен для копирования и вставки
- Именованные регистры (a-z) остаются частными для каждой сессии Vim
5. Устранение неполадок с буфером обмена:
- Проверьте доступность с помощью команды :echo has('clipboard_working')
- При выводе 1 — означает доступно, 0 — означает, что компонент не включен
- В систме Linux может потребоваться пакет vim-gtk или vim-x11
(посмотрите вывод команды :version)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 2.1.6. ИЗЯЩЕСТВО ЗАКЛАДОК
** Избегайте действий, свойственных для дятлокодеров **
@@ -140,7 +232,7 @@
При написании программ часто возникает необходимость перемещения больших
фрагментов кода. Приём, приведённый далее, поможет избежать подсчёта номеров
строк, требуемых для операций вроде "a147d или :945,1091d a , или даже
хуже — i<C-r>=1091-935<ENTER> , как первое действие.
хуже — i<CTRL-R>=1091-935<ENTER> , как первое действие.
1. Переместите каретку к строке помеченной --->
@@ -192,39 +284,55 @@
Резюме урока 2.1
1. Чтобы сохранить (при удалении или копировании) текст для последующей
1. Текстовые объекты обеспечивают точное редактирование:
- iw или aw — только или включая слово
- i[ или a[ — внутри или включая скобки
- i" или a" — внутри или включая кавычки
- it или at — внутри или включая теги
- ip или ap — только или включая абзаца
- is или as — только или включая предложения
2. Чтобы сохранить (при удалении или копировании) текст для последующей
вставки, используйте имеющиеся 26 именованных регистра (a-z).
2. Чтобы скопировать целое слово при нахождении каретки на любом символе
3. Чтобы скопировать целое слово при нахождении каретки на любом символе
в этом слове, воспользуйтесь командой yiw
3. Чтобы изменить целое слово при нахождении каретки на любом символе в этом
4. Чтобы изменить целое слово при нахождении каретки на любом символе в этом
слове, воспользуйтесь командой ciw
4. Чтобы в режиме вставки вставить текст непосредственно из регистра,
воспользуйтесь командой <C-r>a
5. Чтобы в режиме вставки вставить текст непосредственно из регистра,
воспользуйтесь командой <CTRL-R>a
5. Чтобы в режиме вставки вставить результат вычисления простых математических
операций, воспользуйтесь командой <C-r>=60*60<ENTER>
6. Чтобы в режиме вставки вставить результат выполнения команд системы,
воспользуйтесь командой <C-r>=system('ls -l')
6. Чтобы в режиме вставки вставить результат вычисления простых математических
операций, воспользуйтесь командой <CTRL-R>=60*60<ENTER>
7. Чтобы в режиме вставки вставить результат выполнения команд системы,
воспользуйтесь командой <CTRL-R>=system('ls -l')<ENTER>
7. Чтобы просмотреть содержимое регистров, воспользуйтесь командой :reg
8. Учитывайте распределение удалённых целиком строк по команде dd — это
8. Чтобы просмотреть содержимое регистров, воспользуйтесь командой :reg
9. Учитывайте распределение удалённых целиком строк по команде dd — это
нумерованные регистры в порядке убывания, т. е. от 1 до 9.
Помните, что в нумерованных регистрах дольше хранятся те строки, которые
были уделены целиком, в отличие от любых других операций
9. Учитывайте, что в нумерованных регистрах кратковременно сохраняется всё
10. Учитывайте, что в нумерованных регистрах кратковременно сохраняется всё
что скопировано.
10. Чтобы установить закладку в режиме команд, воспользуйтесь командой
11. Чтобы установить закладку в режиме команд, воспользуйтесь командой
m[a-zA-Z0-9]
11. Чтобы переместить каретку на строку в которой установлена закладка,
12. Чтобы переместить каретку на строку в которой установлена закладка,
воспользуйтесь командой '
13. Специальные регистры:
- "+ и "* — системный буфер обмена (зависит от ОС)
- "_ — «чёрная дыра» (стирание удалённого или скопированного текста)
- "= — регистр результата вычислений
- "- — регистр малых удалений
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
На этом пока заканчивается вторая глава учебника по редактору Vim.
Работа над этой главой будет продолжена.
Вторая глава учебника была написана Полом Д. Паркером (Paul D. Parker).
Вторая глава учебника была написана Полом Д. Паркером (Paul D. Parker)
и Кристианом Брабандт (Christian Brabandt).
Restorer, перевод на русский язык, 2025, restorer@mail2k.ru
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -22,10 +22,22 @@ MINGWOLD = no
STATIC_STDCPLUS=no
#STATIC_STDCPLUS=yes
# If you use TDM-GCC(-64), change HAS_GCC_EH to "no".
# This is used when STATIC_STDCPLUS=yes.
HAS_GCC_EH=yes
STATIC_LIBS=
# Note: -static-libstdc++ is not available until gcc 4.5.x.
LDFLAGS += -shared
ifeq (yes, $(STATIC_STDCPLUS))
LDFLAGS += -static-libgcc -static-libstdc++
# Order important: gcc_eh must be placed before winpthread
STATIC_LIBS += -lstdc++ -lgcc
ifeq (yes, $(HAS_GCC_EH))
STATIC_LIBS += -lgcc_eh
endif
STATIC_LIBS += -lwinpthread
endif
ifeq ($(CROSS),yes)
@@ -71,7 +83,8 @@ $(DLL): $(OBJ) $(RES) $(DEFFILE)
-Wl,--whole-archive \
$^ \
-Wl,--no-whole-archive \
$(LIBS)
$(LIBS) \
-Wl,-Bstatic $(STATIC_LIBS) -Wl,-Bdynamic
gvimext.o: gvimext.cpp
$(CXX) $(CXXFLAGS) -DFEAT_GETTEXT -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) -c $? -o $@

View File

@@ -2746,40 +2746,40 @@ installvimdiff: $(DEST_BIN)/$(VIMDIFFTARGET)
installgvimdiff: $(DEST_BIN)/$(GVIMDIFFTARGET)
$(DEST_BIN)/$(EXTARGET): $(DEST_BIN)
cd $(DEST_BIN); ln -s $(VIMTARGET) $(EXTARGET)
cd $(DEST_BIN); ln -sf $(VIMTARGET) $(EXTARGET)
$(DEST_BIN)/$(VIEWTARGET): $(DEST_BIN)
cd $(DEST_BIN); ln -s $(VIMTARGET) $(VIEWTARGET)
cd $(DEST_BIN); ln -sf $(VIMTARGET) $(VIEWTARGET)
$(DEST_BIN)/$(GVIMTARGET): $(DEST_BIN)
cd $(DEST_BIN); ln -s $(VIMTARGET) $(GVIMTARGET)
cd $(DEST_BIN); ln -sf $(VIMTARGET) $(GVIMTARGET)
$(DEST_BIN)/$(GVIEWTARGET): $(DEST_BIN)
cd $(DEST_BIN); ln -s $(VIMTARGET) $(GVIEWTARGET)
cd $(DEST_BIN); ln -sf $(VIMTARGET) $(GVIEWTARGET)
$(DEST_BIN)/$(RVIMTARGET): $(DEST_BIN)
cd $(DEST_BIN); ln -s $(VIMTARGET) $(RVIMTARGET)
cd $(DEST_BIN); ln -sf $(VIMTARGET) $(RVIMTARGET)
$(DEST_BIN)/$(RVIEWTARGET): $(DEST_BIN)
cd $(DEST_BIN); ln -s $(VIMTARGET) $(RVIEWTARGET)
cd $(DEST_BIN); ln -sf $(VIMTARGET) $(RVIEWTARGET)
$(DEST_BIN)/$(RGVIMTARGET): $(DEST_BIN)
cd $(DEST_BIN); ln -s $(VIMTARGET) $(RGVIMTARGET)
cd $(DEST_BIN); ln -sf $(VIMTARGET) $(RGVIMTARGET)
$(DEST_BIN)/$(RGVIEWTARGET): $(DEST_BIN)
cd $(DEST_BIN); ln -s $(VIMTARGET) $(RGVIEWTARGET)
cd $(DEST_BIN); ln -sf $(VIMTARGET) $(RGVIEWTARGET)
$(DEST_BIN)/$(VIMDIFFTARGET): $(DEST_BIN)
cd $(DEST_BIN); ln -s $(VIMTARGET) $(VIMDIFFTARGET)
cd $(DEST_BIN); ln -sf $(VIMTARGET) $(VIMDIFFTARGET)
$(DEST_BIN)/$(GVIMDIFFTARGET): $(DEST_BIN)
cd $(DEST_BIN); ln -s $(VIMTARGET) $(GVIMDIFFTARGET)
cd $(DEST_BIN); ln -sf $(VIMTARGET) $(GVIMDIFFTARGET)
$(DEST_BIN)/$(EVIMTARGET): $(DEST_BIN)
cd $(DEST_BIN); ln -s $(VIMTARGET) $(EVIMTARGET)
cd $(DEST_BIN); ln -sf $(VIMTARGET) $(EVIMTARGET)
$(DEST_BIN)/$(EVIEWTARGET): $(DEST_BIN)
cd $(DEST_BIN); ln -s $(VIMTARGET) $(EVIEWTARGET)
cd $(DEST_BIN); ln -sf $(VIMTARGET) $(EVIEWTARGET)
# Create links for the manual pages with various names to vim. This is only
# done when the links (or manpages with the same name) don't exist yet.

View File

@@ -23,7 +23,7 @@ PSFLAGS = -NoLogo -NoProfile -Command
!ERROR The PowerShell program version 3.0 or higher is required for work.
!ENDIF
!IF ![echo $(COMSPEC) | 1> nul find "cmd.exe"]
!IF ![echo $(COMSPEC) | 1> nul $(SYSTEMROOT)\System32\find.exe "cmd.exe"]
CMD = $(COMSPEC)
!ELSE
CMD = $(SYSTEMROOT)\System32\cmd.exe

View File

@@ -276,13 +276,16 @@ blob2string(blob_T *blob, char_u **tofree, char_u *numbuf)
// Store bytes in the growarray.
ga_init2(&ga, 1, 4000);
ga_concat(&ga, (char_u *)"0z");
ga_concat_len(&ga, (char_u *)"0z", 2);
for (i = 0; i < blob_len(blob); i++)
{
size_t numbuflen;
if (i > 0 && (i & 3) == 0)
ga_concat(&ga, (char_u *)".");
vim_snprintf((char *)numbuf, NUMBUFLEN, "%02X", blob_get(blob, i));
ga_concat(&ga, numbuf);
ga_concat_len(&ga, (char_u *)".", 1);
numbuflen = vim_snprintf_safelen((char *)numbuf, NUMBUFLEN,
"%02X", blob_get(blob, i));
ga_concat_len(&ga, numbuf, numbuflen);
}
ga_append(&ga, NUL); // append a NUL at the end
*tofree = ga.ga_data;

View File

@@ -49,7 +49,6 @@ static int append_arg_number(win_T *wp, char_u *buf, size_t buflen, int add_file
static void free_buffer(buf_T *);
static void free_buffer_stuff(buf_T *buf, int free_options);
static int bt_nofileread(buf_T *buf);
static void no_write_message_buf(buf_T *buf);
static int do_buffer_ext(int action, int start, int dir, int count, int flags);
#ifdef UNIX
@@ -75,6 +74,7 @@ static garray_T buf_reuse = GA_EMPTY; // file numbers to recycle
static void
trigger_undo_ftplugin(buf_T *buf, win_T *win)
{
int win_was_locked = win->w_locked;
window_layout_lock();
buf->b_locked++;
win->w_locked = TRUE;
@@ -82,7 +82,7 @@ trigger_undo_ftplugin(buf_T *buf, win_T *win)
do_cmdline_cmd((char_u*)"if exists('b:undo_ftplugin') | :legacy :exe \
b:undo_ftplugin | endif");
buf->b_locked--;
win->w_locked = FALSE;
win->w_locked = win_was_locked;
window_layout_unlock();
}
@@ -706,7 +706,7 @@ aucmd_abort:
// If the buffer was in curwin and the window has changed, go back to that
// window, if it still exists. This avoids that ":edit x" triggering a
// "tabnext" BufUnload autocmd leaves a window behind without a buffer.
if (is_curwin && curwin != the_curwin && win_valid_any_tab(the_curwin))
if (is_curwin && curwin != the_curwin && win_valid_any_tab(the_curwin))
{
block_autocmds();
goto_tabpage_win(the_curtab, the_curwin);
@@ -781,16 +781,13 @@ aucmd_abort:
/*
* Remove the buffer from the list.
* Do not wipe out the buffer if it is used in a window.
*/
if (wipe_buf)
if (wipe_buf && buf->b_nwindows <= 0)
{
tabpage_T *tp;
win_T *wp;
// Do not wipe out the buffer if it is used in a window.
if (buf->b_nwindows > 0)
return FALSE;
FOR_ALL_TAB_WINDOWS(tp, wp)
mark_forget_file(wp, buf->b_fnum);
@@ -1436,19 +1433,10 @@ do_buffer_ext(
if ((flags & DOBUF_NOPOPUP) && bt_popup(buf) && !bt_terminal(buf))
return OK;
#endif
if (action == DOBUF_GOTO && buf != curbuf)
{
if (!check_can_set_curbuf_forceit((flags & DOBUF_FORCEIT) != 0))
// disallow navigating to another buffer when 'winfixbuf' is applied
return FAIL;
if (buf->b_locked_split)
{
// disallow navigating to a closing buffer, which like splitting,
// can result in more windows displaying it
emsg(_(e_cannot_switch_to_a_closing_buffer));
return FAIL;
}
}
if (action == DOBUF_GOTO && buf != curbuf
&& !check_can_set_curbuf_forceit((flags & DOBUF_FORCEIT) != 0))
// disallow navigating to another buffer when 'winfixbuf' is applied
return FAIL;
if ((action == DOBUF_GOTO || action == DOBUF_SPLIT)
&& (buf->b_flags & BF_DUMMY))
@@ -1656,15 +1644,17 @@ do_buffer_ext(
/*
* make "buf" the current buffer
*/
if (action == DOBUF_SPLIT) // split window first
// If 'switchbuf' is set jump to the window containing "buf".
if (action == DOBUF_SPLIT && swbuf_goto_win_with_buf(buf) != NULL)
return OK;
// Whether splitting or not, don't open a closing buffer in more windows.
if (buf != curbuf && buf->b_locked_split)
{
// If 'switchbuf' is set jump to the window containing "buf".
if (swbuf_goto_win_with_buf(buf) != NULL)
return OK;
if (win_split(0, 0) == FAIL)
return FAIL;
emsg(_(e_cannot_switch_to_a_closing_buffer));
return FAIL;
}
if (action == DOBUF_SPLIT && win_split(0, 0) == FAIL) // split window first
return FAIL;
// go to current buffer - nothing to do
if (buf == curbuf)
@@ -2088,8 +2078,8 @@ do_autochdir(void)
}
#endif
static void
no_write_message_buf(buf_T *buf UNUSED)
void
no_write_message_buf(buf_T *buf)
{
#ifdef FEAT_TERMINAL
if (term_job_running(buf->b_term))
@@ -2537,6 +2527,9 @@ free_buf_options(
clear_string_option(&buf->b_p_qe);
buf->b_p_ac = -1;
buf->b_p_ar = -1;
#ifdef HAVE_FSYNC
buf->b_p_fs = -1;
#endif
buf->b_p_ul = NO_LOCAL_UNDOLEVEL;
clear_string_option(&buf->b_p_lw);
clear_string_option(&buf->b_p_bkc);

View File

@@ -229,6 +229,16 @@ buf_write_bytes(struct bw_info *ip)
else
c = buf[wlen];
}
// Check that there is enough space
if (!(flags & FIO_LATIN1))
{
size_t need = (flags & FIO_UCS4) ? 4 : 2;
if ((flags & FIO_UTF16) && c >= 0x10000)
need = 4;
if ((size_t)(p - ip->bw_conv_buf) + need > ip->bw_conv_buflen)
return FAIL;
}
if (ucs2bytes(c, &p, flags) && !ip->bw_conv_error)
{
@@ -1698,11 +1708,13 @@ buf_write(
wb_flags = get_fio_flags(fenc);
if (wb_flags & (FIO_UCS2 | FIO_UCS4 | FIO_UTF16 | FIO_UTF8))
{
// overallocate a bit, in case we read incomplete multi-byte chars
int size = bufsize + CONV_RESTLEN;
// Need to allocate a buffer to translate into.
if (wb_flags & (FIO_UCS2 | FIO_UTF16 | FIO_UTF8))
write_info.bw_conv_buflen = bufsize * 2;
write_info.bw_conv_buflen = size * 2;
else // FIO_UCS4
write_info.bw_conv_buflen = bufsize * 4;
write_info.bw_conv_buflen = size * 4;
write_info.bw_conv_buf = alloc(write_info.bw_conv_buflen);
if (write_info.bw_conv_buf == NULL)
end = 0;
@@ -2199,7 +2211,8 @@ restore_backup:
// For a device do try the fsync() but don't complain if it does not
// work (could be a pipe).
// If the 'fsync' option is FALSE, don't fsync(). Useful for laptops.
if (p_fs && vim_fsync(fd) != 0 && !device)
if ((buf->b_p_fs >= 0 ? buf->b_p_fs : p_fs) && vim_fsync(fd) != 0
&& !device)
{
errmsg = (char_u *)_(e_fsync_failed);
end = 0;

View File

@@ -1635,7 +1635,14 @@ channel_write_in(channel_T *channel)
ch_log(channel, "Finished writing all lines to channel");
// Close the pipe/socket, so that the other side gets EOF.
ch_close_part(channel, PART_IN);
#ifdef MSWIN
// At this point, the input part of the conpty channel must not be
// closed. If it is closed, the pipe will be destroyed, the console
// that was using it will be destroyed, and the process running within
// it will be forcibly terminated, so this needs to be prevented.
if (!channel->ch_anonymous_pipe)
#endif
ch_close_part(channel, PART_IN);
}
else
ch_log(channel, "Still %ld more lines to write",
@@ -4168,7 +4175,17 @@ channel_handle_events(int only_keep_open)
if (fd == INVALID_FD)
continue;
int r = channel_wait(channel, fd, 0);
// In normal cases, a timeout of 0 is sufficient.
//
// But, in Windows conpty terminals, the final output of a
// terminated process may be missed. In this case, in order for
// Vim to read the final output, it is necessary to set the timeout
// to 1 msec or more. It seems that the final output can be
// received by calling Sleep() once within channel_wait(). Note
// that ch_killing can only be TRUE in conpty terminals, so it has
// no side effects in environments other than conpty.
int r = channel_wait(channel, fd, (channel->ch_killing &&
(part == PART_OUT || part == PART_ERR)) ? 1 : 0);
if (r == CW_READY)
channel_read(channel, part, "channel_handle_events");

View File

@@ -773,7 +773,7 @@ chartabsize(char_u *p, colnr_T col)
RET_WIN_BUF_CHARTABSIZE(curwin, curbuf, p, col)
}
#if defined(FEAT_LINEBREAK)
#if defined(FEAT_LINEBREAK) || defined(FEAT_PROP_POPUP)
int
win_chartabsize(win_T *wp, char_u *p, colnr_T col)
{
@@ -1226,11 +1226,11 @@ win_lbr_chartabsize(
win_T *wp = cts->cts_win;
#if defined(FEAT_PROP_POPUP) || defined(FEAT_LINEBREAK)
char_u *line = cts->cts_line; // start of the line
int size;
#endif
char_u *s = cts->cts_ptr;
colnr_T vcol = cts->cts_vcol;
#ifdef FEAT_LINEBREAK
int size;
int mb_added = 0;
int n;
char_u *sbr;
@@ -1269,20 +1269,23 @@ win_lbr_chartabsize(
* First get the normal size, without 'linebreak' or text properties
*/
size = win_chartabsize(wp, s, vcol);
# ifdef FEAT_LINEBREAK
if (*s == NUL)
{
// 1 cell for EOL list char (if present), as opposed to the two cell ^@
// for a NUL character in the text.
size = has_lcs_eol ? 1 : 0;
}
# ifdef FEAT_LINEBREAK
int is_doublewidth = has_mbyte && size == 2 && MB_BYTE2LEN(*s) > 1;
# endif
# ifdef FEAT_PROP_POPUP
if (cts->cts_has_prop_with_text)
{
# ifdef FEAT_LINEBREAK
int tab_size = size;
# endif
int charlen = *s == NUL ? 1 : mb_ptr2len(s);
int i;
int col = (int)(s - line);
@@ -1338,6 +1341,7 @@ win_lbr_chartabsize(
else
size += cells;
cts->cts_start_incl = tp->tp_flags & TP_FLAG_START_INCL;
# ifdef FEAT_LINEBREAK
if (*s == TAB)
{
// tab size changes because of the inserted text
@@ -1345,6 +1349,7 @@ win_lbr_chartabsize(
tab_size = win_chartabsize(wp, s, vcol + size);
size += tab_size;
}
# endif
if (tp->tp_col == MAXCOL && (tp->tp_flags
& (TP_FLAG_ALIGN_ABOVE | TP_FLAG_ALIGN_BELOW)))
// count extra line for property above/below
@@ -1520,8 +1525,8 @@ win_lbr_chartabsize(
# ifdef FEAT_PROP_POPUP
size += cts->cts_first_char;
# endif
return size;
# endif
return size;
#endif
}

View File

@@ -2076,16 +2076,30 @@ find_match(int lookfor, linenr_T ourscope)
if (theirscope->lnum > ourscope)
continue;
// if it was an "else" (that's not an "else if")
// then we need to go back to another if, so
// increment elselevel
look = cin_skipcomment(ml_get_curline());
if (cin_iselse(look))
// When looking for if, we ignore "if" and "else" in a deeper do-while loop.
if (!(lookfor == LOOKFOR_IF && whilelevel))
{
mightbeif = cin_skipcomment(look + 4);
if (!cin_isif(mightbeif))
++elselevel;
continue;
// if it was an "else" (that's not an "else if")
// then we need to go back to another if, so
// increment elselevel
if (cin_iselse(look))
{
mightbeif = cin_skipcomment(look + 4);
if (!cin_isif(mightbeif))
++elselevel;
continue;
}
// If it's an "if" decrement elselevel
if (cin_isif(look))
{
elselevel--;
// When looking for an "if" ignore "while"s that
// get in the way.
if (elselevel == 0 && lookfor == LOOKFOR_IF)
whilelevel = 0;
}
}
// if it was a "while" then we need to go back to
@@ -2096,17 +2110,6 @@ find_match(int lookfor, linenr_T ourscope)
continue;
}
// If it's an "if" decrement elselevel
look = cin_skipcomment(ml_get_curline());
if (cin_isif(look))
{
elselevel--;
// When looking for an "if" ignore "while"s that
// get in the way.
if (elselevel == 0 && lookfor == LOOKFOR_IF)
whilelevel = 0;
}
// If it's a "do" decrement whilelevel
if (cin_isdo(look))
whilelevel--;

View File

@@ -3534,7 +3534,7 @@ adjust_clip_reg(int *rp)
#ifdef FEAT_CLIPBOARD_PROVIDER
if (clipmethod == CLIPMETHOD_PROVIDER)
{
if (clip_unnamed != 0)
if (*rp == 0 && clip_unnamed != 0)
*rp = ((clip_unnamed & CLIP_UNNAMED_PLUS)) ? '+' : '*';
return;
}

View File

@@ -4773,10 +4773,13 @@ copy_substring_from_pos(pos_T *start, pos_T *end, char_u **match,
{
for (lnum = start->lnum + 1; lnum < end->lnum; lnum++)
{
int linelen;
line = ml_get(lnum);
if (ga_grow(&ga, ml_get_len(lnum) + 2) != OK)
linelen = (int)ml_get_len(lnum);
if (ga_grow(&ga, linelen + 2) != OK)
return FAIL;
ga_concat(&ga, line);
ga_concat_len(&ga, line, linelen);
if (exacttext)
ga_concat_len(&ga, (char_u *)"\\n", 2);
else

View File

@@ -817,7 +817,7 @@ dict2string(typval_T *tv, int copyID, int restore_copyID)
if (first)
first = FALSE;
else
ga_concat(&ga, (char_u *)", ");
ga_concat_len(&ga, (char_u *)", ", 2);
tofree = string_quote(hi->hi_key, FALSE);
if (tofree != NULL)
@@ -825,7 +825,7 @@ dict2string(typval_T *tv, int copyID, int restore_copyID)
ga_concat(&ga, tofree);
vim_free(tofree);
}
ga_concat(&ga, (char_u *)": ");
ga_concat_len(&ga, (char_u *)": ", 2);
s = echo_string_core(&HI2DI(hi)->di_tv, &tofree, numbuf, copyID,
FALSE, restore_copyID, TRUE);
if (s != NULL)

View File

@@ -1755,7 +1755,7 @@ win_line(
}
#endif
#if defined(FEAT_LINEBREAK) || defined(FEAT_PROP_POPUP)
#if defined(FEAT_LINEBREAK) && defined(FEAT_PROP_POPUP)
colnr_T vcol_first_char = 0;
if (wp->w_p_lbr && number_only == 0)
{
@@ -2775,7 +2775,9 @@ win_line(
}
wlv.extra_for_textprop = FALSE;
# ifdef FEAT_LINEBREAK
in_linebreak = FALSE;
# endif
}
#endif
}

View File

@@ -131,7 +131,7 @@ fill_evalarg_from_eap(evalarg_T *evalarg, exarg_T *eap, int skip)
evalarg->eval_getline = eap->ea_getline;
evalarg->eval_cookie = eap->cookie;
}
evalarg->eval_class = eap->class;
evalarg->eval_class = eap->ea_class;
}
/*
@@ -6270,14 +6270,14 @@ partial_tv2string(
fname = string_quote(pt == NULL ? NULL : partial_name(pt), FALSE);
ga_init2(&ga, 1, 100);
ga_concat(&ga, (char_u *)"function(");
ga_concat_len(&ga, (char_u *)"function(", 9);
if (fname != NULL)
{
// When using uf_name prepend "g:" for a global function.
if (pt != NULL && pt->pt_name == NULL && fname[0] == '\''
&& vim_isupper(fname[1]))
{
ga_concat(&ga, (char_u *)"'g:");
ga_concat_len(&ga, (char_u *)"'g:", 3);
ga_concat(&ga, fname + 1);
}
else
@@ -6286,21 +6286,21 @@ partial_tv2string(
}
if (pt != NULL && pt->pt_argc > 0)
{
ga_concat(&ga, (char_u *)", [");
ga_concat_len(&ga, (char_u *)", [", 3);
for (i = 0; i < pt->pt_argc; ++i)
{
if (i > 0)
ga_concat(&ga, (char_u *)", ");
ga_concat_len(&ga, (char_u *)", ", 2);
ga_concat(&ga, tv2string(&pt->pt_argv[i], &tf, numbuf, copyID));
vim_free(tf);
}
ga_concat(&ga, (char_u *)"]");
ga_concat_len(&ga, (char_u *)"]", 1);
}
if (pt != NULL && pt->pt_dict != NULL)
{
typval_T dtv;
ga_concat(&ga, (char_u *)", ");
ga_concat_len(&ga, (char_u *)", ", 2);
dtv.v_type = VAR_DICT;
dtv.vval.v_dict = pt->pt_dict;
ga_concat(&ga, tv2string(&dtv, &tf, numbuf, copyID));
@@ -6799,13 +6799,13 @@ var2fpos(
char_u *name;
static pos_T pos;
pos_T *pp;
int error = FALSE;
// Argument can be [lnum, col, coladd].
if (varp->v_type == VAR_LIST)
{
list_T *l;
int len;
int error = FALSE;
listitem_T *li;
l = varp->vval.v_list;
@@ -6857,11 +6857,16 @@ var2fpos(
if (name == NULL)
return NULL;
error = TRUE;
pos.lnum = 0;
if (name[0] == '.' && (!in_vim9script() || name[1] == NUL))
if (name[0] == '.')
{
// cursor
pos = curwin->w_cursor;
if (!in_vim9script() || name[1] == NUL)
{
error = FALSE;
// cursor
pos = curwin->w_cursor;
}
}
else if (name[0] == 'v' && name[1] == NUL)
{
@@ -6871,14 +6876,17 @@ var2fpos(
else
pos = curwin->w_cursor;
}
else if (name[0] == '\'' && (!in_vim9script()
|| (name[1] != NUL && name[2] == NUL)))
else if (name[0] == '\'')
{
// mark
pp = getmark_buf_fnum(curbuf, name[1], FALSE, fnum);
if (pp == NULL || pp == (pos_T *)-1 || pp->lnum <= 0)
return NULL;
pos = *pp;
if (!in_vim9script() || (name[1] != NUL && name[2] == NUL))
{
error = FALSE;
// mark
pp = getmark_buf_fnum(curbuf, name[1], FALSE, fnum);
if (pp == NULL || pp == (pos_T *)-1 || pp->lnum <= 0)
return NULL;
pos = *pp;
}
}
if (pos.lnum != 0)
{
@@ -6929,7 +6937,7 @@ var2fpos(
}
return &pos;
}
if (in_vim9script())
if (in_vim9script() && error)
semsg(_(e_invalid_value_for_line_number_str), name);
return NULL;
}

View File

@@ -229,7 +229,7 @@ check_arg_type(
type_T *actual,
argcontext_T *context)
{
return need_type(actual, expected, FALSE,
return need_type(actual, expected, 0,
context->arg_idx - context->arg_count, context->arg_idx + 1,
context->arg_cctx, FALSE, FALSE);
}
@@ -243,7 +243,7 @@ check_arg_type_mod(
type_T *actual,
argcontext_T *context)
{
if (need_type(actual, expected, FALSE,
if (need_type(actual, expected, 0,
context->arg_idx - context->arg_count, context->arg_idx + 1,
context->arg_cctx, FALSE, FALSE) == FAIL)
return FAIL;
@@ -6175,8 +6175,17 @@ getregionpos(
{
colnr_T sc1, ec1, sc2, ec2;
#ifdef FEAT_LINEBREAK
int lbr_saved = reset_lbr();
#endif
getvvcol(curwin, p1, &sc1, NULL, &ec1);
getvvcol(curwin, p2, &sc2, NULL, &ec2);
#ifdef FEAT_LINEBREAK
restore_lbr(lbr_saved);
#endif
oap->motion_type = MBLOCK;
oap->inclusive = TRUE;
oap->op_type = OP_NOP;

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