I like Textmate but its really driving me crazy when it comes to formatting code whatever the language I'm working with. Is there any way to format code? shortcut, bundle or anything that can help (eg ctrl+shift+F in netbeans)?

link|improve this question
feedback

migrated from stackoverflow.com Jul 20 '11 at 11:30

This question came from our site for professional and enthusiast programmers.

2 Answers

up vote 3 down vote accepted

No.

There is a Reformat Paragraph command under the Text menu but it is mostly useless for programming.

Some language-specific bundles (like Javascript Tools) offer reformatting options, though.

link|improve this answer
God help us please :) – Ans Jul 19 '11 at 21:20
feedback

If all you want to do is re-indent:

  1. select code
  2. text > indent line

All it does is indent each nested level more than its parent. It wont erase empty lines or create any carriage returns.

Personally I love this because it seems to be language agnostic. Tested with HTML, ERB, CSS, SCSS.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.