Skip to content

Instantly share code, notes, and snippets.

@vfig
Created April 11, 2017 09:49
Show Gist options
  • Save vfig/bdbb071b8db2345c9ea644ee19ec4417 to your computer and use it in GitHub Desktop.
Save vfig/bdbb071b8db2345c9ea644ee19ec4417 to your computer and use it in GitHub Desktop.
Graphviz build script for Sublime Text 3 on OS X.
{
"cmd": ["dot", "-Tpng", "-o", "${file_name}.png", "$file"],
"file_regex": "^Error: (.+?):",
"line_regex": "line ([0-9]+)",
"selector": "source.dot",
"variants": [
{
"name": "Dot",
"shell_cmd": "dot -Tpng -o '${file_name}.png' '$file' && open -a Preview '${file_name}.png'"
},
{
"name": "Neato",
"shell_cmd": "neato -Tpng -o '${file_name}.png' '$file' && open -a Preview '${file_name}.png'"
},
{
"name": "Twopi",
"shell_cmd": "twopi -Tpng -o '${file_name}.png' '$file' && open -a Preview '${file_name}.png'"
},
{
"name": "Circo",
"shell_cmd": "circo -Tpng -o '${file_name}.png' '$file' && open -a Preview '${file_name}.png'"
},
{
"name": "Fdp",
"shell_cmd": "fdp -Tpng -o '${file_name}.png' '$file' && open -a Preview '${file_name}.png'"
}
]
}
@0x6d64
Copy link

0x6d64 commented Jan 1, 2018

Thanks a lot, this gist saved me quite some time! I use it for linux and just threw out the && open -a Preview part of the command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment