Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Ruby
branch: master

This branch is 1 commit ahead, 4 commits behind mocoso:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
Commands
Support
.gitignore
Rakefile
Readme.markdown
info.plist

Readme.markdown

Code Beautifier Textmate Bundle

Textmate's indent functionality does a reasonable job of formatting your code BUT there is a great deal of room for improvement.

Code Beautifier only supports Ruby at present but does improve upon Textmate's indent functionality, in particular it is better at indenting multiline statements and cleans up white space.

Installation

If you have git installed your machine then run this:

cd ~/Library/Application\ Support/TextMate/Bundles
git clone git://github.com/mocoso/code-beautifier.tmbundle.git Code\ Beautifier.tmbundle

Otherwise download the zip or tarball and unpack it in ~/Library/Application\ Support/TextMate/Bundles.

Then select 'Bundles > Bundle Editor > Reload Bundles' from Textmate's menus

Dependencies

The 'Beautify all changed' command relies on

  • Your project using Git for source control
  • The Grit gem being installed

    sudo gem sources -a http://gems.github.com/
    sudo gem install mojombo-grit
    

KNOWN ISSUES

  • Does recognize strings with custom delimiters
  • Does not handle multiline blocks within implied brackets
  • Does not indent continuing line statements within brackets correctly

Credits

This was based on the ruby beautifier script by Paul Lutus and Beautiful Ruby in Textmate by Tim Burks

Something went wrong with that request. Please try again.