[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/2] Distribute vim syntax highlighting

From: Thomas Weißschuh
Subject: Re: [PATCH 1/2] Distribute vim syntax highlighting
Date: Sat, 13 Mar 2021 12:38:21 +0100

Hi Jose,

On Sa, 2021-03-13T12:10+0100, Jose E. Marchesi wrote:
> > On Sa, 2021-03-13T04:13+0000, Matt Ihlenfield wrote:
> >> It seems like the typical way languages support highlighting in vim is to 
> >> submit
> >> a patch with their highlighter to be included in vim's source repo, or to
> >> provide the language support as a plugin that can be installed with
> >> Vundle/Pathogen/etc.
> >
> > Providing a dedicated plugin, that has to be installed manually, makes more 
> > sense
> > for big chunks of functionality that should not be enabled unconditionally 
> > or
> > where the upstream project does not provide syntax definitions themselves.
> >
> >> I submitted a pull request that was accepted today, so
> >> poke.vim (and the filetype entry) should eventually be shipped with the vim
> >> runtime.
> >
> > Nice!
> >
> >> I wonder if it would be better for that to be the default way to support
> >> Poke syntax highlighting in vim? I think grabbing poke.vim from the poke 
> >> sources
> >> would always be the best way to get the most recent version, as it could
> >> take some time to get updates in to vim, but for most users I would think 
> >> the
> >> version shipped with vim would suffice?
> >
> > Poke is a fairly specialized tool that people may install via
> > backports or custom packages to get the latest version (or any at all).
> > These installations will be newer than the also-installed vim installation
> > leading to a mismatch of syntax definitions, probably missing newer language
> > features.
> >
> > For exmaple in my /usr/share/vim/vimfiles I have vim definitions installed 
> > that
> > are provided directly by the upstream packages:
> > notmuch, augeas, lilypond, meson, PKGBUILD, cmake, ninja, protobuf, ragel.
> >
> > These tools use all fairly specific syntaxes that are prone to change.
> > For meson and ninja there are actually two sets of definitions installed.
> > One from vim and one from the package itself.
> > (The ones from the packages shadow the ones from vim)
> >
> > The only advantages I see for distributing the files via vim directly is 
> > that
> > * users without poke installed will have highlighting.
> > * users with poke but not vim installed won't have unused files on their
> > machine.
> >
> > I'll let Jose and you decide :-)
> I think it is useful to distribute the vim files in poke tarbal
> releases, for the reasons you highlight.

> But then, I am not that sure if it is useful to actually install them,
> given vim will now distribute them.

But not all users install new versions of poke via tarballs.
For example one could use https://aur.archlinux.org/packages/gnu-poke-git/ or
compile https://packages.debian.org/experimental/poke for Debian stable.

> If an user has vim installed which is recent enough to include support
> for poke and then she installs a poke tarball that ships with a more
> recent version of poke.vim, which version will be effective?

Files in /usr/share/vimfiles/ (poke installed) should shadow those from
/usr/share/vim/vimXX (vim-runtime installed).

:set runtimepath?

> Distros may have a problem with this if they distribute a recent enough
> version of vim.  In case we install the vim files, we need a configure
> flag to disable it.

I'll try to add a way to disable it.

> Also, what about the concerns I raised about the layout of the installed
> files?

I think those are answered here: 

In short: That layout is very Debian specific and depends on a third-party-tool.
Debian should be capable of adapting the normal paths to their setup.
Also the normal paths still do work on Debian.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]