Bug 265798 - editors/vim: add (default) option to install legacy color schemes as well
Summary: editors/vim: add (default) option to install legacy color schemes as well
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Adam Weinberger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-12 15:48 UTC by Michael Osipov
Modified: 2022-09-03 16:35 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (adamw)


Attachments
Git-formatted patch (7.61 KB, patch)
2022-08-18 12:22 UTC, Michael Osipov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Osipov 2022-08-12 15:48:01 UTC
In vim 8.2.4954 (https://github.com/vim/vim/commit/30ab04e16e1e9e6133590181197b3f8e70cb495e) all color schemes have been redone. This caused chaos with many people since their vim session looks completely different now: https://github.com/vim/vim/issues/10449. OpenBSD port of vim has now added the legacy color schemes to the vim distribution: https://github.com/openbsd/ports/commit/3a6f08dc225430915e0caca3a7dba17f98f142ae

Request: Either add legacy color schemes by a default option or create an option to install there. I have done that locally and can confirm that "colorscheme legacy/slate" just works. The new "colorscheme slate" is just totally different.
I think that even a silent add like with OpenBSD ports is acceptable and a section in UPDATING would be advisable.
Comment 1 Adam Weinberger freebsd_committer 2022-08-12 16:03:49 UTC
What about a new vim-colorschemes-legacy port? I think I'd rather package vim as provided by upstream, but a new port would allow them to be installed and updated independently.
Comment 2 Michael Osipov 2022-08-12 16:16:33 UTC
(In reply to Adam Weinberger from comment #1)

That would work as well, of course. Please note that my proposal does NOT override new schemes, but simply puts the old ones into a subdir 'legacy/'.
Comment 3 Adam Weinberger freebsd_committer 2022-08-12 18:37:34 UTC
Understood. I think it's a good idea. I'd be happy to add that port if you make a patch for it.
Comment 4 Michael Osipov 2022-08-15 07:20:23 UTC
(In reply to Adam Weinberger from comment #3)

Yes, let me work on it this week.
Comment 5 Adam Weinberger freebsd_committer 2022-08-15 14:54:24 UTC
If you want to put it in $VIMRUNTIME, this may be helpful:

VIMRUNTIME!=    make -C "${.CURDIR}/../vim" -V '${DATADIR}/${VIM_VER}'
DATADIR:=       ${VIMRUNTIME}/colors/legacy


So that the pkg-plist could do:
%%DATADIR%%/somecolorscheme.vim
Comment 6 Michael Osipov 2022-08-15 15:17:12 UTC
(In reply to Adam Weinberger from comment #5)

Thanks for the tip. Yes, I want to put it there to make it easy to say:
:colorscheme legacy/{color}
Comment 7 Michael Osipov 2022-08-18 12:22:38 UTC
Created attachment 235993 [details]
Git-formatted patch

Here is a patch which adds the legacy color schemes. Tested in a poudriere jail: poudriere testport -j 123-release-amd64 -p default-main editors/vim-colorschemes-legacy

Let me know what you think
Comment 8 Adam Weinberger freebsd_committer 2022-08-18 14:27:42 UTC
This is a good patch! Locally I just made a few small changes (${LOCALBASE}/bin/ is unnecessary, stuff like that).

You sure you don't want to maintain it? The maintenance cost is probably pretty low (I doubt those colorschemes will ever change).
Comment 9 Michael Osipov 2022-08-18 16:49:56 UTC
(In reply to Adam Weinberger from comment #8)

Then make me maintainer: michael.osipov@siemens.com
Comment 10 Michael Osipov 2022-08-18 16:50:43 UTC
When you are going to commit this, please back port to quarterly as well. I guess this change may be disruptive in quarterly as well. Maybe you need to add a message to UPDATING to restore previous state.
Comment 11 Adam Weinberger freebsd_committer 2022-08-18 16:56:43 UTC
(In reply to Michael Osipov from comment #10)
New ports generally aren't backported to quarterly. A new quarterly will branch in a matter of weeks, and this port will be included in it.
Comment 12 Michael Osipov 2022-08-18 16:58:24 UTC
(In reply to Adam Weinberger from comment #11)

Well, rather 6 weeks. Then I need to roll it out manually on all machines for consistency reasons. I wouldn't really say it is new because quarterly is used to reduce maintenance and surprises and that change from the vim creators is a surprise for many.
Comment 13 Michael Osipov 2022-08-25 11:10:25 UTC
Adam,

is anything holding you off to apply to main?
Comment 14 Adam Weinberger freebsd_committer 2022-08-25 13:58:02 UTC
(In reply to Michael Osipov from comment #13)
$IRL. It's on my list. I'll get it in for the next vim update if not before.
Comment 15 Michael Osipov 2022-08-25 13:59:05 UTC
(In reply to Adam Weinberger from comment #14)

Thanks, looking forward to!
Comment 16 commit-hook freebsd_committer 2022-09-03 16:33:35 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c51ce87a4ef535f7df2c31bbf8b1cbd1a0f1d579

commit c51ce87a4ef535f7df2c31bbf8b1cbd1a0f1d579
Author:     Adam Weinberger <adamw@FreeBSD.org>
AuthorDate: 2022-09-03 16:26:48 +0000
Commit:     Adam Weinberger <adamw@FreeBSD.org>
CommitDate: 2022-09-03 16:26:48 +0000

    editors/vim-colorschemes-legacy: Add port

    Upstream vim modernized their colorschemes, which is a good thing.
    However, the look of them has changed, which is jarring at best for
    users used to the original look.

    Upstream colorscheme development was split into a new repo, and the
    original colorschemes were imported there. This port installs those
    colorschemes.

    The rest of that repo are the colorschemes included in vim, so there's
    not really any benefit to packaging anything else from it.

    PR:             265798

 editors/Makefile                                   |  1 +
 editors/vim-colorschemes-legacy/Makefile (new)     | 33 +++++++++
 editors/vim-colorschemes-legacy/distinfo (new)     |  3 +
 .../vim-colorschemes-legacy/files/LICENSE (new)    | 78 ++++++++++++++++++++++
 editors/vim-colorschemes-legacy/pkg-descr (new)    |  7 ++
 editors/vim-colorschemes-legacy/pkg-plist (new)    | 17 +++++
 6 files changed, 139 insertions(+)
Comment 17 Adam Weinberger freebsd_committer 2022-09-03 16:35:56 UTC
Sorry about the big delay in getting this in. Things have been crazy here. It is committed finally!

Thanks for your work on making this port, Michael.