Forums > Gen

GenExpr for SublimeText

October 15, 2013 | 1:04 pm

Hey,

If you are a SublimeText user who like to write GenExpr code, GenExprForSublime might interest you. Any feedback is welcome. I’ll had more snippets along the way, feel free to contribute as well by sending me pull request on github.

Have fun.



Nat
October 16, 2013 | 7:18 am

Awesome !


October 17, 2013 | 5:08 am

I’m a sublimetext AND genexpr newb; can you tell me a bit about how to use this? I’d love to know more.


October 17, 2013 | 11:13 am

Well it’s nothing but a syntax highlighting theme and a bunch of snippets. So after installing it (I would recommend using package control for that), you can just set the syntax to GenExpr and take advantage of the color scheme and the snippets (you can explore them with the command palette). You can see it in action in the demo video.


November 2, 2013 | 7:28 am

thanks ej, this is really brilliant. and typical ej.

i spend almost all my max time in genexpr these days, so this is going to potentially help a great deal.

some questions:

firstly, whilst this is great and all, why can’t we get support for .genexpr natively in max?!! writing code in max text is not so cool, and still i cannot double-click on a .genexpr file in the finder and have it open in the max text editor. maybe i’ll try and set all .genexpr files to open in sublime text from now on?…

secondly, if i do not like all of your snippets formatting decisions, would i be able to create alternate .sublime-snippet files and somehow be able to switch between them whilst retaining the global syntax part of your code?

thirdly, genexpr for textwrangler possible?!

thanks.


November 3, 2013 | 2:06 pm

I guess it would make sense that Max opens genexpr files ;-) I’ll add a request for that.

Why wouldn’t you like my snippets? ;-) Well you are free to just download the syntax highlighting file it’s on my github, and any of your snippets.

TextWrangler… well I had one of those, but it’s not really useful, I used to use the C syntax, and that was good enough. Snippets, among other features, convinced me to switch to sublime.



Ste
November 20, 2013 | 4:04 am

nice!


December 20, 2013 | 6:31 am

If anyone’s interested, I made a small python script that converts .genexpr files to .gendsp, which can be opened directly in Max. Essentially it generates a new patcher file with the correct number of inlets and outlets, which are pre-connected to a codebox object containing the code from the .genexpr file. I mention it in this thread because 1) it makes external editing of GenExpr much easier/more powerful and 2) because there is a simple build system for Sublime Text included as well.

It’s on GitHub.


December 24, 2013 | 5:16 am

i’m interested to use the python-script to convert genexpr to gendsp.
but it doesnt works – on osx with python 2.6.1. i get this error:

Traceback (most recent call last):
File "./makegendsp", line 29, in
if ‘in{}’.format(i) in genexpr_string and i > in_num :
ValueError: zero length field name in format

michael


December 24, 2013 | 7:34 am

According to google this is because of a difference between python 2.6 and 2.7 (I’m running Mavericks so I have 2.7.5). Should be no trouble to fix, I’ll give it a shot later today!


December 24, 2013 | 7:44 am

Ok, should be fixed now! Try giving it a shot.


December 24, 2013 | 3:54 pm

thank you very much …
… now it works fine


Viewing 12 posts - 1 through 12 (of 12 total)