- Highlight bytes literals
- Do not highlight Unicode escape sequences in bytes literals
fixes: #14033fixes: #17726closes: #17728
Signed-off-by: Rob B <github@0x7e.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- 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#17721closes: #17731
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- 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>
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: #17323closes: #17735
Signed-off-by: Christian Brabandt <cb@256bit.org>
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>
- 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>
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-3055603968closes: #17716
Signed-off-by: Christian Brabandt <cb@256bit.org>
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: #8855fixes: #17527closes: #17695
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: helptoc: does not handle code sections in markdown well
(VimWei)
Solution: Skip over fenced code sections (lacygoill), add a test.
fixes: #17699closes: #17710
Co-authored-by: lagygoill <lacygoill@lacygoill.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- 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>
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>
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>
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: #17654closes: #17667
Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
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>
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>
Problem: getcompletiontype() crashes when no completion is available
(after v9.1.1509).
Solution: Don't call set_expand_context() (zeertzjq)
fixes: #17681closes: #17684
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
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>
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>
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: #17606closes: #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>
- Match escape sequences in :command replacement blocks.
- Match :substitute after escape sequences (a temporary fix until Ex
commands are contained).
fixes: #17326closes: #17663
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
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>
- 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#17467closes: #17556
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
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>
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>
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>