Created
December 13, 2009 09:11
-
-
Save branch14/255352 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
(defun haml-ify () | |
"run html2haml on current buffer" | |
(interactive) | |
(setf filename buffer-file-name) | |
(setf newfilename (concat | |
(car (split-string filename "\\.")) ".html.haml")) | |
(save-buffer) | |
(shell-command (concat | |
"html2haml " filename " > " newfilename)) | |
(kill-buffer (current-buffer)) | |
(delete-file filename) | |
(find-file newfilename)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment