Last active
January 4, 2016 01:08
-
-
Save metaskills/8545940 to your computer and use it in GitHub Desktop.
OS X Command To Clean All Whitespace From A Rails Project
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
find app config db spec test -type f -name '*.rb' -or -name '*.coffee' -or -name '*.erb' -or -name '*.jbuilder' -or -name '*.js' | xargs sed -i '' -E "s/[[:space:]]*$//" | xargs sed -i -E '$a\' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sweet. to enable this on Textmate 2, go here:
https://github.com/bomberstudios/Strip-Whitespace-On-Save.tmbundle