Permalink
Browse files

Some haml tweaks.

  • Loading branch information...
1 parent 5d62ac6 commit 76d571b677cb5ba7a19929db70e3dcd51382da4b @technomancy committed Jan 14, 2009
Showing with 10 additions and 0 deletions.
  1. +7 −0 elpa-to-submit/haml-mode.el
  2. +3 −0 starter-kit-ruby.el
@@ -142,6 +142,8 @@ text nested beneath them.")
(define-key map "\C-c\C-u" 'haml-up-list)
(define-key map "\C-c\C-d" 'haml-down-list)
(define-key map "\C-c\C-k" 'haml-kill-line-and-indent)
+ (define-key map "\C-c\C-r" 'haml-output-region)
+ (define-key map "\C-c\C-l" 'haml-output-buffer)
map))
;;;###autoload
@@ -207,6 +209,11 @@ text nested beneath them.")
(haml-indent-region (point-min) (point-max))
(shell-command-on-region (point-min) (point-max) "haml" "haml-output")))
+(defun haml-output-buffer ()
+ "Displays the HTML output for entire buffer."
+ (interactive)
+ (haml-output-region (point-min) (point-max)))
+
;; Navigation
(defun haml-forward-through-whitespace (&optional backward)
View
@@ -83,6 +83,9 @@ exec-to-string command, but it works and seems fast"
'flymake-display-err-menu-for-current-line)
(flymake-mode t))))))
+(eval-after-load 'haml-mode
+ (add-hook 'haml-mode-hook 'whitespace-mode))
+
;; TODO: set up ri
;; TODO: electric

0 comments on commit 76d571b

Please sign in to comment.