Skip to content

Instantly share code, notes, and snippets.

@tushortz
Last active April 8, 2017 16:37
Show Gist options
  • Save tushortz/f1527c980673098d37ac to your computer and use it in GitHub Desktop.
Save tushortz/f1527c980673098d37ac to your computer and use it in GitHub Desktop.
Sphinx Sublime build
To create a Sphinx sublime build, open Sublime, Go to Tools --> Bulid system --> New build system and type in the following code.
I have only tried it on windows so far and it worked.
Make sure you have sphinx installed and change the path to the script. may be python27 instead of python34
{
"cmd": ["c:/Python34/Scripts/sphinx-build.exe", "-b", "html", "$filedir", "_build/html"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "text.restructuredtext"
}
Save the file as sphinx.sublime-build. Go to build system and select sphinx. Your .rst file should now be
compilable without having to use the terminal.
You can alter:
"c:/Python34/Scripts/sphinx-build.exe" --> Path to the executable script
"html" --> Sphinx options (dir_html etc.)
"_build/html" --> Could be .build/html depending on what option you chose on quickstart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment