Vim snap

I was thinking that it would be great to have a vim snap with the latest & greatest version, as the one in the xenial repos is quite old, and then I saw that there is a snap published by snapcrafters:

$ snap info vim
name:      vim
summary:   the ubiquitous text editor
publisher: snapcrafters
license:   Proprietary
description: |
  Vim is a highly configurable text editor built to make creating and changing
  any kind of text very efficient. It is included as "vi" with most UNIX
  systems and with Apple OS X.
snap-id: BvAWP4GoQqsnOFWeGrNkQRfswruAdMYK
channels:            
  stable:    –            
  candidate: –            
  beta:      8.0 (1) 15MB classic
  edge:      ↑            

But I was not able to find out the code to build it. Anybody has more information?

Nobody knows about this?

All snapcraft.yaml files for snapcrafter projects should be at: https://github.com/snapcrafters.

Unfortunately it seems that vim isn;t there @popey @evan do you know why?

2 Likes

Looks like @sergiusens initially created the snap. I expect he has the yaml and can contribute it to snapcrafters.

@sergiusens do you have the yaml you used to create it?

I need to dig into some backups. It will probably be easier to re-create it. This was after all, the first ever classic confined snap created with snapcraft.

1 Like

I take it it never got updated? Anything I can do to help?

More importantly, as a snap, does anyone see an issue with Vim plugins? My concerns are:

  1. Could I use proper vim plugins with vim installed as a snap.
  2. Could vim plugins be installed via snaps? I don’t think any vim plugins are currently snaps but I’m in the process of making one. I would love to be able to do this.
1 Like

My two cents:

  1. I would say yes, because if the snap is classic, the plugins can live in the folder ~/.vim, as with regular vim.
  2. I guess yes, but I’m not really sure if it makes sense…

Anyone, please correct me if I’m wrong…

1 Like

if vim is built from source and properly adjusted, there is no reason why it should not be able to be changed to read its plugins from $SNAP_USER_DATA/.vim or $SNAP_USER_COMMON/.vim. the only valid reason for vim to be classic is that you might want to edit actual system files with it that do not live in $HOME, every other runtime aspect of the binary can be adjusted to work fine under confinement.

(and IMHO a classic snap should be created with this in mind, in case we ever get some “rootfs-rw” interface of some form you could immediately switch it over to be confined without much work)

That’s true, but I wold say that this sole reason is strong enough, isn’t it?

definitely … i’m not saying it should not be classic … but as someone who spends his day with Ubuntu Core where classic snaps are not possible, i’m always after a way to easily switch such packages over to proper confinement :wink:

I just forgot about ubuntu-core not allowing classic snaps! That makes a lot of sense then, yes!