Updates to the vimscript standard #37
LunarWatcher
announced in
Announcements
Replies: 0 comments
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
-
Vimscript has gotten a lot of new features over the years, including a new string concatenation operator that helps make code less ambiguous. (Jiangmiao's original code has a lot of awfully spaced bits of code that look more like dict access than string concatenation, for an instance).
Why?
Vimscript is old, and a lot of code examples online contain an assortment of what's now considered bad practice by Vim's help documents. Notably, which happens to be the first change that's going to be bundled with 3.0.0 beta13, the string concatenation operator.
.
is ambiguous,..
isn't.Consequentially, there's things I'd like to update, in part to make the code less shit to read. This does include syntax updates, but it may also include intentionally dropping support for older patches. This is also part in making the code more maintainable, as well as just generally optimizing code.
What?
This is to be determined. As I've already spoiled, beta13 is going to contain an update changing the string concatenation operator from
.
to..
, which may exclude some very old versions of Vim. (I have no idea which, because Vim's git history doesn't go that far back, at least on GitHub).The overall goal is to update the standard to 7.4: meaning anything prior to this 8 year old version of Vim is going to be unsupported, at least if there's features used not supported by the patch.
However, as it turns out, the
..
operator was added in 8.1, patch 1114. This means this is where we're settling for now.Future goals
Optimally, I'd get the plugin over on vim9script for the performance boost, but due to its experimental nature and Neovim's idiotic decision to refuse supporting it, as well as this still being a fork, I need to take certain backward compatibility decisions into account.
As a side-note, Neovim, standing in a bit of a purgatory where it doesn't follow Vim's versions and selectively picks features based on what they do and don't like, may need to use a very new version to work correctly. Dropping nvim support isn't a goal, however, and won't be for the near foreseeable futureThis may change if Neovim develops down an incompatible path, where plugins need overhauls to support it.. Nvim support will continue to be maintained, though the exact versions supported may end up being unclear due to me not using it and there not really being any nvim users helping in general development or otherwise being vocal about what broke which versions of nvim.
I'm affected
If you're running a version older than the 3 year old 8.1 patch 1114, you can either hold back the plugin version at the tag
v3.0.0-beta12
, or update Vim using one of the many ways for your OS/distro. For regular Vim, there's typically a package repo of some type, or some other way to get a pre-compiled binary. If all else fails, you can always compile it manually. I strongly recommend updating over freezing the plugin version, however - you're already missing out on a lot of great updates... in my biased opinion.3.0.0 release
While I'm already writing an announcement, 3.0.0 will be released when #23 has been completed (no due date), and the code has been properly cleaned up and modernized. When 3.0.0 has been released, there's going to be a while of just general patching and the periodic optimization, because I'm out of feature ideas and the list of bugs keeps getting shorter. That being said, feel free to add to the list of bugs or suggested features -- this is still a maintained fork.
Beta Was this translation helpful? Give feedback.
All reactions