--
This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "sup...@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+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bbedit/0F089104-5A7A-4BE0-A750-5B7965AE443B%40gmail.com.
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 <cha...@garrison.com.au>
Garrison Computer Services <http://www.garrison.com.au>
PO Box 380
Tumbarumba NSW 2653 Australia
On 21 Sep 2020, at 9:57, TJ Luoma wrote:
I'm not very familiar with these. Are there any out there which format bash / zsh shell scripts?
I haven't looked. If there are I'm sure an online search will reveal them. Common terms are "tidy", "prettify" & "beautify".
On 2 Dec 2020, at 10:30, isao wrote:
Here's my BBEdit shell script https://github.com/isao/shell/blob/master/bbedit/Scripts/lint.sh
Nice.
I just came across tidyall
this morning:
https://metacpan.org/pod/distribution/Code-TidyAll/bin/tidyall
I may rewrite my BBEdit text filter to use that, since it may be easier to enable "plugins" than to adapt the filter script for each new formatter I need.