Skip to content

Instantly share code, notes, and snippets.

@defunkt
Created November 5, 2009 20:45
Show Gist options
  • Select an option

  • Save defunkt/227361 to your computer and use it in GitHub Desktop.

Select an option

Save defunkt/227361 to your computer and use it in GitHub Desktop.
Reduce your carbon footprint
### Reduce your carbon footprint
Vim
`autocmd BufWritePre * :%s/\s\+$//e`
Emacs
`(add-hook 'before-save-hook 'delete-trailing-whitespace)`
Textmate
<http://blogobaggins.com/2009/03/31/waging-war-on-whitespace.html>
In your existing codebase
`find . -name '*.rb' | xargs perl -pi -e 's/ +$//'`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment