6

What you need(imho) is the pretty-format option for xml files. This auto aligns your xml code, but firstly make sure the source file isn't malformed(missing tags, non-escaping characters etc...), so you will also need an XML validator for that. Both options are covered by XMLTools. So after you install it, Check XML syntax now to verify that your xml is ...


4

I've found SwiftLint and Tailor, which both enforce Swift style and convention best practices. Both can be run from the command line as an external tool, or integrated with Xcode. Both are well-maintained and Tailor is cross-platform. Both have customizable rules engines. Tailor looks more "official," with a more stable dev team, but it's hard to say ...


4

Atom.io is another text tool with beautification functionality tools available. The package I linked will format about a dozen languages out of the box. Others can be added through separate configuration files (if atom-beautify doesn't know how to beautify the language you're working in, it will tell you were you can find download the needed configuration ...


3

I like the SublimeAStyleFormatter plugin for Sublime Text. It works with C/C++/C#/Java source code files. There are a couple methods you can use to install it (all of which are detailed in the readme) but I recommend the Package Control method as very easy. There are quite a few options. You'd probably be most interested in: indent indent-spaces and there ...


3

I've tried different solutions, from regular expressions in Sublime Text to dedicated JavaScript beautifiers such as js-beautify and UglifyJS2 (with the --beautify option). Regarding regex, it seemed too complicated to find an expression that could cover all the cases you mentioned, while for the other two tools, they look good, but even with specific ...


3

I like the SQLBeautifier plugin for SublimeText. SublimeText is cross-platform (Windows, Linux, and OSX) and has a free trial with unlimited functionality. The plugin itself is free and open source (MIT Licensed). Installation is quite simple - just run installer for SublimeText, open SublimeText and install Package Control, then in Sublime Text type ctrl-...


3

http://www.sql-format.com/ lets you format things with quite a lot of control if you can cope with a web interface rather than a command-line tool:


3

Popular free open-source PMD code analyzer has a copy-paste detector CPD - it can find similar code fragments which are good candidates to "extract method" refactoring. It is cross-platform and can be run in any system that have JRE implemented. It also have a vast variety of plugins for popular build tools and IDEs like maven, eclipse, ant, etc.


2

C# Formatter Online Pros: Correct beautify. Online. Input C# code and copy/paste c# beautified code. Download .cs beautified version. Cons: Only two options for formatting fonts: small and big. K&R bracing, which is not usual C# formatting.


2

You can use Eclipse + Eclipse Tidy (Marketplace): free and open source cross-platform HTML beautifier feature:


2

SynWrite, free and open-source. It has HTML beautify, call menu item HTML → HTML Tidy → Tidy - reformat only. Other HTML items in Tidy menu - for different tasks, more choices of reformatting. JS/CSS beautify also exists: just see Python plugins site.


2

One trick that you can use is to have a git hook to run lint, or it's equivalent for other languages, and reject the code with clear error messages if it doesn't meet the requirements. While the lint family of tools try to locate errors by static analysis there are also style rules that you can enable and/or customise in most of them - there are a long list ...


2

I wish there was a tool that behaved like you describe. We gave up on using code formatting tools in our projects because the formatting changes they enforced annoyed developers far more than we annoyed each other with our own formatting quirks. For indentation, in particular, most editors have functions to just indent without otherwise formatting, and you ...


2

You could take a look at: SwiftLint - Gratis & Open Source Atom Linter + SwiftC plugin - Also Gratis & Open Source but requires Atom so may not suit your usage.


2

Notepad++ has color highlight for many languages built in and reformatting plugins for some languages, e.g. Javascript https://notepad-plus-plus.org/


2

You might consider an online SQL builder as well. http://www.buildmystring.com will build your sql strings and has quite a few spacing and formatting options. Cheers.


2

The python pygments includes a utility pygmentize that can syntax highlight a large number of programming languages to the command prompt or to HTML. LaTex or RTF. pygmentize -f html /path/to/file.py Would syntax highlight your file into html and output to the console or you can pipe it to a file. There are lots of options to customise the output. Python ...


2

You could look at CodeMirror 2 which fits 90%-95% of your requirements and can be expanded to fit the rest: Open Source & Gratis - Yes commercial support is available from the author. Code Reformatting - Yes Syntax Highlighting - Yes Linux - Yes Cross platform JavaScript-based in-browser solution Offline Use - Yes either download the latest release or ...


2

For the general formatting stuff, I'd suggest looking into clang-format, it's one of the best tools out there right now for this type of thing, and comes with a bunch of predefined formatting styles. For the general coding stuff, you want to find a good static analyzer. I unfortunately don't have any good one to recommend myself as I don't do much with C, ...


1

I use Visual Studio Code to indent my messy code before I make any commit. I have tried this feature in Aptana Studio, Brackets, PHPStorm and Atom. VS Code does it best (in my opinion). The code you've shared may need to be indented as HTML separately.


1

SynWrite (Windows only); CudaText (cross-platform) share the same lexer MediaWiki. Install it using AddonsManager menu. This lexer hilites Mediawiki text as follows: I don't think some app can minify/unminify Mediawiki. So no plugin exists here.


1

Our DMS Software Reengineering Toolkit can do this. DMS is a program transformation system that parses source text to compiler data structures, applies transformations on those data structures to produce essentially a different program, and then can regenerate source code for the modified program back from those data structures. DMS uses compiler-...


1

Here are a few: jsFiddlePlayer Opens jsFiddle output to a single unified html page in a new window or tab with one click from the Omnibox. jsFiddle is awesome, but sometimes you want to combine all your HTML, CSS & JS into a single HTML file (perhaps to save it to your local disk). jsFiddle Player does that, it simply adds a "play" button to the ...


1

Semantic Designs' (my company) offers a PHP Formatter and also a JavaScript formatter. The PHP formatter formats PHP code nicely. It formats any HTML found between PHP fragments reasonably considering that that the HTML is broken into arbitrary fragments by the intervening PHP elements. It does not touch code inside <script> tags. The JavaScript ...


1

GNU Indent can handle this: indent b.c Input: unsigned int myfunc (int x; int y) { } Output: unsigned int myfunc (int x; int y) { }


1

http://astyle.sourceforge.net/ aStyle - no competition. I've been using this for a while now as I tend to write functions in notepad++ on my way to work and then beautify it with this before inclusion in projects - it really does a great job in my opinion.


1

Depending on exactly what you need, GNU Indent might do the trick. It has customisable indentation and formatting rules, which I guess you could tweak to suit your particular code. I don't know much about Obj-C though, so it might fall over when trying to deal with that.


1

Since it seemed like there was no such library so I've written one myself. You can find it here: https://github.com/idmean/nowClean I've also written about it on my blog: http://www.zujab.at/2014/09/nowclean-clean-your-code/


1

Our CloneDR tool will do this, detecting clones across thousands of files. You don't give it anything but the files; it determines the clones automatically. A clone set is a set of code blocks that are deemed similar. Often clone sets are just pairs, sometimes of thousands of lines, this happens when source files are copied en masse in the code base. ...


1

Although it has to be installed a better solution is to use SublimeAStyleFormatter - which is a Sublime Text Plugin. You have to first install Sublime Text (painless) and then install SublimeAStyleFormatter which is also quite painless. There are a couple methods you can use to install it (all of which are detailed in the readme) but I recommend the ...


Only top voted, non community-wiki answers of a minimum length are eligible