This is a very significant update. Initially it considered only Section 2, the last to be enhanced with sourceable Vim9 script examples. Along the way it extended to also include several standardisation changes, plus improvements to some passages of sections 4 and 6 especially. āPart 1ā of the rewrite addressed those things in Sections 1, and 3 to 7 (NB: they are listed in the explanation to PR20706).
The description, which follows, is a SUMMARY only.
For more details and the rationale of changes, refer to this Gist: vim9.txt rewrite Section 2 (details).
Some improvements in this āPart 2ā update necessarily involve the help files eval.txt and userfunc.txt, where some tags are better relocated either to/from vim9.txt.
Locations of changes are indicated by reference to *tag* in the updated file.
:&: currently, the help states this, ācannot be used to repeat a :substitute commandā. That is incorrect. Only bare & is unusable; :& remains valid.1 is not literally true, and legacy Vim script returns 1.null_partial is v:t_func, not v:t_partial.Many are relocated, and almost all are accompanied by sourceable scripts now.
*vim9-comparators*), E1094, E1053, E1071, E1257, E1261, and the E1047āE1262 import/namespace block (12 errors, itemised individually via the companion āPart 1ā PR).*vim9-invalid-Ex-commands*, *vim9-no-shorten*, *vim9-functions*, *vim9-any-type*, *vim9-block*, *vim9-no-shadowing*, *vim9-omitting-:call*, *vim9-omitting-:eval*, *vim9-noclear*, and more.type()/typename()/string() per value) rather than prose.userfunc.txt: The recommendation to prefix autoloaded function calls with g:filename#funcname() appears worthy of revision, though is out of this PRās scope to change.null_class/null_enumvalue: The former always errors when used as a value with no apparent legitimate use. Conversely, there is no null_enumvalue, despite it seeming as though it could have real utility. It may be worth a design discussion.is/== non-transitivity (v:true == 8 and 8 == 8.0 both work, but v:true == 8.0 errors). This has been documented as an aside because it is outside this PRās scope to resolve (and given it is in legacy Vim script, probably is not worth messing with, though may be worth considering).Ā Ā https://github.com/vim/vim/pull/21132
(4Ā files)
ā
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Vimtags check failed. Could you run helptags ++t for doc/?
ā
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Vimtags check failed. Could you run
helptags ++tfordoc/?
An identical tags file is produced with that (i.e., to what is in the PR). I even ran it from two Vim instances to see whether it was different. It isn't; all three (pushed, produced with GitBash w/ 9.0.2112 and produced with Win11 gVim 9.2.0993 are verbatim).
ā
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Vimtags check failed. Could you run
helptags ++tfordoc/?An identical
tagsfile is produced with that (i.e., to what is in the PR). I even ran it from two Vim instances to see whether it was different. It isn't; all three (pushed, produced with GitBash w/ 9.0.2112 and produced with Win11 gVim 9.2.0993 are verbatim).
It fails, on this sentence:
null_tuple(because |tuples| are immutable, neither adding to nor
extending them is permitted), and
I believe this is because |tuples| is not a valid help reference, only |tuple| or |Tuples| is.
ā
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
great re-work. That must have been a lot of work. Thanks
Thanks, it sure was. Would have been many, many weeks FT in the end with so many revisions, discoveries (as you know, including tangents fixing things like the shortened commands), etc. Nearly there now....
ā
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Yes, thanks for your tireless efforts Peter, we all know it's a nearly thankless task.
Does this need another set of eyes? I'll have to check it out locally. Every time I load up the diff page for this one it takes my browser down in no time at all.
Did this turn up any new syntax highlighting bugs of note? I noticed the null_dict->func() one but I'll fix that in the legacy/vim9 split PR.
ā
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Yes, thanks for your tireless efforts Peter, we all know it's a nearly thankless task.
Nearly, though you guys would know more than me about that given your huge contributions over time ... thanks
Does this need another set of eyes? I'll have to check it out locally. Every time I load up the diff page for this one it takes my browser down in no time at all.
Yes and no:
I'd say "yes" if it's not too "into the weeds" because I'm sure there will be a few things that surface over time but - bigger picture - if it is 99%+ improvements, which is where it is at now (IMO), that'd be a good stopping point. It can always be tweaked later, right!
(And "no" if it's AI reviewing. There are just so many false positive "issues" when given to CoPilot, et al. ... and from responding to past reviews where CoPilot was engaged, those are frustrating because they burn a lot of time to debunk.)
Did this turn up any new syntax highlighting bugs of note? I noticed the
null_dict->func()one but I'll fix that in the legacy/vim9 split PR.
I've not had a good look start-to-end in the last while since your vim.vim syntax changes went in. There were a few things I'd found workarounds for, which could perhaps be considered (but aren't essential). One is double quoted content in Vim9 script comments:
image.png (view on web)
My workaround is using a U+00A0, as highlighted in the first line, above, immediately before the ". It's a bit hacky, but could be considered a "feature" when you do want the double quoted text prominent in a comment.
This comparison is interesting too - LHS is with 9021119; RHS is with 9020500
image.png (view on web)
list2blob is clearly an issue now whereas it was fine beforenull_* lines remain an issue, andsetbufline and getcharstr lines are good now.Another is the regression here:
image.png (view on web)
I can do a complete sweep of them side-by-side like this to pick the rest.
ā
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Did this turn up any new syntax highlighting bugs of note? I noticed the
null_dict->func()one but I'll fix that in the legacy/vim9 split PR.
Continued comparison of syntax - LHS is with 9021119; RHS is with 9020500.
This is an improvement (and line 297 is likewise):
image.png (view on web)
Ironically perhaps, this is an improvement too:
image.png (view on web)
And another improvement:
Image: image (view on web)
More improvements:
Image: image (view on web)
These have regressed, though, now being recognised as vim9UserFunc (plus feedkeys on line 1100, popup_create on 1552, and filter on 1759 are likewise):
image.png (view on web)
This is another improvement:
Image: image (view on web)
These have changed, though they remain incorrect; they should be vimType?
Image: image (view on web)
The difference here is the presentation of the match pattern:
image.png (view on web)
This is arguably an improvement given it's invalid, so not highlighting is better:
image.png (view on web)
Another debatable one. It looks odd, but perhaps it should. Thing is, though, if there is a blank line before the comment it does present as a comment:
image.png (view on web)
...
image.png (view on web)
This is a regression; these should all still be comments:
image.png (view on web)
Image: image (view on web)
..................
That's about half way through. I'll review the rest later.
ā
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
.................. That's about half way through. I'll review the rest later.
Continuation ...
This legacy Vim script presentation is off:
image.png (view on web)
Ditto, but for Vim9 script:
image.png (view on web)
This is improved (notwithstanding the Vim9 script one is invalid syntax; so, a stickler could expect that not to be highlighted given the whitespace-before-separator error):
Arguably, this is better given the incorrect : bool syntax:
image.png (view on web)
I may have already flagged these - the | # Vim9 script comment after legacy ... was working previously, not now:
image.png (view on web)
There's no change here, though (only if it's easy) highlighting the mandatory argument following the optional argument as an error could be an improvement?
image.png (view on web)
Also unchanged, though type casting could possibly be enhanced sometime?
image.png (view on web)
This is called out earlier, though this screenshot shows why:
image.png (view on web)
I think that's it, though this was eyeballing them only.
Given your massive re-write of vim.vim, IMHO it is a remarkable outcome. There are many improvements and only a small number of degradations. š
ā
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
thanks. Let me merge this now.
ā
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
I've not had a good look start-to-end in the last while since your vim.vim syntax changes went in. There were a few things I'd found workarounds for, which could perhaps be considered (but aren't essential). One is double quoted content in Vim9 script comments:
My workaround is using a U+00A0, as highlighted in the first line, above, immediately before the
". It's a bit hacky, but could be considered a "feature" when you do want the double quoted text prominent in a comment.
I recently added g:vimsyn_comment_strings to the Vim syntax file to disable this highlighting. We can use that to disable it in the help examples if you like?
ā
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
My workaround is using a U+00A0, as highlighted in the first line, above, immediately before the
". It's a bit hacky, but could be considered a "feature" when you do want the double quoted text prominent in a comment.
I recently added
g:vimsyn_comment_stringsto the Vim syntax file to disable this highlighting. We can use that to disable it in the help examples if you like?
I don't mind either way. It's easy enough to add the non-breaking space before any "content" you want remaining as vim9Comment rather than vimCommentString. And there are instances where stressed quoted content in the comment is useful. Maybe just leave it as-is.
ā
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()