Created
February 28, 2013 16:56
-
-
Save ashawley/5058193 to your computer and use it in GitHub Desktop.
Whitespace problems, I feel bad for you son.
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
;; Billy Mays here talking about zap to whitespace. | |
;; Deletes your whitespace forward. | |
;; Got to fix indentation before you merge? No problem! | |
(global-set-key "\C-c " 'zap-whitespace-forward) ;; C-c SPC | |
;; But I'm still not done. | |
(defalias 'zap-whitespace-forward 'ash-delete-syntax-forward) | |
;; There's more! | |
;; Delete word characters forward, delete punctuation forward, | |
;; delete newlines forward. | |
(defun ash-delete-syntax-forward (arg) | |
"Delete characters of same syntax at point forward ARG times." | |
(interactive "*p") | |
(delete-region (point) (progn (forward-same-syntax arg) | |
(point)))) | |
;; No shipping and handling if you call now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment