vim-plug icon indicating copy to clipboard operation
vim-plug copied to clipboard

Allow command modifiers for on-demand-loading commands

Open subnut opened this issue 2 years ago • 9 comments

Before this commit, commands like this -

:tab Git diff HEAD^ HEAD

were interpreted like this -

:Git diff HEAD^ HEAD

This commit fixes that issue.

subnut avatar Jul 18 '21 04:07 subnut

I think this needs a version guard because <mods> is a relatively new feature (v7.4.1898)

tomtomjhj avatar Nov 27 '21 11:11 tomtomjhj

@tomtomjhj 2016 is relatively new? For whom?
I'm not trying to be sarcastic... I am genuinely interested in knowing use-cases where people need to use vim versions as old as 2016.


TBH, I'd completely forgotten about this PR 😅

subnut avatar Nov 27 '21 13:11 subnut

Of course, I believe 2016 feature is old enough to use without version check in 2021. The only reason I think 2016 feature is relatively new is that vim-plug has checks for even older stuff, e.g.

  • vim 7.3.442, 2012 https://github.com/junegunn/vim-plug/blob/c9971346bb486ccff354aaee8606cc0d2d5a0c97/plug.vim#L589
  • git 2.0 2014 https://github.com/junegunn/vim-plug/commit/2f4e28161e114cc4b34a9b8ff0f51f4906f37b0b

tomtomjhj avatar Nov 27 '21 14:11 tomtomjhj

I'm one of those people with old Vim versions so add a version,feature checks until @junegunn changes his mind on the minimum Vim/Neovim versions.

janlazo avatar Dec 02 '21 22:12 janlazo

@janlazo Will do (please wait a few days, I am currently AFK).

I am curious about why you are still using such an old version of vim.
Can you please explain? 😅

subnut avatar Dec 03 '21 12:12 subnut

One of the strong selling points of vim-plug is its excellent backward compatibility. Most of its features work as expected even with Vim 7.0 which means that it works virtually everywhere. There can be various reasons you can't or won't use the latest versions of Vim (company guidelines, security requirements, systems with tiny resources, etc.), and still, you don't have to worry about vim-plug not working. That's a great thing and we're not going to lose that.

junegunn avatar Dec 04 '21 02:12 junegunn

@subnut Old company servers. Difficult to install or upgrade dev packages, even if it's just a newer version of Vim. Some of my colleagues don't know or care that vi,vim,$EDITOR is any version of vim. I doubt anybody there is aware of :terminal command. Some OS packages of vim disable some features are missing a few patches that I need to reliably use the new features (ie. :packadd).

janlazo avatar Dec 05 '21 00:12 janlazo

Tried implementing the version guard in 82ffd4f
Please check if the implementation is correct

subnut avatar Dec 11 '21 12:12 subnut

@janlazo @junegunn What is blocking this PR from being merged?

subnut avatar Mar 19 '22 03:03 subnut