-8

I'm using TextWrangler and I can't find a good code formatter. I tried TextMate and it ruined my code completely.

I don't care about anything else other than a button that formats the text. From this:

function hello() {

if ($statement) {

die();

}

}

To this:

function hello() {

    if ($statement) {

        die();

    }

}

Without having to press "Tab" 4 times.

halfer
  • 19,824
  • 17
  • 99
  • 186
Vulkan
  • 1,004
  • 16
  • 44
  • 1
    Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it. – Jay Blanchard May 18 '15 at 20:04
  • I don't use auto-formatters, but I think NetBeans does a good job. Depends if you are OK with a relatively heavy-weight IDE. – halfer May 18 '15 at 20:09
  • I think what you are looking for is an IDE, I use and recommend PhpStorm by JetBrains – Dimitri Acosta May 18 '15 at 20:10
  • Takes more time to format text, instead of writing it. NOT KIDDING! – Vulkan May 18 '15 at 20:10
  • (The purpose of editors improving questions is two-fold: it makes them easier to read for new readers, and also sends a signal to the OP as to how we like questions here. They are best succinct, and, of course, following the guidelines). – halfer May 18 '15 at 20:27
  • (Commentary on votes and posting guidelines does not belong in questions. Please add that, if you must, as comments. If you are interested, you may also post to or read [the Meta site](http://meta.stackoverflow.com/), if you wish to get involved in how Stack Overflow is run.) – halfer May 18 '15 at 20:37

1 Answers1

1

First of all, Your question is opinion based, so there is not a real answer.

But, if you want a text editor then use Sublime Text.

It's very powerful. and very customizeable.

After you've installed it, you can create a shortcut to indent your code.

The link is here.

Community
  • 1
  • 1
Akar
  • 5,075
  • 2
  • 25
  • 39
  • *"Your question is opinion based"* - Yes and no, it's about asking for software, which is what the question was closed as. – Funk Forty Niner May 18 '15 at 20:15
  • *"This is not a matter of opinion. If you don't use text format and instead you write code the same way you would eat a sandwich, you are retarded. – user3737190 5 secs ago"* - sure hope that wasn't aimed at me ;-) @user3737190 edit as per your edit: *"f**king Tab button over and over and over again"* - oh, how lovely. – Funk Forty Niner May 18 '15 at 20:23
  • 2
    @user3737190: for "retarded", have a downvote and a moderator report. We don't use that sort of discriminatory language here. – halfer May 18 '15 at 20:23