Problem: netrw: need better tests for absolute paths
Solution: Use absolutepath(), instead of regex test (Miguel Barro).
closes: #19477
Signed-off-by: Guybrush <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: filetype: sh filetype used for env files
Solution: Detect *.env and .env.* files as env filetype,
detect .envrc and .envrc.* as sh filetype,
include a simple env syntax script (DuckAfire)
Previously, .env files were handled by the shell syntax. While
functional, this limited the ability to support specific .env
implementations, such as CodeIgniter4 which allows dots in keys
(e.g., "foo.bar=0").
The new dedicated 'env' filetype and syntax script improves legibility
and prevents highlighting from breaking when encountering spaces.
Currently, the syntax does not support indentation; fields, variables,
and comments must start at the beginning of the line.
closes: #19260
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: DuckAfire <155199080+duckafire@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
The declaration 'SSLVHostSNIPolicy' has bee introduced in version 2.4.66.
closes: #19452
Signed-off-by: Michael Osipov <michael.osipov@innomotics.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
The Progress syntax file gained `set expandtab` in 4c3f536f4 (updated
for version 7.0d01, 2006-04-11). The Progress language itself doesn't
distinguish between tabs and spaces for indentation, so this seems like
something that should be left to user preference; but the setting is
accompanied by the comment "The Progress editor doesn't cope with tabs
very well", so there may be reason to keep it.
However, using `set` means that any new buffers created after editing a
Progress file will also have `expandtab` turned on, which is likely
contrary to a user's expectations. We should use `setlocal` instead to
avoid this.
closes: #19458
Signed-off-by: Daniel Smith <daniel@rdnlsmith.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: less.sh can't read from stdin; it will try to read from a file named "-" instead (after 515da6ecdb).
Solution: Do not prepend "-" with "--" in the arguments list for vim.
The following were checked manually and worked as expected:
echo Test | less.sh
echo Test | less.sh -
less.sh some_file
less.sh --cmd some_file # vim will try to load "--cmd" and "some_file".
less.sh # script outputs "No input."
# All of the above repeated with the output piped to 'cat'.
closes: #19462
Signed-off-by: Shane Harper <shane@shaneharper.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: When ch_open() tries to connect to a hostname that resolves to
multiple addresses (e.g., both IPv6 and IPv4), it uses a
single waittime for all connection attempts. If the first IPv6
connection attempt times out, it consumes almost all of the
waittime, leaving insufficient time (often just 1ms) for the
IPv4 attempt to succeed. (reporter)
Solution: Implement a simplified version of Happy Eyeballs (RFC 8305) to
improve connection fallback behavior when IPv6 is unavailable
or slow (thinca).
Distribute the waittime across multiple addresses:
- First address: use up to 250ms (RFC 8305 Connection Attempt Delay) or
half of the total waittime, whichever is smaller
- Middle addresses: divide remaining time equally
- Last address: use all remaining time
This ensures that IPv4 fallback has sufficient time to succeed even when
IPv6 connection attempts fail or timeout.
closes: #19233
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: thinca <thinca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Hard to configure Vim according to full XDG spec
Solution: Include the $VIMRUNTIME/xdg.vim script as an example.
(Andrey Butirsky).
closes: #19421
Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Andrey Butirsky <butirsky@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
The input files with syntax test cases are never compiled or
interpreted on behalf of test runners, just read, and their
parts are rendered in accordance with syntax definitions for
associated languages, to be compared with previously vetted
renderings. Whether their arbitrary contents will be valid
programs, benign programs, etc., is left for test authors to
decide and verify in their own environments. As executable
and non-executable files equally qualify for testing and yet
executability is never exercised, and since maintaining
executable files turns out to be a short-lived exception
than common practice, let us persist in keeping syntax files
non-executable and enforce it with a CI check.
closes: #19433
Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: popup: Popup windows do not support a transparency setting.
Solution: Add the "opacity" option to popup windows to support
transparency when using the GUI or 'termguicolors'
(Yasuhiro Matsumoto).
closes: #19272
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Stop mentioning "home directory" in the rtp search locations 1. and 5.,
which is incorrect in case of XDG scheme. $MYVIMDIR is correct, so use
this instead.
closes: #19438
Signed-off-by: Andrey Butirsky <butirsky@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- ':!' is not stable, so use system() to get more consistent behaviour.
- Only warns when using 'pwsh'.
- Remove trailing spaces.
closes: #19370
Co-Authored-by: @lxhillwind
Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Remove `nextgroup=shComment` from the `shEscape` syntax pattern.
This was causing `#` characters after escape sequences inside
double-quoted strings to be misinterpreted as comments, breaking
highlighting for the rest of the file.
Add a test case for escaped characters followed by # in double quotes.
fixes: #19053closes: #19414
Signed-off-by: Bozhidar Batsov <bozhidar@batsov.dev>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Effective use of 'formatprg' requires both an understanding of the
specific capabilities of the formatting tool and Vim's formatting
commands. This is overly burdensome for some users.
Rather than address each complaint on a filetype by filetype basis,
remove 'formatprg' settings from all ftplugins.
It is expected that formatter plugins will be available in the near
future as a better solution. See #17145 (Add "formatter" feature using
"compiler" as a template).
Note: 'formatprg' will be removed from older ftplugins after the release
of Vim 9.2. The setting was added to the go and gleam ftplugins during
the current development cycle and have not been included in a Vim
release.
See: #18650 (rust.vim: stop setting formatprg to rustfmt)
closes: #19108
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
The username/group/netgroup patterns used \l\+ which only matched
lowercase letters. Linux usernames commonly contain hyphens, digits,
and underscores (e.g. www-data, deploy01, test_user).
Update the pattern to \l[-a-z0-9_]* to allow matching the additional
characters "-_" and numbers.
fixes: #18963closes: #19396
Signed-off-by: Bozhidar Batsov <bozhidar@batsov.dev>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Use ellipses, matching the file's general style, rather than hard
truncation of overlength tail comments in examples.
closes: #19298
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- Amend syntax highlighting to allow for ksh93 discipline function names
(e.g. 'foo.get()') and mksh's odd function naming idiosyncrasies
(shNamespaceOne was introduced to enforce stricter naming rules for
ksh93 namespaces).
- Remove 'bind' from ksh93 syntax (such a builtin has never been
implemented in ksh93).
- 'xgrep' is only available in ksh93v- as an alternative way to
invoke the builtin 'grep -X', so reflect that in the syntax
highlighting.
- Forbid bash-style 'function name() {' syntax when highlighting
ksh88 and ksh93 scripts.
- Fix bug causing ' ()' to be incorrectly validated in mksh scripts.
- Add the many ksh93/ksh2020 .sh.* variables to the list of special
variables.
- Amend iskeyword to allow '.' so that '.sh.tilde.get' and such are
valid function names/variable names. (For mksh functions starting
with odd characters like '%' and '@' this would probably have too
many bad side effects, so I've omitted such a change for that shell.)
- Add new syntax tests and regenerate syntax dump files
closes: #19383
Signed-off-by: Johnothan King <johnothanking@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
We add new key exchange algorithms and new enums for PubkeyAuthOptions.
We also add new keywords from sshd_config.5 not present here and remove
keywords present here that are not present in the official
documentation, with the exception of those patched in by Debian and
Fedora, as well as ChallengeResponseAuthentication which is deprecated
but still functional.
closes: #19347
Signed-off-by: Fionn Fitzmaurice <git@fionn.computer>
Signed-off-by: Jakub Jelen <jakuje@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: `gf` in Vim script fails if multiple target files exist.
Solution: Use globpath() which returns an array.
In a Vim script, `gf` on `some#func()` will jump to `autoload/some.vim`.
In this case, if there are multiple `autoload/foo.vim`s in
'runtimepath', `globpath(&runtimepath, path)` will return multiple
paths, separated by newlines.
As a result, the second and subsequent paths will be executed as
commands in `autoload/vimgoto.vim:195`, causing an error.
This change fixes this issue by making the result of `globpath()` an
array.
closes: #19379
Signed-off-by: thinca <thinca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>