Hello all...
Speaking of external indenting apps, I download and build 'astyle' (Artistic Style) and set up a bundle command Ctrl-Option- Command-[ to run it on the selection or the entire document. Works like a charm. Tons of indentation and style options!
From the Artistic Style web page:
"Artistic Style is a source code indenter, source code formatter, and source code beautifier for the C, C++, C# and Java programming languages."
Have a look at http://astyle.sourceforge.net/ and see if it's what you need. I don't know how it compares with 'indent', any comments on that?
JP
On Jun 8, 2007, at 9:15 AM, Steve King wrote:
On Thu, 7 Jun 2007, Pavan Gunupudi wrote:
The following pieces of code are indented incorrectly by "Indent Selection" - ⌥⌘[ . Any fixes?
FWIW, I find the best way to handle re-formatting C code is to filter it through the external 'indent' command. It's *highly* customizable and comes with reasonable defaults for a number of standard formatting styles (GNU, K&R, BSD). The indent package is available through MacPorts or can be compiled from source.
That said, it would be nice if TM's formatter was a little smarter about what it does while you're typing, but I can live with it as- is for now (at least until 2.0 comes out!)
-- Steve King, steve@narbat.com ______________________________________________________________________ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate