Last active
December 17, 2015 16:39
-
-
Save banister/5640901 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
;; ensure tabs are specially colored, since they mess up things in | |
;; langs like coffeescript | |
(defface extra-whitespace-face | |
'((t (:background "pale green"))) | |
"Used for tabs and such.") | |
(defvar my-extra-keywords | |
'(("\t" . 'extra-whitespace-face))) | |
;; coffeescript specific hooks | |
(defun coffee-init () | |
(font-lock-add-keywords nil my-extra-keywords) | |
(define-key coffee-mode-map | |
;; move point forward a line and to indent level of prev line | |
(kbd "C-j") (lambda () (interactive) | |
(newline) | |
(let ((col (save-excursion (forward-line -1) | |
(beginning-of-line) | |
(skip-syntax-forward "-")))) | |
(indent-to col)))) | |
(hungry-delete-mode 1)) | |
(add-hook 'coffee-mode-hook | |
'coffee-init) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment