Sublime Forum

Plugin Development

#1

I’m trying to get a new build system working for a markdown bundle and I’m not sure how to accomplish what I want. I can’t figure out how to make a redirect inside of a “cmd” directive. The command I’d like to run would look something like this

markdown $file > /tmp/temp.html

Which would be followed up by something like

open /tmp/temp.html

I realize this would only work on mac’s but I just wanted to start learning how this build api works so I can get more sophisticated and the docs are a little skimpy :wink:

0 Likes

#2

Not that I’m helping here, but just wanted to point out that you can define build systems for different platforms :smile:

0 Likes

#3

“>” is part of bash syntax, rather than something the OS intrinsically understands. To make use of it, you’ll need to execute bash, passing it the command you want it to run (presumably via -c). A related, and perhaps simpler, option is to make a shell script that runs the commands you want, and then make your build system call the shell script.

0 Likes

#4

How is this plugin coming along? I am looking to use Markdown & need a build system for it… can yours be downloaded anywhere?

0 Likes

#5

FYI i just hacked up a build system for Markdown that opens an HTML preview in a new browser window. MacOS only for now.

https://forum.sublimetext.com/t/markdown-preview/2804/1

It’s not really packaged up either. Advice welcome!

0 Likes