Skip to content

Instantly share code, notes, and snippets.

;; Code-folding for HAML mode
(add-hook 'haml-mode-hook 'hs-minor-mode)
(setq hs-special-modes-alist
(cons (list
'haml-mode "[#.%]" "\n" "/"
(lambda (arg)
(haml-forward-sexp)
(move-beginning-of-line 1))
nil) hs-special-modes-alist))
@aaroncampos
aaroncampos / gist:726376
Created December 3, 2010 00:34
YAsnippet / ruby-electric-mode workaround
;; Yasnippet workaround for ruby-electric-mode
;; See: http://code.google.com/p/yasnippet/issues/detail?id=71
(defun yas/advise-indent-function (function-symbol)
(eval `(defadvice ,function-symbol (around yas/try-expand-first activate)
,(format
"Try to expand a snippet before point, then call `%s' as usual"
function-symbol)
(let ((yas/fallback-behavior nil))
(unless (and (interactive-p)
(yas/expand))
@aaroncampos
aaroncampos / org-config.el
Created December 7, 2012 18:47
Set custom org-mode location
;; Org-mode config
(setq load-path (cons "~/.emacs.d/org-7.01h/lisp" load-path))
(setq load-path (cons "~/.emacs.d/org-7.01h/contrib/lisp" load-path))
(require 'org-install)
(require 'org)