Bug#827627: Please support packaging vim addons as vim "packages"

2019-04-11 Thread Josh Triplett
On Thu, Apr 11, 2019 at 10:38:18PM -0400, James McCoy wrote:
> On Sat, Jun 18, 2016 at 03:01:05PM -0700, Josh Triplett wrote:
> > Vim supports loading "packages", typically installed as
> > ~/.vim/pack/$package .  A package consists of files under
> > ~/.vim/pack/$package/start/$name/* and optionally
> > ~/.vim/pack/$package/opt/$name/* .  The files under those directories
> > match the standard runtime directory layout (doc, ftdetect, ftplugin,
> > indent, plugin, ...).
> > 
> > This format has the advantage that the user can add a single directory
> > (or symlink) for a package, keeping all that package's files together.
> > The symlink doesn't need updating when the set of files in the package
> > change (which also makes it simpler and more robust to track in a git
> > home directory).  And since the directory contains a single package, it
> > can compile and include a tags file with helpztags, rather than having
> > vim-addon-manager compile a combined one at user installation time.
> 
> I uploaded a new package, dh-vim-addon, which provides support for
> managing vim addons by leveraging Vim's "packages".  It's available in
> Buster and I'll likely start nudging people to switch to it after Buster
> is released.
> 
> I've started work on converting vim-scripts to use dh-vim-addon, but I
> haven't fully thought through how to manage the migration for users.  At
> the worst, it will simply be a NEWS.Debian entry explaining how to
> handle it.
> 
> The vim addon policy should probably move to dh-vim-addon at some point,
> since that seems like a better home than the vim-doc package (especially
> as dh-vim-addon supports neovim).

Awesome, thank you! I did see dh-vim-addon when it entered the archive,
and it fully addresses this (assuming packages start using it).



Bug#827627: Please support packaging vim addons as vim "packages"

2019-04-11 Thread James McCoy
On Sat, Jun 18, 2016 at 03:01:05PM -0700, Josh Triplett wrote:
> Vim supports loading "packages", typically installed as
> ~/.vim/pack/$package .  A package consists of files under
> ~/.vim/pack/$package/start/$name/* and optionally
> ~/.vim/pack/$package/opt/$name/* .  The files under those directories
> match the standard runtime directory layout (doc, ftdetect, ftplugin,
> indent, plugin, ...).
> 
> This format has the advantage that the user can add a single directory
> (or symlink) for a package, keeping all that package's files together.
> The symlink doesn't need updating when the set of files in the package
> change (which also makes it simpler and more robust to track in a git
> home directory).  And since the directory contains a single package, it
> can compile and include a tags file with helpztags, rather than having
> vim-addon-manager compile a combined one at user installation time.

I uploaded a new package, dh-vim-addon, which provides support for
managing vim addons by leveraging Vim's "packages".  It's available in
Buster and I'll likely start nudging people to switch to it after Buster
is released.

I've started work on converting vim-scripts to use dh-vim-addon, but I
haven't fully thought through how to manage the migration for users.  At
the worst, it will simply be a NEWS.Debian entry explaining how to
handle it.

The vim addon policy should probably move to dh-vim-addon at some point,
since that seems like a better home than the vim-doc package (especially
as dh-vim-addon supports neovim).

Cheers,
-- 
James
GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7  2D23 DFE6 91AE 331B A3DB



Bug#827627: Please support packaging vim addons as vim "packages"

2016-08-22 Thread Antonio Terceiro
On Sun, Aug 21, 2016 at 03:33:25PM -0400, James McCoy wrote:
> On Sat, Jun 18, 2016 at 09:41:12PM -0700, Josh Triplett wrote:
> > On Sat, Jun 18, 2016 at 11:55:17PM -0400, James McCoy wrote:
> > > On Jun 18, 2016 6:03 PM, "Josh Triplett"  wrote:
> > > > I would suggest installing packages under /usr/share/vim/packages, and
> > > > replacing the "files" key in the registry yaml files with "package:
> > > > pkgname", where pkgname matches the top-level directory in
> > > > /usr/share/vim/packages.  When installing a package, vim-addon-manager
> > > > should just make a single symlink from ~/.vim/pack/$pkgname to
> > > > /usr/share/vim/packages/$pkgname.
> > > 
> > > Good suggestions.  We currently use ~/.vim/bundle iirc, but since I don't
> > > think it's really used anywhere, I'd be fine changing it.
> > 
> > Some of the "automatically download and run code from github" plugin
> > systems use "bundle".  vim's built-in package handling uses "pack".
> 
> Thinking about this more, I'm considering a slight adaptation.  Rework
> the expected policy for the "directory" type addon (which was never
> officially released) to install under
> /usr/share/vim/packages/pack/dist-bundle/start and have a new "package"
> type addon which installs under /usr/share/vim/packages/pack (and should
> include start/ and/or opt/ as needed).  /usr/share/vim/packages would be
> added to 'packpath' by debian.vim (or similar).
> 
> Basically, all the existing addons could easily be changed to
> "directory" addons and if someone starts providing actual Vim packages,
> those are already supported.

works for me. TBH I am short in time to proactively help with
vim-related stuff, but if you need any help getting around
the vim-addon-manager code, feel free to ping me.


signature.asc
Description: PGP signature


Bug#827627: Please support packaging vim addons as vim "packages"

2016-08-21 Thread James McCoy
On Sat, Jun 18, 2016 at 09:41:12PM -0700, Josh Triplett wrote:
> On Sat, Jun 18, 2016 at 11:55:17PM -0400, James McCoy wrote:
> > On Jun 18, 2016 6:03 PM, "Josh Triplett"  wrote:
> > > I would suggest installing packages under /usr/share/vim/packages, and
> > > replacing the "files" key in the registry yaml files with "package:
> > > pkgname", where pkgname matches the top-level directory in
> > > /usr/share/vim/packages.  When installing a package, vim-addon-manager
> > > should just make a single symlink from ~/.vim/pack/$pkgname to
> > > /usr/share/vim/packages/$pkgname.
> > 
> > Good suggestions.  We currently use ~/.vim/bundle iirc, but since I don't
> > think it's really used anywhere, I'd be fine changing it.
> 
> Some of the "automatically download and run code from github" plugin
> systems use "bundle".  vim's built-in package handling uses "pack".

Thinking about this more, I'm considering a slight adaptation.  Rework
the expected policy for the "directory" type addon (which was never
officially released) to install under
/usr/share/vim/packages/pack/dist-bundle/start and have a new "package"
type addon which installs under /usr/share/vim/packages/pack (and should
include start/ and/or opt/ as needed).  /usr/share/vim/packages would be
added to 'packpath' by debian.vim (or similar).

Basically, all the existing addons could easily be changed to
"directory" addons and if someone starts providing actual Vim packages,
those are already supported.

Cheers,
-- 
James
GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7  2D23 DFE6 91AE 331B A3DB



Bug#827627: Please support packaging vim addons as vim "packages"

2016-06-18 Thread Josh Triplett
On Sat, Jun 18, 2016 at 11:55:17PM -0400, James McCoy wrote:
> On Jun 18, 2016 6:03 PM, "Josh Triplett"  wrote:
> > [Note: in addition to changing vim-addon-manager, this would ideally go
> > along with some minor updates to the vim packaging policy in the vim
> > package; I'd be happy to supply a patch for that.]
> 
> N.B., vam already has some support for using a directory to contain a
> plugin, like pathogen does. This wasn't officially announced because of a
> bootstrapping issue which is now solved with Vim's packages.
> 
> I'm currently working on getting that merged in NeoVim so we can have
> consistent handling.
> 
> > This format has the advantage that the user can add a single directory
> > (or symlink) for a package, keeping all that package's files together.
> 
> Agreed. It solves a number of issues which have been the main things
> holding me back from updating the vim-scripts package.

Awesome.

> > I would suggest installing packages under /usr/share/vim/packages, and
> > replacing the "files" key in the registry yaml files with "package:
> > pkgname", where pkgname matches the top-level directory in
> > /usr/share/vim/packages.  When installing a package, vim-addon-manager
> > should just make a single symlink from ~/.vim/pack/$pkgname to
> > /usr/share/vim/packages/$pkgname.
> 
> Good suggestions.  We currently use ~/.vim/bundle iirc, but since I don't
> think it's really used anywhere, I'd be fine changing it.

Some of the "automatically download and run code from github" plugin
systems use "bundle".  vim's built-in package handling uses "pack".

> My remaining quandary is how to properly handle disabling a systemwide
> plugin while not interfering with a user's plugin of the same name (e.g.,
> installing a newer version locally when the sysadmin also has it enabled).

I don't think that issue works any better with the current
non-package-based approach, and I don't think this change has to solve
all problems.  The "disable" mechanism already exists to handle
disabling a system-wide enabled package.  If a user wants to override a
system-wide enabled package, they could potentially override runtimepath
or packpath to leave out the system directories.  (Or complain at the
sysadmin for enabling a vim package system-wide on a multi-user system.)

- Josh Triplett



Bug#827627: Please support packaging vim addons as vim "packages"

2016-06-18 Thread James McCoy
On Jun 18, 2016 6:03 PM, "Josh Triplett"  wrote:
> [Note: in addition to changing vim-addon-manager, this would ideally go
> along with some minor updates to the vim packaging policy in the vim
> package; I'd be happy to supply a patch for that.]

N.B., vam already has some support for using a directory to contain a
plugin, like pathogen does. This wasn't officially announced because of a
bootstrapping issue which is now solved with Vim's packages.

I'm currently working on getting that merged in NeoVim so we can have
consistent handling.

> This format has the advantage that the user can add a single directory
> (or symlink) for a package, keeping all that package's files together.

Agreed. It solves a number of issues which have been the main things
holding me back from updating the vim-scripts package.

> I would suggest installing packages under /usr/share/vim/packages, and
> replacing the "files" key in the registry yaml files with "package:
> pkgname", where pkgname matches the top-level directory in
> /usr/share/vim/packages.  When installing a package, vim-addon-manager
> should just make a single symlink from ~/.vim/pack/$pkgname to
> /usr/share/vim/packages/$pkgname.

Good suggestions.  We currently use ~/.vim/bundle iirc, but since I don't
think it's really used anywhere, I'd be fine changing it.

My remaining quandary is how to properly handle disabling a systemwide
plugin while not interfering with a user's plugin of the same name (e.g.,
installing a newer version locally when the sysadmin also has it enabled).

Cheers,
James


Bug#827627: Please support packaging vim addons as vim "packages"

2016-06-18 Thread Josh Triplett
Package: vim-addon-manager
Version: 0.5.5
Severity: wishlist

[Note: in addition to changing vim-addon-manager, this would ideally go
along with some minor updates to the vim packaging policy in the vim
package; I'd be happy to supply a patch for that.]

Vim supports loading "packages", typically installed as
~/.vim/pack/$package .  A package consists of files under
~/.vim/pack/$package/start/$name/* and optionally
~/.vim/pack/$package/opt/$name/* .  The files under those directories
match the standard runtime directory layout (doc, ftdetect, ftplugin,
indent, plugin, ...).

This format has the advantage that the user can add a single directory
(or symlink) for a package, keeping all that package's files together.
The symlink doesn't need updating when the set of files in the package
change (which also makes it simpler and more robust to track in a git
home directory).  And since the directory contains a single package, it
can compile and include a tags file with helpztags, rather than having
vim-addon-manager compile a combined one at user installation time.

I would suggest installing packages under /usr/share/vim/packages, and
replacing the "files" key in the registry yaml files with "package:
pkgname", where pkgname matches the top-level directory in
/usr/share/vim/packages.  When installing a package, vim-addon-manager
should just make a single symlink from ~/.vim/pack/$pkgname to
/usr/share/vim/packages/$pkgname.

- Josh Triplett

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.6.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages vim-addon-manager depends on:
ii  ruby1:2.3.0+4
ii  vim-common  2:7.4.1829-1

Versions of packages vim-addon-manager recommends:
ii  vim  2:7.4.1829-1

vim-addon-manager suggests no packages.

-- no debconf information