Created
December 14, 2018 16:40
-
-
Save typoman/1180765bc0ef06432d4640f41604acc9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cmd": ["robofont", "-p", "$file"], | |
"file_regex": "^[ ]File \"(...?)\", line ([0-9]*)", | |
"selector": "source.python", | |
} |
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]
@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?
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
Damn it! I have to make the same for the Atom, awesome!
I would very much appreciate this for Atom. It would make me very happy if you could do this @RafalBuchner :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 writerobofont
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
fromTools > Build System
inside sublime, after you run the script using<Cmd+b>
, the code will execute inside the RF. Smooth!