On Feb 10, 2017, at 12:36, brian schroeder <b.schro...@gmail.com 
<http://gmail.com/>> wrote:
> That helps a lot.
> Thanks, Chris!


Hey Brian,

You're welcome.

Just for giggles here are a couple of text-filters.

A simple one-liner `sed` script to remove all horizontal whitespace.

#!/usr/bin/env bash
# ------------------------------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2017/02/10 17:53
# dMod: 2017/02/10 18:13
# Task: Remove all horizontal whitespace.
# Tags: @Remove, @Horizontal, @Whitespace
# ------------------------------------------------------------------------------

sed -E 's![[:blank:]]+!!g'

Another simple `sed` script to remove all horizontal whitespace and blank lines.

#!/usr/bin/env bash
# ------------------------------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2017/02/10 17:53
# dMod: 2017/02/10 18:11
# Task: Remove all leading, trailing whitespace and delete blank lines.
# Tags: @Remove, @Leading, @Trailing, @Whitespace, @Delete, @Blank, @Lines
# ------------------------------------------------------------------------------

sed -En '
    s![[:blank:]]+!!g
    /^$/d
    p
'

BBEdit text-filters operate on the selection if there is one, otherwise they 
operate on the whole front document.

Text filters are installed here:

~/Library/Application Support/BBEdit/Text Filters/

Text filters are run from:

BBEdit Menu Bar > Text > Apply Text Filter > <your_filter>

And of course you can give them keyboard shortcuts in BBEdit's Menus & 
Shortcuts preferences.

--
Best Regards,
Chris

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@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+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to