Skip to content

Instantly share code, notes, and snippets.

@branch14
Created December 13, 2009 09:11
Show Gist options
  • Save branch14/255352 to your computer and use it in GitHub Desktop.
Save branch14/255352 to your computer and use it in GitHub Desktop.
(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