tildebyte / ChucK-plugin-for-ST3

A Sublime Text 3 plugin for ChucK (http://chuck.cs.princeton.edu).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

project folders organization

zeffii opened this issue · comments

How you feel about sticking everything into folders where possible. It seems that the python files need to stay in the main folder, but things like the syntax files and settings can be moved to their own folder.

Adding a bit more structure here can help compartmentalize. what do you say?

That's an excellent idea. Things are getting a bit cluttered. Suggestions?

yeah find a nice place for everything that isn't a python file, then worry about the python files if they get out of hand.. but i'm close to saturation now..

this is already a pretty sweet development environment now, if ST3 had an openGL overlay mode with py bindings things would get mental. I don't find myself needing this "replace remove" shred functionality, it's not like the replace shred feature is more elegant that start-stop, so as much as I would like to get that feature working it's not a major concern, It might even be useful to remove that ChucK.py altogether for now

Yeah, I think keeping it dormant (named as ".py_") is a good idea, as well as removing the Supercollider stuff, leaving only the bits which are more-or-less currently working, so that there's still a base for someone to build on.
I hear what you're saying re: shred management, but I can't stop thinking about that SC+EMACS vid from a while back; being able to truly tweak things while chuck is running... mmmm....

yeah, but even replacing shreds restarts the shred, i don't think SC does that... i got the impression that it does update on the fly.. proper on the fly

Ahhh. Good point. iirc from messing with the Audicle, any shred you replace starts over… Oh, well.

OK, in the absence of any other suggestions from all those participating (us two :) ), I'm going to take a whack at this. One thing I'd like to do is create a zip file, named 'on hold' or 'optional', where potentially useful but currently annoying files could live without (presumably) being seen by ST (Scales.sublime-completions, I'm looking at you...).

yeah. don't mind if you torch Scales

maybe even Main.sublime menu and Chuck.py_ you might have to stick underscores at the end of them to fully "obliviate" sublime.

OK, so ST will ignore an arbitrary zipfile, in this case "on hold.bz2". Done.
It'll read its files from almost anywhere. Done.
HOWEVER. Commands, e.g. context menu items, keybound items; really, Python files in general AFAICT, are bound by Pythonic rules. I've looked at a couple of other plugins, and some use an 'init.py' to e.g. include the necessary files. I couldn't get it to work, but I'm not exactly a wizard when it comes to those aspects of Python.

continuing the thought...
Most projects have something like:
Foo plugin -

Foo
  |_ foo (for python file heirarchy)
       |_ foo.py (whatever the main plugin file is)
       __ various other Python files & dirs
  |_ various directories
  __ loose files

... so I'd at least like to have a 'chuck' directory containing the py files.

Derp, keep remembering things. Will having '.ck' files in a 'ck' sub-directory cause problems?

no ck files just need to be copied by users, to wherever their chuck file is.

Agreed btw, about the python files I would also feel more comfortable having a directory for just the python stuff. I'll look into that asap.

if you show me some links to projects that have a nice folder structure, i'll get this one rapidly.

https://github.com/srusskih/SublimeJEDI ok, that will work nicely (I think.)

LOL. Was about to suggest that one. SublimeREPL (http://github.com/wuub/SublimeREPL) looks nice as well.

no ETA on this, but i'll mess with it after dinner.

even SublimeREPL has several .py files in the main directory, I haven't seen any example projects where plugin classes are placed in a directory.

I know from writing python plugins for Blender3D that it can be a complete insert favourite expletive here to get imports working, it will either be very easy or complete hackery.

So theoretically, i'm totally in favour of getting these files into a folder, but without a reasonable example showing how Sublime will find plugin .py files I haven't had much luck.

import sys
sys.path.append(os.path.dirname(__file__)

(i'm storing this snippet for later)