syntax aware formatting for programing languages

67 views
Skip to first unread message

Andrew Davidson

unread,
Nov 2, 2015, 9:33:32 AM11/2/15
to BBEdit Talk
I am looking for the equivalent of the Markup|Utilities|Format... tool for programming languages. I use that tool for cleaning up indentation and spacing on HTML files, but would like the same sort of utility for C++ (specifically, but wondering about other languages as well).

Does such a thing exist in BBEdit, or are there any tricks for this?

Thanks.

.ad

Craig Heilman

unread,
Nov 2, 2015, 11:00:52 AM11/2/15
to bbe...@googlegroups.com
I use Artistic Style aka astyle although I haven't tried to integrate it with BBEdit...

--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"sup...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

---
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+un...@googlegroups.com.
To post to this group, send email to bbe...@googlegroups.com.

-- 
Craig Heilman
Bugaboo Software - Software Engineering & Consulting



signature.asc

Marshall Clow

unread,
Nov 2, 2015, 7:44:19 PM11/2/15
to bbe...@googlegroups.com
On Mon, Nov 2, 2015 at 6:19 AM, Andrew Davidson <ahdav...@gmail.com> wrote:
I am looking for the equivalent of the Markup|Utilities|Format... tool for programming languages. I use that tool for cleaning up indentation and spacing on HTML files, but would like the same sort of utility for C++ (specifically, but wondering about other languages as well).

Does such a thing exist in BBEdit, or are there any tricks for this?


I'd love to see clang-format integration :-)
(and YouCompleteMe as well, but that's a lot more work...)

-- Marshall
 

Christopher Stone

unread,
Nov 3, 2015, 5:22:03 AM11/3/15
to BBEdit-Talk
On Nov 02, 2015, at 10:00, Craig Heilman <cra...@bugsoft.com> wrote:
I use Artistic Style aka astyle although I haven't tried to integrate it with BBEdit...
______________________________________________________________________

Hey Craig,

It was easy enough to download from SourceForge and `make`.

It's available from Macports, so it's almost certainly available from Homebrew as well.

Basic usage in BBEdit is simple.  Run as a text-filter:

#! /usr/bin/env bash
astyle

Add options to your heart's desire.

--
Best Regards,
Chris

Reply all
Reply to author
Forward
0 new messages