5528 Commits

Author SHA1 Message Date
a24f5be86d runtime(python): highlight bytes in python
- Highlight bytes literals
- Do not highlight Unicode escape sequences in bytes literals

fixes: #14033
fixes: #17726
closes: #17728

Signed-off-by: Rob B <github@0x7e.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-14 22:30:59 +02:00
baa781a4c3 runtime(python2): highlight unicode strings in python2
fixes: #14033
fixes: #17726
closes: #17729

Signed-off-by: Rob B <github@0x7e.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-14 22:21:44 +02:00
836e54f5de patch 9.1.1544: :retab cannot be limited to indentation only
Problem:  :retab cannot be limited to indentation only
Solution: add the optional -indentonly parameter
          (Hirohito Higashi)

closes: #17730

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-14 22:11:34 +02:00
e85a66a4d4 runtime(erlang): Add support for triple-quoted strings and docstrings
Erlang recently added the `-moduledoc` attribute as well as triple
quoted strings and the `~` prefix for binary strings, see [1].

Erlang also added nominal types. See EEP-69 [2].

This commit removes the documentation of "g:erlang_highlight_bifs" and
"g:erlang_highlight_special_atoms", which are not longer supported.
"g:erlang_old_style_highlight" is kept undocumented (as it should not be
used by new users).

This commit contains the modifications in the following PR and commits:

- vim-erlang/vim-erlang-runtime#58
- vim-erlang/vim-erlang-runtime@43d18d3
- vim-erlang/vim-erlang-runtime@ac88ebf
- vim-erlang/vim-erlang-runtime@19c1be9
- vim-erlang/vim-erlang-runtime@7f5cefc
- vim-erlang/vim-erlang-runtime@976b10b

[1]: https://www.erlang.org/doc/system/documentation.html
[2]: https://www.erlang.org/eeps/eep-0069

closes: #17687

Co-authored-by: Johannes Christ <jc@jchri.st>
Signed-off-by: Csaba Hoch <csaba@cursorinsight.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-14 22:03:06 +02:00
1341176e7b runtime(vim): Update help syntax file, improve highlighting of included Vim examples
- Take over as file maintainer.
- Improve highlighting of legacy script examples by using :syn-iskeyword
  with the default 'iskeyword' value. Vim9 script examples are not
  supported yet.
- Match admonition labels in more contexts.
- Match URLs in more contexts.

fixes #17721
closes: #17731

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-13 17:53:26 +02:00
ce1d1969f3 runtime(vim): Update base syntax, improve :match highlighting
- Match the range prefix separately as a count.
- Match an explicit count of 1, rarely used but seen in the wild.
- Allow whitespace between the count and command.

closes: #17717

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-13 09:05:23 +02:00
6f85cec4fb runtime(python): update rendering of Unicode named literals in syntax script
This change:

* enforces that the alias starts with a letter
* allows the other words in an alias to be separated by either a space
  or a hyphen, but not both or double separators
* allows only a letter after space, possibly followed by letters or
  digits
* allows both letters and digits after a hyphen

Tested with:

    a = '\N{Cyrillic Small Letter Zhe} is pronounced as zh in pleasure'
    b = '\N{NO-BREAK SPACE} is needed here'
    # ... other tests here
    r = '\N{HENTAIGANA LETTER E-1} is a Japanese hiragana letter archaic ye'
    s = '\N{CUNEIFORM SIGN NU11 TENU} is a correction alias'
    t = '\N{RECYCLING SYMBOL FOR TYPE-1 PLASTICS} base shape is a triangle'
    print(a)
    print(b)
    print(r)
    print(s)
    print(t)

The tests confirm the behavior and are selected from real Unicode
tables/aliases to check these combinations based on the specification.

fixes: #17323
closes: #17735

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-13 08:23:24 +02:00
7306e8fcdb tests: string options in gen_opt_test.vim not fully sorted
Problem:  tests: string options in gen_opt_test.vim aren't fully sorted.
Solution: Sort the string options alphabetically.  Also make description
          of 'maxsearchcount' start with lower-case for consistency with
          other options, update documentation for searchcount().

closes: #17720

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-11 19:17:07 +02:00
87406c33c7 runtime(help_ru): Update help_ru syntax script
closes: #17718

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-10 20:52:18 +02:00
6ac2e4aa0a runtime(vim): Update base syntax, improve function call highlighting
- Match more function calls.
- Contain function call syntax groups.
- Improve differentiation between Ex commands and builtin functions with
  the same name.  Remove special cases.  Command modifiers are not
  currently well differentiated from functions.

closes: #17712

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-10 20:50:06 +02:00
ea528a9482 patch 9.1.1537: helptoc: still some issues when markdown code blocks
Problem:  helptoc: still some issues when parsing markdown code blocks
          (VimWei)
Solution: assign nextline to curline before starting the next loop
          iteration; when processing fenced code blocks, flip the
          skip_fence variable, update the test to be more comprehensive

related: https://github.com/vim/vim/issues/17699#issuecomment-3055603968
closes: #17716

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-10 20:44:51 +02:00
b7b7fa04bf patch 9.1.1535: the maximum search count uses hard-coded value 99
Problem:  The maximum search count uses a hard-coded value of 99
          (Andres Monge, Joschua Kesper)
Solution: Make it configurable using the 'maxsearchcount' option.

related: #8855
fixes: #17527
closes: #17695

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-10 20:34:41 +02:00
6715b3510e patch 9.1.1533: helptoc: does not handle code sections in markdown well
Problem:  helptoc: does not handle code sections in markdown well
          (VimWei)
Solution: Skip over fenced code sections (lacygoill), add a test.

fixes: #17699
closes: #17710

Co-authored-by: lagygoill <lacygoill@lacygoill.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-09 20:26:07 +02:00
3987eac572 runtime(doc): clarify how ex ranges are adjusted when acting on folds
closes: #17696

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-09 19:59:22 +02:00
a46e9e45a9 translation(ru): update vim-ru according to patch 9.1.1485
closes: #17709

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-09 19:45:43 +02:00
43855b7396 translation(ru): update vimtutor-ru man according to commit 5bbdd0b
closes: #17708

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-09 19:43:51 +02:00
41ee98c3c5 runtime(filetype): fix incorrect pattern and break early
- Using `\n` is incorrect, as result of getline() does not contain line
  breaks and only uses `\n` for NUL bytes.
- Return when b:asmsyntax is set, like many other filetypes.

closes: #17706

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-09 18:23:52 +02:00
bda55df3b8 Revert "runtime(haskell): Add single quote to iskeyword in ftplugin (#8191)"
This reverts commit 5e6e4042b1.

related: #8191

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-09 18:18:22 +02:00
c4bca1de0b patch 9.1.1532: termdebug: not enough ways to configure breakpoints
Problem:  termdebug: not enough ways to configure breakpoints
Solution: add the termdebug_config['signs'] config setting, rework the
          termdebug test cases (Dimitry Ishenko)

Allow to configure custom breakpoint signs so one can do something like
this:

```vim
let g:termdebug_config['signs'] = ['>1', '>2', '>3', '>4', '>5', '>6', '>7', '>8', '>9']
let g:termdebug_config['sign'] = '>>'
```

where the first 9 breakpoints will have their own signs and the rest
will be the same (>>).

While at it, rework the test for the termdebug plugin:

- Added test for g:termdebug_config['signs'].
- Added test for g:termdebug_config['sign'].
- Moved test for g:termdebug_config['sign_decimal'] into
  Test_termdebug_basic()

closes: #17694

Signed-off-by: Dimitry Ishenko <dimitry.ishenko@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-08 23:13:14 +02:00
dbe45be625 patch 9.1.1529: Win32: the toolbar in the GUI is old and dated
Problem:  Win32: the toolbar in the GUI is old and dated
Solution: Include improved icons from Fatcow (CC by 3.0)
          (RestorerZ)

closes: vim/vim-win32-installer#372
closes: #17698

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-08 23:00:13 +02:00
32a1b26ef3 runtime(filetype): improve asm heuristics and move into FTasmsyntax()
fixes: #17474
closes: #17683

Signed-off-by: Wu Yongwei <wuyongwei@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-08 21:42:37 +02:00
93c2d5bf7f patch 9.1.1526: completion: search completion match may differ in case
Problem:  completion: search completion match may differ in case
          (techntools)
Solution: add "exacttext" to 'wildoptions' value (Girish Palya)

This flag does the following:

exacttext
      When this flag is present, search pattern completion
      (e.g., in |/|, |?|, |:s|, |:g|, |:v|, and |:vim|)
      shows exact buffer text as menu items, without
      preserving regex artifacts like position
      anchors (e.g., |/\<|). This provides more intuitive
      menu items that match the actual buffer text. However,
      searches may be less accurate since the pattern is not
      preserved exactly.
      By default, Vim preserves the typed pattern (with
      anchors) and appends the matched word. This preserves
      search correctness, especially when using regular
      expressions or with 'smartcase' enabled. However, the
      case of the appended matched word may not exactly
      match the case of the word in the buffer.

fixes: #17654
closes: #17667

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-08 21:29:02 +02:00
b3eaae21b9 runtime(netrw): restore blank line cleanup after file listing
Problem:  v182 refactoring removed blank line cleanup (g/^$/d) from
          s:LocalListing(), causing empty lines between directories
          and files.
Solution: Add the missing cleanup after append() in s:PerformListing()
          (uma-chan).

closes: #17672

Co-authored-by: Luca Saccarola <96259932+saccarosium@users.noreply.github.com>
Signed-off-by: uma-chan <127664533+i9wa4@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-07 22:04:11 +02:00
eb380b991c patch 9.1.1525: tests: testdir/ is a bit messy
Problem:  tests: testdir is a bit messy
Solution: move test scripts into testdir/util/ directory

src/testdir/ has become a dumping ground mixing test cases with utility
functions. Let's fix this by moving all utility functions into the
testdir/util/ directory

Also a few related changes had to be done:
- Update Filelist
- update README.txt and mention the new directory layout
- fix shadowbuild by linking the util directory into the shadow dir

closes: #17677

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-07 20:53:55 +02:00
57d6d00433 runtime(doc): Add documentation style
closes: #17627

Co-authored-by: Phạm Bình An <111893501+brianhuster@users.noreply.github.com>
Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-07 19:19:48 +02:00
e2c0f81dd0 patch 9.1.1518: getcompletiontype() may crash
Problem:  getcompletiontype() crashes when no completion is available
          (after v9.1.1509).
Solution: Don't call set_expand_context() (zeertzjq)

fixes: #17681
closes: #17684

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-06 20:26:56 +02:00
d6a5edd613 runtime(optwin): add missing values for tabpanel option
closes: #17685

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-06 20:17:36 +02:00
f79695c2d8 runtime(doc): fix a few typos introduced in 0ae9e19540
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-06 18:27:22 +02:00
244198f039 runtime(autopkgtest): add ftplugin file for autopkgtest
closes: #17679

Signed-off-by: James McCoy <jamessan@debian.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-06 18:01:18 +02:00
e9d331d173 runtime(autopkgtest): add syntax file for autopkgtest
related: #17679

Signed-off-by: James McCoy <jamessan@debian.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-06 18:00:28 +02:00
48c823ca01 runtime(debcontrol): move kernel/architecture definitions to shared/debarchitectures.vim
related: #17679

Signed-off-by: James McCoy <jamessan@debian.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-06 17:59:40 +02:00
5bcc492649 patch 9.1.1517: filetype: autopkgtest files are not recognized
Problem:  filetype: autopkgtest files are not recognized
Solution: detect */debian/tests/control files as autopkgtest filetype
          (James McCoy)

Autopkgtest is a Debian tool for testing installed versions of packages
when other, related packages are updated.

Reference:
- https://www.debian.org/doc/debian-policy/autopkgtest.txt

related: #17679

Signed-off-by: James McCoy <jamessan@jamessan.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-06 17:57:35 +02:00
0ae9e19540 runtime(doc): add a section for options influencing search
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-06 10:26:01 +02:00
5911ac5023 runtime(vim): Update base-syntax, match :filetype in functions
closes: #17671

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-05 16:48:02 +02:00
ba11e78f1d patch 9.1.1512: completion: can only complete from keyword characters
Problem:  completion: can only complete from keyword characters
Solution: remove this restriction, allow completion functions when
          called from i_CTRL-N/i_CTRL-P to be triggered from non-keyword
          characters (Girish Palya)

Previously, functions specified in the `'complete'` option were
restricted to starting completion only from keyword characters (as
introduced in PR 17065). This change removes that restriction.

With this change, user-defined functions (e.g., `omnifunc`, `userfunc`)
used in `'complete'` can now initiate completion even when triggered
from non-keyword characters. This makes it easier to reuse existing
functions alongside other sources without having to consider whether the
cursor is on a keyword or non-keyword character, or worry about where
the replacement should begin (i.e., the `findstart=1` return value).

The logic for both the “collection” and “filtering” phases now fully
respects each source’s specified start column. This also extends to
fuzzy matching, making completions more predictable.

Internally, this builds on previously merged infrastructure that tracks
per-source metadata. This PR focuses on applying that metadata to
compute the leader string and insertion text appropriately for each
match.

Also, a memory corruption has been fixed in prepare_cpt_compl_funcs().

