Created
February 6, 2012 17:42
-
-
Save robertzx/1753581 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
;; zeevex whitespace standards WHETHER YOU LIKE IT OR NOT | |
;; TEST of 1753581 | |
(require 'whitespace) | |
(defun activate-trailing-whitespace-nazi () | |
"Annoy you with trailing whitespace, and then delete it on save anyway" | |
(interactive) | |
(whitespace-mode t) | |
(setq show-trailing-whitespace t) | |
(setq tab-width 2) | |
(setq indent-tabs-mode nil) | |
(add-hook 'local-write-file-hooks (lambda () | |
(untabify (buffer-end 0) (buffer-end 1)) | |
(delete-trailing-whitespace) | |
nil))) | |
(add-hook 'ruby-mode-hook 'activate-trailing-whitespace-nazi) | |
(add-hook 'yaml-mode-hook 'activate-trailing-whitespace-nazi) | |
(provide 'my-whitespace-nazi) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment