Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisbloom7/498742 to your computer and use it in GitHub Desktop.
Save chrisbloom7/498742 to your computer and use it in GitHub Desktop.
Textmate command for PHP_Beautifier
# Runs PHP_Beautifier on the current document.
# See http://beautifyphp.sourceforge.net/ for more info.
# Add this as a new command in TextMate
# I used the following additional command settings:
# Save: Nothing
# Input: Document ("Selected Text or", note PHP_Beautifier
# only works on complete PHP documents)
# Output: Replace Document
if [[ "$TM_SOFT_TABS" == "YES" ]]; then
_TABS="-s$TM_TAB_SIZE"
else
_TABS="-t$TM_TAB_SIZE"
fi
php_beautifier $_TABS "$TM_FILEPATH" -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment