New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vim.vim: Opt out of vimSearch*
#14423
Comments
In Vim9 script the search commands require a colon prefix, so when we get around to improving the Vim9 support the I'd generally prefer to avoid adding this sort of heuristic kludge unless strictly necessary. I'll start committing some of the Vim 9 fixes I have this week and then we can look at fixing these things. |
I see. In Vim9 syntax:
and in legacy Vim syntax: ?truthy
let truthy = 0
\ ? (0
\ )
\ : (1
\ )
echo truthy And a definition for the ternary operator, right? |
Steps to reproduce
With mostly automatic vim9-line-continuation support for
Vim9 scripts, backslashes are typically not required at the
start of each line for a multi-line ternary operator
?:
.For example,
Currently,
vimSearch*
would claim lines matching^\s*?
.Expected behaviour
Can we introduce a new variable, say,
b:vimsyn_nosearch
andhave the syntax file query for its presence before deciding
whether to define
vimSearch*
matches. In addition, for Vimscripts that may have both
[?/]
commands and?:
operatorsin the same file, can we compromise a little by recognising
parentheses in
vimSearch
(for functions and arithmetic).Something along the lines of,
@dkearns?
Version of Vim
v9.1.0263
Environment
GNU/Linux Debian (testing/trixie)
Logs and stack traces
No response
The text was updated successfully, but these errors were encountered: