ChucK-plugin-for-ST3
ChucK-plugin-for-ST3 copied to clipboard
open File under cursor to open the file associated with a class reference file also if file doesn't exist yet
Additional functionality to let us write something like
CrazyUnit cu;
open File could assume this refers to a .ck
called CrazyUnit.ck
, and try to open it, but also if the file doesn't exist it can write the template of a public class with that name into the file for instant workflow.
On a good day it could even write the machine.add line to the initialize.ck, maybe if there's a switch on the line like CrazyUnit cu; // to init
...thinking out loud here, I may not do this
+1
it's already brought a few smiles to my face just being able to open a file straight from initialize is incredibly sweet. I think it makes more structural sense to generate a public class from CrazyUnit cu
than it would to auto generate a class file purely from the file reference in intialize because:
in initialize if I have something like someutility.ck
, sure, i probably want that to be a class if it doesn't exist..
but score.ck
wouldn't need the public class { } inserted automagically.
the current workflow is to go to an initialize.ck file and type:
ma
, which expands to Machine.add( ....) and you type in the class name, then ctrl+shift+o
to jump to that new file (even if it doesn't exist yet) then type pu
and the completions will auto suggest a public class with the name of the current file.
This description doesn't do the workflow justice, it is very easy.
Altho, the addition of // to init
is certainly worth investigating.