closes: #17651

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-05 16:11:44 +02:00
96b3ef2389 patch 9.1.1509: patch 9.1.1505 was not good
Problem:  Patch 9.1.1505 was not good
Solution: Revert "patch 9.1.1505: not possible to return completion type
          for :ex command" and instead add the getcompletiontype()
          function (Hirohito Higashi).

related: #17606
closes: #17662

Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-05 15:34:24 +02:00
a8b86605f3 runtime(vim): Update base-syntax, match escape sequences in :command blocks
- Match escape sequences in :command replacement blocks.
- Match :substitute after escape sequences (a temporary fix until Ex
  commands are contained).

fixes: #17326
closes: #17663

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-05 15:21:46 +02:00
f9d87fa6ba runtime(go): fix b:undo_ftplugin
last `unmap` can cause the error "E31: No such mapping" when
`doaudocmd FileType go` if appending other commands to `b:undo_ftplugin` i.e.
the space and the next bar as `let b:undo_ftplugin .= ' | setl ...'`.

closes: #17664

Signed-off-by: ichizok <gclient.gaap@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-05 15:18:41 +02:00
c233c2e6a5 runtime(vim): Update base-syntax and generator, match all default highlight groups
- Match Conceal, ComplMatchIns, MsgArea, Terminal, and User[1-9]
  highlight groups.
- Generate the vimGroup syntax group from runtime/syncolor.vim.
- Match :SynColor and :SynLink as special user commands.

fixes #17467
closes: #17556

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-03 20:59:11 +02:00
a9b5e4af43 runtime(vim): Update base-syntax and generator, generate command modifiers
Generate Ex command modifiers from the modifier table in src/ex_docmd.c

closes: #17564

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-03 20:47:50 +02:00
4ade668fb6 patch 9.1.1507: symlinks are resolved on :cd commands
Problem:  File paths change from symlink to target path after :cd command
          when editing files through symbolic links
Solution: Add "~" flag to 'cpoptions' to control symlink resolution.
          When not included (default), symlinks are resolved maintaining
          backward compatibility. When included, symlinks are preserved
          providing the improved behavior. (glepnir)

related: neovim/neovim#15695
closes: #17628

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-03 20:44:50 +02:00
0d50d6089d runtime(postscr): Correct some standard font names in syntax
closes: #17647

Signed-off-by: Mike Williams <mrmrdubya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-03 20:31:52 +02:00
29ebebd343 runtime(optwin): show 'guiligatures' option also on MS-Windows builds
closes: #17650

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-03 20:27:37 +02:00
5d2354fc07 patch 9.1.1505: not possible to return completion type for :ex command
Problem:  not possible to return command-line completion type for :ex
          command
Solution: make getcmdcompltype() accept an optional and return the
          command-line completion for that arg (Shougo Matsushita).

closes: #17606

Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-03 19:57:00 +02:00
20eb68a8f2 patch 9.1.1504: filetype: numbat files are not recognized
Problem:  filetype: numbat files are not recognized
Solution: detect *.nbt files as numbat filetype (0xadk)

References:
- https://github.com/sharkdp/numbat
- https://github.com/sharkdp/numbat/tree/master/numbat/modules

closes: #17643

Signed-off-by: 0xadk <0xadk@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-02 19:46:05 +02:00
b46e3aa0fa patch 9.1.1503: filetype: haxe files are not recognized
Problem:  filetype: haxe files are not recognized
Solution: detect *.hx files as haxe filetype (0xadk)

References:
- https://haxe.org/
- https://code.haxe.org/category/beginner/hello-world.html

closes: #17644

Signed-off-by: 0xadk <0xadk@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-02 19:41:11 +02:00
fdcdded4d5 patch 9.1.1502: filetype: quickbms files are not recognized
Problem:  filetype: quickbms files are not recognized
Solution: detect *.bms files as quickbms filetype
          (0xadk)

Reference:
- https://aluigi.altervista.org/quickbms.htm

closes: #17645

Signed-off-by: 0xadk <0xadk@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-02 19:33:36 +02:00
b211916e0a patch 9.1.1501: filetype: flix files are not recognized
Problem:  filetype: flix files are not recognized
Solution: detect *.flix files as flix filetype
          (0xadk)

References:
- https://flix.dev/
- https://doc.flix.dev/introduction.html

closes: #17646

Signed-off-by: 0xadk <0xadk@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-02 18:55:55 +02:00
5ecee30dcd runtime(go): add section movement mappings to ftplugin
closes: #17641

Signed-off-by: Rob B <github@0x7e.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-02 18:47:50 +02:00
651edf33eb runtime(doc): Tweak documentation style
closes: #17638

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-01 22:07:50 +02:00