Charlie,
This is exactly what I was hoping for. Thank you!

James

> On Sep 20, 2020, at 5:43 PM, Charlie Garrison 
> <charlie-goo...@garrison.com.au> wrote:
> 
> On 19 Sep 2020, at 3:48, James Reynolds wrote:
> 
> I know BBEdit has an HTML formatter. Can it also format code? Like what 
> https://beautifier.io/ does for JavaScript?
> 
> BBEdit has fantastic support for Text Filters. So if your formatter of choice 
> works via CLI, writing a formatter (prettifier) is fairly trivial.
> 
> I have attached the filter script I use, which auto-detects language and 
> applies appropriate command. It should be easy to swap out prettier for 
> beautifier.
> 
> I set a keyboard shortcut for the filter, so it's as simple to use as the 
> built-in formatting - select the text to format, type shortcut. (No selection 
> will format the whole document.)
> 
> -cng
> 
> --
> 
> Charlie Garrison                   <char...@garrison.com.au>
> Garrison Computer Services      <http://www.garrison.com.au>
> PO Box 380
> Tumbarumba NSW 2653  Australia
> 
> 
> -- 
> This is the BBEdit Talk public discussion group. If you have a feature 
> request or need technical support, please email "supp...@barebones.com" 
> rather than posting here. Follow @bbedit on Twitter: 
> <https://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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/bbedit/852FB848-89F7-4E5C-9872-1C361ECAEEAA%40garrison.com.au.
> <16)prettier.sh>

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@barebones.com" rather than 
posting here. Follow @bbedit on Twitter: <https://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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/CE58FBB3-3714-49EE-B842-198BAB8BD0DF%40gmail.com.

Reply via email to