FixIndent

(incomplete) When you're trying to fix or review someone's code and their indentation and formatting is just feral, FixIndent can fix it without alt-tabbing between browser & eclipse. Not related to Fix-a-dent brand denture adhesive.

HTML

<!-- 
DIV.wmd-container AND ITS CONTENTS ARE COPY-PASTA FROM STACKOVERFLOW.COM
I HAVE NO LEGAL RIGHT TO REPRODUCE IT HERE.
I HAVE NO LEGAL RESPONSIBILITY FOR WHAT IT DOES TO END USERS.
DELETE IT AND COME UP WITH YOUR OWN SAMPLE TO FIX IF THAT BOTHERS YOU.
(The textarea is legit public domain due to the stackoverflow TOS)
-->
<div class="wmd-container">
<div id="wmd-button-bar" class="wmd-button-bar"></div>
<textarea id="wmd-input" class="wmd-input" name="post-text" cols="92" rows="15" tabindex="101" data-min-length="">
 String[] newRow = new String[150];

for (int i = 0; i < row.length; ++i) {

if(row[i].equals("token1")){
               newRow[0] = row[i]; //key
               newRow[1] = row[i+1];//value
           }

           else if(row[i].equals("token2")){
               newRow[2] = row[i];
               newRow[3] = row[i+1];
           }//...and so on. Elseif ladder at least is at least 100 long.
</textarea>
</div>

JavaScript

(function ($, config) {
    "use strict";
    
    var // this regex digests a string into leading whitespace,
        // content text, and trailing whitespace.
        lineRegex = /^(\s*)(\S.*\S|\S)?(\s*)$/g,
        spacesPerTab = config.spacesPerTab,
        // digests a string in which sequences of spaces equivalent
        // to a tab have all been replaced with actual tabs.
        // remaining spaces that are not trailing all tabs have no
        // effect on alignment.
        aligningTabRegex = /^(\s*)([^\t]*)$/g,
        adp = Array.prototype,
        predefinedLanguages = {},
        MicroToolbar,
        repeatSpaces;
    
    repeatSpaces = (function () {
        var spacesByRepeatCount = ["", " "];
        return function repeatSpaces(n) {
            var result = spacesByRepeatCount[n];
            if (n && !result) {
                result = repeatSpaces(n >> 1);
                result += result;
                if (n & 1) {
                    result += " ";
                }
                spacesByRepeatCount[n] = result;
            }
            return result;
        };
    })();
    
    /**
     * POD class to be manipulated by indentation fixers
     * @param {String} [rawText] original line text including
     *    leading and trailing white space as tabs & spaces, but
     *    NO line breaks.
     * @param {String} [text] content text with no leading or
     *    trailing white space
     * @param {Number} [originalSpaces] indentation level with
     *    tabs counted as multiple spaces.
     * @constructor
     */
    function Line(rawText, text, originalSpaces) {
        this.rawText = rawText || "";
        this.text = text || "";
        this.originalSpaces = originalSpaces || 0;
        this.spaces = originalSpaces || 0;
    }
    
    function splitLines(rawText) {
        var oneTabWorthOfSpaces = repeatSpaces(config.spacesPerTab);
        
        return rawText.split(/\r\n|\r|\n/g).map(function (lineTxt) {
            try {
  ...