supercollider / scvim

Vim plugin for SuperCollider
GNU General Public License v3.0
116 stars 28 forks source link

provide scvim system-wide #39

Open dvzrv opened 6 years ago

dvzrv commented 6 years ago

On Linux, package managers take care of where files are installed for which application (package) on a system-wide level. Vim supports several plugin folders, that are tested, when it starts. One is system-wide (all users of a given system can use that plugin) and one is user-specific (only the user starting vim can use that plugin).

As I'm now maintaining supercollider for Arch Linux, I'd like to have a look into how to ship scvim as a plugin package (e.g. vim-scvim or vim-supercollider). This has the above mentioned benefit of several users being able to use the same installation. Starting from 3.9, scvim will most likely not be compiled by default (which has the benefit of being able to update scvim, while supercollider is not updated). Also, to circumvent #27, I have disabled scvim in the updated build of 3.8.0 for Arch Linux.

For this to happen, several things (ideally) will have to be done though:

capocasa commented 6 years ago

I am elated! Arch is my favorite distribution.

I have decided assuming the absence of objections that the current state of scvim is now released as v1.0.0, and that we will be using semantic versioning for all future releases.

dvzrv commented 6 years ago

@carlocapocasa great to hear! supercollider-3.8.0-3 without cwiid dependency and without scvim just hit [community-testing]. Feel free to give some feedback!

mossheim commented 6 years ago

Great, thank you for this!

dvzrv commented 6 years ago

Installation destinations for SuperCollider and vim plugin files are pretty easy:

# vim files
install -Dm644 ftplugin/supercollider.vim "${pkgdir}/usr/share/vim/vimfiles/ftplugin/supercollider.vim"
install -Dm644 indent/sc_indent.vim "${pkgdir}/usr/share/vim/vimfiles/indent/supercollider.vim"
install -Dm644 plugin/supercollider.vim "${pkgdir}/usr/share/vim/vimfiles/plugin/supercollider.vim"
install -Dm644 syntax/supercollider.vim "${pkgdir}/usr/share/vim/vimfiles/syntax/supercollider.vim"

# supercollider class
install -Dm644 sc/SCVim.sc "${pkgdir}/usr/share/SuperCollider/Extensions/scvim/SCVim.sc"

# documentation
install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"

I noticed however, that the libraries for sc_dispatcher and start_pipe are hard linked. That has to be patched.

Also, SCVim.sc has to be extended to somehow take care of the dynamic loading of Class names. I'm not yet sure, how that can be achieved nicely.

dvzrv commented 6 years ago

Also, I think indent/sc_indent.vim should be renamed to indent/supercollider.vim and syntax/supercollider_operators.vim be merged into syntax/supercollider.vim.

dvzrv commented 6 years ago

As for the ruby library destinations, I'm thinking of a location such as "${pkgdir}/usr/lib/${pkgname}/ruby/". This just has to be patched in the first few lines of the scripts.

capocasa commented 4 years ago

Okay let's get this licked, arch needs an scvim package.

I believe @claudiocabral is working on replacing the hardcoded .vim path in SCvim.sc with a search of the actual vim runtime paths in order to support neovim, but should help this as well.

As for the hardcoded path in the ruby files, those load relative to the directory the file is in- can you help me understand how that is a problem for packaging? Don't you just keep the directory structure and all is well?

Do you consider the rename and merge need-to-have or nice-to-have? I'd suggest to just accept the file names are warts unless there is a really compelling reason to change them.