Code Beautifier Textmate Bundle
Textmate’s indent functionality does a passable job of formatting your code BUT there is a great deal of room for improvement.
Inspired by the Paul Lutus’s ruby beautifier script and Tim Burks’s post on making it into a Textmate bundle I’ve put together a Code Beautifier Textmate bundle
It 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.
It’s all hosted on Github so if you want to make improvements then please fork away.
Installation
Run this:
cd ~/Library/Application\ Support/TextMate/Bundles
git clone git://github.com/mocoso/code-beautifier.tmbundle.git Code\ Beautifier.tmbundle
Then select ‘Bundles > Bundle Editor > Reload Bundles’ from Textmate’s menus
Updated on 21 May 2009
Changed the URL of the repository on GitHub to http://github.com/mocoso/code-beautifier.tmbundle/tree/master to fix a typo in the name (oops).
February 21st, 2009 at 3:16 am
For some reason I get the following error when I try to clone:
Initialized empty Git repository in /Users/bre/Library/Application Support/TextMate/Bundles/Code Beautifier.tmbundle/.git/ fatal: protocol error: expected sha/ref, got ' *********'No matching repositories found.
*********'
Any ideas? I’ll just download the .tar and install for now. Never gotten an error like that from github.
February 21st, 2009 at 7:12 am
Works fine for me
December 16th, 2009 at 1:13 pm
Does not work now:
sergey@localhost:~/Library/Application Support/TextMate/Bundles/Code Beautifier.tmbundle$ git clone http://github.com/mocoso/code-beautifier.tmbundle/tree/master Initialized empty Git repository in /Users/sergey/Library/Application Support/TextMate/Bundles/Code Beautifier.tmbundle/master/.git/ warning: remote HEAD refers to nonexistent ref, unable to checkout.
December 16th, 2009 at 2:31 pm
Sergeych, you need to use git clone git://github.com/mocoso/code-beautifier.tmbundle.git (not git clone http://…)