Created
July 10, 2009 11:52
-
-
Save calas/144423 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 sass-convert-region (beg end) | |
"Convierte la región seleccionada a código sass" | |
(interactive "r") | |
(let ((comando "/usr/local/bin/css2sass -s")) | |
(shell-command-on-region beg end comando (buffer-name) t))) | |
(defun sass-convert-buffer () | |
"Convierte el buffer seleccionado a código sass" | |
(interactive) | |
(let ((nuevoarchivo | |
(replace-regexp-in-string "css$" "sass" (buffer-file-name)))) | |
(sass-convert-region (point-min) (point-max)) | |
(write-file nuevoarchivo))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment