Skip to content

Instantly share code, notes, and snippets.

@g-k
Last active August 29, 2015 14:18
Show Gist options
  • Save g-k/f349ea2293ea782dba0c to your computer and use it in GitHub Desktop.
Save g-k/f349ea2293ea782dba0c to your computer and use it in GitHub Desktop.
cmd to fix trailing whitespace in PHP files
git ls-files | grep '.php$' | xargs -L 1 -I % emacs -batch % --eval '(delete-trailing-whitespace (point-min) (point-max))' -f save-buffer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment