Skip to content

Instantly share code, notes, and snippets.

@dodecaphonic
Created August 29, 2012 17:45
Show Gist options
  • Save dodecaphonic/3516110 to your computer and use it in GitHub Desktop.
Save dodecaphonic/3516110 to your computer and use it in GitHub Desktop.
ruby-mode-hook com Electric
(add-hook 'ruby-mode-hook
(lambda()
(add-hook 'local-write-file-hooks
'(lambda()
(save-excursion
(untabify (point-min) (point-max))
(delete-trailing-whitespace))))
(set (make-local-variable 'indent-tabs-mode) 'nil)
(set (make-local-variable 'tab-width) 2)
(imenu-add-to-menubar "IMENU")
(ruby-electric-mode t)))
@dodecaphonic
Copy link
Author

;; Pretty colors in shell
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)

(when (and window-system (eq system-type 'darwin))
;; When started from Emacs.app or similar, ensure $PATH
;; is the same the user would see in Terminal.app
(set-exec-path-from-shell-PATH))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment