Created
June 17, 2012 16:32
-
-
Save marciomazza/2945021 to your computer and use it in GitHub Desktop.
Emacs lisp snippet to open the buit html when editing an rst file
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
(defun sphinx-open-html-for-rst nil | |
"Opens the buit html for the current buffer rst file in the browser." | |
(interactive) | |
(browse-url-of-file | |
(replace-regexp-in-string | |
".rst$" ".html" | |
(replace-regexp-in-string "/source/" "/build/html/" (buffer-file-name))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment