Closed antoinemadec closed 5 years ago
Replacing that with a variable that is initilalized in the VimEnter block would be trivial (I didn't know vim_did_enter
was that recent), but it's not the only problem for 7.4 compatibility. As far as I know, lambdas were introduced in vim 8, and there are lambdas everywhere in the plugin. Support for 7.4 would require changes everywhere, I'm not saying it's not possible but right now it isn't. Is there a category of people that still uses 7.4 and not 8?
Ubuntu LTS 16.04: vim 7.4.1689
Ubuntu LTS 18.04: vim 8.0.1453
Debian Jessie (oldstable): vim 7.4.488
Debian Stretch (stable): vim 8.0.0197
Debian Buster (testing): vim 8.1.0549
And that is for distros that are more like personal machine distros.
In a work environment (RHEL, CentOs etc) it is very common to see vim 7.2
.
If vim8
features are needed by this plugin, this is completely OK.
My point is that you should check the vim version at startup and print a warning/error if the version if not compatible with your plugin. Otherwise, when your plugin becomes popular, you will see a lot of people opening issues like this one.
What do you think?
Ok, I don't think there is anything that requires vim 8. I'll have to convert those lambdas and test it in older vim versions. I'll do it later when the rest of the plugin is in a better shape. I still have to improve certain aspects and there are still bugs that pop up from time to time. It should be possible though to have it run in 7.4 or older.
Current test branch should be compatible with vim 7.4.330 (anything before that will never work because matchaddpos()
was introduced in that patch).
Making progress on travis CI I stumble upon this issue:
The
v:vim_did_enter
was introduced in vim8 (Patch 7.4.1658), which is very recent. I grep-ed in my 20+ plugins andvim-visual-multi
is the only one to use it.Questions:
Cheers, Antoine