Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
{
"cmd": ["robofont", "-p", "$file"],
"file_regex": "^[ ]File \"(...?)\", line ([0-9]*)",
"selector": "source.python",
}
@typoman

This comment has been minimized.

Copy link
Owner Author

commented Dec 14, 2018

Robofont build system for Sublime Text

Do you dislike the script editor inside Robofont? Ever wanted to run python scripts from sublime and make them executed inside Robofont? Download this file and put it inside the following folder:

Library/Application Support/Sublime Text 3/Packages/User

Before you use the Build system make sure you have installed Robofont as shell command by going to Robofont Preferences > Extensions > Shell and click on the install button. To make sure that it's installed correctly write robofont in the terminal and hit return. For Robofont shell command to work correctly you probably need to install PyObjC in terminal using pip3.

Now if you choose Robofont from Tools > Build System inside sublime, after you run the script using <Cmd+b>, the code will execute inside the RF. Smooth!

@thundernixon

This comment has been minimized.

Copy link

commented Apr 17, 2019

Small but important final step: you must save the scripts you make in Sublime before you try to run them.

Otherwise, you will probably get something like the following error:

Traceback (most recent call last):
  File "/usr/local/bin/robofont", line 37, in <module>
    elif arg[0] == '-':
IndexError: string index out of range
[Finished in 0.4s with exit code 1]
[cmd: ['robofont', '-p', '']]
[dir: /Applications/Sublime Text.app/Contents/MacOS]
[path: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/opt/X11/bin]
@thundernixon

This comment has been minimized.

Copy link

commented Apr 17, 2019

@typoman this is awesome, by the way!

Do you happen to know if there's a way to get robofont's output (e.g. from print() statements) in the Sublime output panel?

@typoman

This comment has been minimized.

Copy link
Owner Author

commented Apr 17, 2019

You're welcome Stephan. For the output thingy you can upvote the feature request here:

https://forum.robofont.com/topic/623/robofont-shell-output-also-inside-shell

@RafalBuchner

This comment has been minimized.

Copy link

commented Apr 25, 2019

Damn it! I have to make the same for the Atom, awesome!

@ddaanniiieeelll

This comment has been minimized.

Copy link

commented Apr 29, 2019

I would very much appreciate this for Atom. It would make me very happy if you could do this @RafalBuchner :)

@RafalBuchner

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.