Re: python language server

2022-07-09 Thread TJ Luoma
Homebrew used to use /usr/local/ but on Apple Silicon uses /opt/homebrew/

My guess is that BBEdit isn’t getting the $PATH set properly, although I’m
on my iPhone and not sure how to fix it at the moment.

I hope this might help.

Tj



On Fri, Jul 8, 2022 at 6:24 PM David Schueler  wrote:

> Hi all,
>
> I just got a new Mac with an M1 Ultra chip. I'm trying to set up BBEdit
> with the jedi-language-server, as per these instructions
> <https://www.barebones.com/support/bbedit/lsp-notes.html>. It worked fine
> on my old intel Macbook Pro, but with the new machine, I get the message
> "server command not found". I linked the Python section to the python in my
> current venv, which seemed to work before.
>
> Thanks,
>
> David
>
> --
> 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/c37d4422-0511-4189-bf78-34030f5d2b05n%40googlegroups.com
> <https://groups.google.com/d/msgid/bbedit/c37d4422-0511-4189-bf78-34030f5d2b05n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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/CADjGqHvjP3Sgvm92o1V7nE-YJWzN5uSuWTEudyavpk%3DNvGQqPg%40mail.gmail.com.


Re: Easiest way to replace all matches

2021-10-22 Thread TJ Luoma
> That's not overly difficult using a bit of AppleScript.

Well, not for you, maybe!

Thanks! That's probably something simple enough that I can build on it, too!

TJ



On Thu, Oct 21, 2021 at 11:40 AM Christopher Stone 
wrote:

> On Oct 21, 2021, at 06:47, TJ Luoma  wrote:
>
>
> Assume a 'regular' text file.
>
> I'd like to be able to select a word, press a key, and have all instances
> of that word be surrounded by {brackets}.
>
> ------
>
> Hey Tj,
>
> That's not overly difficult using a bit of AppleScript.
>
> --
> Take Care,
> Chris
>
> --
>
> 
> # Auth: Christopher Stone 
> # dCre: 2021/10/21 10:33
> # dMod: 2021/10/21 10:33
> # Appl: BBEdit
> # Task: Enclose All Instances of the Selected Word with Curly Braces.
> # Libs: None
> # Osax: None
> # Tags: @Applescript, @Script, @BBEdit, @Enclose,@Instances, @Selected,
> @Word, @Curly, @Braces
> 
>
> *tell* *application* "BBEdit"
> *tell* *front* *text window's* *text*
> *set* theWord *to* *the* selection *as* *text*
> *set* rePattern *to* "\\b" & theWord & "\\b"
> *replace* rePattern using "\\{&\\}" options {search mode:*grep*, case
> sensitive:*false*, starting at top:*true*}
> *end* *tell*
> *end* *tell*
>
> 
>
> --
> 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/0BC82778-B9FE-417A-A5B6-87CC90F9A397%40gmail.com
> <https://groups.google.com/d/msgid/bbedit/0BC82778-B9FE-417A-A5B6-87CC90F9A397%40gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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/CADjGqHuJKENaPR5Zx8AMb0f-1RQ8wevrYNC94wMKRq22_bg9hQ%40mail.gmail.com.


Easiest way to replace all matches

2021-10-21 Thread TJ Luoma
Assume a 'regular' text file.

I'd like to be able to select a word, press a key, and have all instances
of that word be surrounded by {brackets}.

For this example,  the words would all be names so you would not need worry
about "What if the word is {and} but the word "br{and}s" also exists?

I could hack this together with Keyboard Maestro but I wondered if there
was a more native way to accomplish this

Thanks for your help!

~ Tj

-- 
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/CADjGqHtLTnoECLX4J44LvkAVdG2P1JpCUmg3%2ByCNqbP_NmjX3A%40mail.gmail.com.


Re: Need explanation of REGEX code

2021-07-31 Thread TJ Luoma
Try pasting it into https://regexr.com

That's what I usually use to translate regex into English :-)



On Sat, Jul 31, 2021 at 10:20 AM Howard  wrote:

> Can someone explain how the REGEX code below works?
> *(.)(?![^(]*\))*
>
> I know it looks for digits, including two-digit numbers in parentheses,
> and extracts them and inserts a space after each one, but I do not know how
> the code starting with *(?* works.
>
> Here is sample data for it:
> 01000
> (10)1140006x
> 002200010
> 0(11)01x
> 311200
>
> Here is output:
> 0 1 0 0 0 0 0 0 0
> (10) 1 1 4 0 0 0 6 x
> 0 0 2 2 0 0 0 1 0
> 0 0 0 0 0 (11) 0 1 x
> 3 1 1 2 0 0
>
>
> --
> 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/aa2c7738-44c7-4d75-b64e-7cf2655ffb4an%40googlegroups.com
> 
> .
>

-- 
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: 
--- 
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/CADjGqHugPevNf7274j-ETDHHMUSgwaYCmGgHgT%2BWnFG526mgrg%40mail.gmail.com.


Re: AppleScript to make window wide enough to not scroll?

2021-06-26 Thread TJ Luoma
On Jun 26, 2021 at 8:23:54 PM, Christopher Stone 
wrote:

> Hey Tj,
>
> Here is the newest version of the script.
>
> CHANGES:
>
> - macOS versions Sierra through Big Sur are supported automatically.
> - The font name and font size are managed automatically.
> - It sets the document magnification level to 1 if necessary.
>

This works great so far! I will give it additional testing next week, but
on first tests it seems to be working great.

It does leave a horizontal scrollbar, but there’s nowhere to scroll it. If
I enlarge the window by just a tiny bit (as little as I can), it goes away.
I’m not sure if that’s something that can easily be changed (just to make
the scrollbar disappear) but if not that’s really a minor nit.

Thank you!

~ Tj

-- 
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/CADjGqHtBLyjCcJBnUWaDF%2BV3JE%3D7sOfGjeaFdL_4jRAjQXnTJg%40mail.gmail.com.


Re: AppleScript to make window wide enough to not scroll?

2021-06-01 Thread TJ Luoma
On Tue, Jun 1, 2021 at 3:22 PM Christopher Stone 
wrote:

> I believe the changes I made should make the script viable through Big
Sur, but I can't be certain without testing.

YES! That works!

You are a prince among men.

Thank you! Thank you! Thank you!

~ Tj

p.s. - I have an "always on" M1 Mac Mini running Big Sur (obviously). If
you'd like Screen Sharing access to it for testing purposes, let me know.
It would be easy enough to set up, and I thought it might be useful until
you get your own B.S. Mac. You've already got my email address.

-- 
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/CADjGqHvbimkT2kHy88-mUpUxaOO%3DyZF96vxhZJYmzx%2BD9CRThw%40mail.gmail.com.


Re: AppleScript to make window wide enough to not scroll?

2021-05-31 Thread TJ Luoma
Hi Chris

I had a feeling you'd know the answer to this one… because you had already
written it :-)

Unfortunately I'm getting an error that I don't understand at all. I pasted
the full message here

https://images.luo.ma/temp/script-debugger-2021-05-31-09.21.15.png

FWIW, I don't use the sidebar. All of my BBEdit windows are one-document
each (unless I'm doing a mass-search-and-replace, and then I close that
windo as soon as I'm done).

I also use 'Inconsolata-g' 16 as my font size (used to be 13, but not long
after I got a 4K monitor I finally got tired of always having to increase
the zoom level on all my BBEdit windows so I finally caved and increased
the default font size :-)

~ Tj





On Mon, May 31, 2021 at 4:35 AM Christopher Stone 
wrote:

> On 05/30/2021, at 17:14, TJ Luoma  wrote:
>
> Hi all, my name is TJ and I don't understand AppleScript, hence I
> come, again, asking for help from those who do.
>
> I like to set "Soft Word Wrap" to "Window Width".
>
> But then I often find that I want to adjust the width of the window so
> that it is _just_ wide enough to not need a horizontal scroll bar.
>
> Tonight it occurred to me that this would be a good place for automation,
> but I can't figure out if that's possible, and Google is no help because it
> just tells me how to change word wrap or other word-wrap related things
> that are not the thing I'm looking for.
>
> --
>
> Hey TJ,
>
> There's *probably* only one place on the whole Internet to find that.
>
>
> https://forum.latenightsw.com/t/resize-width-of-front-bbedit-window-according-to-longest-line-and-then-center/1531
>
> The original script works for me on macOS 10.12.6 Sierra, but there's a
> change to AppleScript in High Sierra that has to be adjusted for.
>
> Rich kindly added *sidebar width* to BBEdit's AppleScript lexicon after I
> wrote this, but I have not (as yet) changed the script to adapt to its
> open/closed state.
>
> Presently the script expects the sidebar to be closed when run.
>
> If you can't follow the thread and get it running on your system let me
> know.  I can reproduce the issue on my MacBook Air (Mojave), so I should be
> able to fix it without too much trouble.
>
> If I have time I might look at it late Monday.
>
>
> --
> Take Care,
> Chris
>
> --
> 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/11C1632C-D694-402A-9E53-8E44B07923A3%40gmail.com
> <https://groups.google.com/d/msgid/bbedit/11C1632C-D694-402A-9E53-8E44B07923A3%40gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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/CADjGqHvTDpm3JoNTsTaxAqfEctk%3DcSNzpDmyKsUpps8ZJB2ofw%40mail.gmail.com.


AppleScript to make window wide enough to not scroll?

2021-05-30 Thread TJ Luoma
Hi all, my name is TJ and I don't understand AppleScript, hence I
come, again, asking for help from those who do.

I like to set "Soft Word Wrap" to "Window Width".

But then I often find that I want to adjust the width of the window so that
it is _just_ wide enough to not need a horizontal scroll bar.

Tonight it occurred to me that this would be a good place for automation,
but I can't figure out if that's possible, and Google is no help because it
just tells me how to change word wrap or other word-wrap related things
that are not the thing I'm looking for.

So it's possible that there's no way to do this, or there is a way and I
just wasn't able to find the right search terms.

Anyone know if this can be done, or should I start a campaign to have it
added to BBEdit 14 ;-?

Thanks, all.

~ Tj

-- 
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/CADjGqHsJJhAb5wYir%2BYz2%2BaYpR2%3DwBrzp_DS4Aqf%2BJkvAUNDwg%40mail.gmail.com.


Re: Can't launch BBEdit

2021-04-15 Thread TJ Luoma
On Thu, Apr 15, 2021 at 1:31 AM @lbutlr  wrote:

> I didn't have the manual saved off and couldn’t remember where it was
stored, so I could not
> access it from the help menu because I could not open Bbedit, so I
guessed. Fortunately I did not
> chose poorly (this time).

It's also on the BBEdit website

<https://www.barebones.com/support/bbedit/manual.html>
https://www.barebones.com/support/bbedit/manual.html

which I found via 'bbedit manual pdf' into my search engine of choice.

I know first-hand that it's hard to think of some of these things when
you're very focused on trying to fix an issue — plus I've *had* access to
the manual and missed answers to questions I've had -- so this is not meant
as a criticism, just as a tip that I hope will be handy if anything like
this comes up again.

FWIW - I also keep a folder with software manuals at ~/Dropbox/Bookshelf/
which has come in handy over the years.

~ Tj

-- 
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/CADjGqHsTC6yh1f1mwnFXpn0gJF%3DM4ztWGhDoueu8ObCyMnXsXw%40mail.gmail.com.


Re: Stop adding ^M characters

2021-04-04 Thread TJ Luoma
I believe those are line endings for Windows line-endings.

When editing a file, see if you see "Windows (CRLF)" at the bottom of the
window 'chrome'.

If so, click on it and change it to "Unix (LF)".

Git will be happier then.


On Sun, Apr 4, 2021 at 7:07 PM Arthur Goldberg 
wrote:

> According to `git diff`,  control-M characters appeared at the ends of all
> lines I inserted in a file I'm editing with BBEdit. See screenshot.
>
> How do I stop doing this?
>
> Thanks
> Arthur
>
> [image: ctrl-M.jpg]
>
> --
> 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/03da91e3-e71f-43b9-aef8-c28f47ef5ac0n%40googlegroups.com
> 
> .
>

-- 
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: 
--- 
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/CADjGqHuSCUDLoHas%2B%3D%2Bf0aaEqgNSpO1iP6st9nucWtAduQs2aw%40mail.gmail.com.


Re: Reverse order of lines

2021-03-08 Thread TJ Luoma
On Mon, Mar 8, 2021 at 12:15 PM Ted Stresen-Reuter 
wrote:

> I'd like to end up with a list with the items in the reverse order, so,
along the lines of:

I don't know if there's a way to do this directly in BBEdit but you can do
this via:

» Text » Run Unix Command

and enter `tail -r`

Screenshot:
https://cln.sh/fL4uMk

HTH

Tj

-- 
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/CADjGqHuu468GxoHVk_b2pmGNGfDDFA7CpxgaCdbdbqkc0sYPRQ%40mail.gmail.com.


Re: Anyone having problems changing font size w/BBEdit 13.5.2 on Big Sur?

2020-11-14 Thread TJ Luoma
I don't know how to solve that issue but I'm definitely not seeing it here.
Would recommend contacting support.

~ Tj



On Sat, Nov 14, 2020 at 9:48 AM you are here  wrote:

> I just upgraded to Big Sur and was prompted (and accepted) upgrade of
> BBEdit, and now I can't change the text font size. All attempts to change
> font through menu/panels or CMD +/- simply expand or shrink whitespace
> between lines but leave the font size the same regardless of which family
> of font I choose.
>
> This is a very serious issue for me. Does anyone know any fixes or
> workarounds?
>
> --
> 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/1b3b96a1-27b7-48a4-b24f-f0325f7e773fn%40googlegroups.com
> <https://groups.google.com/d/msgid/bbedit/1b3b96a1-27b7-48a4-b24f-f0325f7e773fn%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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/CADjGqHvEZQA_HXb4SAgvfQKb3vpdGW5nCXNvqfXSh-bJRHxDaw%40mail.gmail.com.


Re: AppleScript question

2020-10-12 Thread TJ Luoma
> Trying to learn AppleScript by reading the dictionaries is much like
trying to learn a foreign language just from reading a bilingual dictionary
for that language.

That reminds me of trying to learn how to use Unix commands and having
people tell you to "Read the `man` page!"

Years ago (Usenet days, I think) I had a ".sig" file (remember those?)
which included this: "If I understood the man page, I wouldn't have asked
the question".

Real-world examples are always good. Even with some 'textbook examples' I
find myself wondering what is placeholder text and what is not.

TJ





On Mon, Oct 12, 2020 at 8:30 AM Greg Raven  wrote:

> Thanks for supplying this final piece. Trying to learn AppleScript by
> reading the dictionaries is much like trying to learn a foreign language
> just from reading a bilingual dictionary for that language. Why Apple
> decided not to include any code samples in AppleScript dictionaries is
> beyond me.
>
> On Sunday, October 11, 2020 at 10:36:47 AM UTC-7 jj wrote:
>
>> Greg,
>>
>> The BBEdit dictionary mentions that the "normalize line endings" command
>> takes a text specifier as a parameter.
>>
>> ---
>> normalize line endings v : convert any CRLF pairs and LF characters
>> remaining after line-break conversion
>>
>> normalize line endings specifier : text to be modified
>>
>> → text : the modified text
>> ---
>>
>> Your script as written gives to the "normalize line endings" command an
>> implicit parameter of  type application "BBEdit" which apparently is not
>> automatically convertible to a text specifier.
>> Try to give it the contents of your document which is a text specifier
>> (something of the form: characters x thru y of ...).
>>
>> *normalize line endings* contents *of* *first* *document* *of* first
>> window
>>
>> or use a tell block to specify the implicit parameter:
>>
>> tell  first document of first window
>> *normalize line endings*
>> end tell
>>
>> HTH,
>>
>> Jean Jourdain
>> On Sunday, October 11, 2020 at 2:09:30 PM UTC+2 Greg Raven wrote:
>>
>>> Actually, this isn't working for me either. This is what I have so far:
>>>
>>> ```
>>> tell application "Safari"
>>> set sourceCode to source of first document
>>> end tell
>>>
>>> tell application "BBEdit"
>>> activate
>>> make new text window with properties {contents:sourceCode, source
>>> language:"HTML"}
>>> optimize
>>> # normalize line endings
>>> format mode gentle hierarchical with normalizing tag case
>>> copy time of (current date) to latest
>>> save text document 1 to file ("Macintosh HD:Users:greg:Desktop:tossme-"
>>> & latest & ".html")
>>> end tell
>>> ```
>>> The "normalize line endings" command is commented out because it throws
>>> an error so the script does not run to completion. I tried wrapping it in
>>> it's own tell block, but I'm still missing something.
>>>
>>> On Sunday, October 11, 2020 at 4:46:59 AM UTC-7 Greg Raven wrote:
>>>
>>>> Ah, so. Thank you! It never occurred to me that I needed a nested tell
>>>> block.
>>>>
>>>> On Sunday, October 11, 2020 at 12:53:16 AM UTC-7 jj wrote:
>>>>
>>>>> Hi Greg,
>>>>>
>>>>> Here is a script that might do what you want
>>>>>
>>>>> tell application "Safari"
>>>>> set vContents to source of first document
>>>>> set vName to name of first document
>>>>> end tell
>>>>>
>>>>> tell application "BBEdit"
>>>>> tell first window
>>>>> set vDocument to make new document at beginning with properties
>>>>> {name:vName, contents:vContents}
>>>>> tell vDocument
>>>>> normalize line endings
>>>>> format mode no reorganization with normalizing tag case
>>>>> end tell
>>>>> end tell
>>>>> end tell
>>>>>
>>>>> Best regards,
>>>>>
>>>>> Jean Jourdain
>>>>>
>>>>> --
> 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 r

Re: [ANN] BBEdit 13.2 (415025) pre-release

2020-09-22 Thread TJ Luoma
>
> BBEdit has airbags!



They prefer the term *"Developers".*

Tj


(p.s. - I apologize to everyone for everything.)

-- 
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/CADjGqHs7zwCtxvoDXwAs7mMQE_a8wbHJjzP4oa0iAGxmhFHsYA%40mail.gmail.com.


Re: Can BBEdit format code like it formats HTML?

2020-09-20 Thread TJ Luoma
On Sun, Sep 20, 2020 at 7:44 PM Charlie Garrison <
charlie-goo...@garrison.com.au> wrote:

> BBEdit has fantastic support for Text Filters. So if your formatter of
choice works via CLI, writing
> a formatter (prettifier) is fairly trivial.


I'm not very familiar with these. Are there any out there which format bash
/ zsh shell scripts?

-- 
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: 
--- 
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/CADjGqHtjGb%2BU8ZzovGbBHwUAYNg0YR%3Dd3PXh7siRdOJSNkrAOw%40mail.gmail.com.


Re: Save File when BBEdit sent to the background

2020-09-03 Thread TJ Luoma
On Thu, Sep 3, 2020 at 9:38 AM MacOSX Guru  wrote:

> Does this command work in BBEdit 12.6.7?
>
> defaults write com.barebones.bbedit WriteChangesWhenSentToBackground -bool
> YES
>
> I didn't find any reference to this in the version 12 manual.
> Or is it a version 13 expert preference?
>


If you use Keyboard Maestro, you can emulate this behavior using
AppleScript. Let me know if you want me to dig it out.

TJ

-- 
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/CADjGqHs_J3vQatP1mnRrra%3DQhkJZZaJ%3DLv7DYhqyaOGOEChr3w%40mail.gmail.com.


Re: How to check BB_DOC_PATH

2020-08-19 Thread TJ Luoma
On Sat, Aug 15, 2020 at 11:06 PM consiglieri  wrote:

> The problem I am having is that when running pandoc script in bbedit
script folder to convert a markdown file to
> pdf BBedit saves the generated pdf in a root folder and not in the same
folder as the mark-down file.,

It's hard to be exact without seeing your script, but let's use the basic
example pandoc command:

pandoc -o output.html input.txt

Now, if you are in your $HOME folder and ran this command:

pandoc -o output.html /some/other/folder/input.txt

then 'output.html' would be created in your $HOME folder, and not
"/some/other/folder/"

so what you really want is

pandoc -o /some/other/folder/output.html /some/other/folder/input.txt

There are a few ways of getting this. The usual way is `dirname`

If you add

DIR=$(dirname /some/other/folder/input.txt)

then DIR would equal /some/other/folder/

and you could use

pandoc -o "$DIR/output.html" /some/other/folder/input.txt

to get both files in the same directory.

So, going back to the BBEdit example, if `$BB_DOC_PATH` has the full path
to the file, you could use

DIR=$(dirname "$BB_DOC_PATH")

In zsh you don't need to use `dirname` you can use `:h` at the end of the
variable, like so:

DIR="$BB_DOC_PATH:h"

That will give you the `head` of the path, which is equal to the dirname.

Putting all of that together,

Example #1 (bash):

DIR=$(dirname "$BB_DOC_PATH")

pandoc -o "$DIR/output.html" "$BB_DOC_PATH"

Example #2 (zsh)

DIR="$BB_DOC_PATH:h"

pandoc -o "$DIR/output.html" "$BB_DOC_PATH"

I hope that's helpful. If you need more info, please feel free to ask.

Tj

-- 
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/CADjGqHt0KMDxweJuCPy%2BKNbT%2BnZ7z7hzLzmkBW1K_J_TwQ8Kyg%40mail.gmail.com.


progressive indenting until blank line

2020-06-25 Thread TJ Luoma
I'm not sure how to describe this so I'm just going to show it.

Let's say that I have some text that looks like this:

Lorem ipsum dolor sit amet,
consectetur adipiscing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Vel elit scelerisque mauris pellentesque.
Est pellentesque elit ullamcorper dignissim.
Elit scelerisque mauris pellentesque pulvinar pellentesque
habitant morbi tristique.
Duis tristique sollicitudin nibh sit amet commodo nulla.

Arcu non odio euismod lacinia at quis.
Enim sed faucibus turpis in.
Posuere ac ut consequat semper viverra.
Odio pellentesque diam volutpat commodo sed egestas egestas.

Porttitor lacus luctus accumsan tortor posuere ac ut.
Bibendum neque egestas congue quisque egestas.
Nisi lacus sed viverra tellus in.
Ullamcorper morbi tincidunt ornare massa eget egestas purus.
Sed elementum tempus egestas sed.
Purus in mollis nunc sed id semper.
Cras sed felis eget velit aliquet sagittis id consectetur.

And I want to make it look like this:

Lorem ipsum dolor sit amet,
consectetur adipiscing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Vel elit scelerisque mauris pellentesque.
Est pellentesque elit ullamcorper dignissim.
Elit scelerisque mauris pellentesque pulvinar pellentesque
habitant morbi tristique.
Duis tristique sollicitudin nibh sit amet commodo nulla.

Arcu non odio euismod lacinia at quis.
Enim sed faucibus turpis in.
Posuere ac ut consequat semper viverra.
Odio pellentesque diam volutpat commodo sed egestas egestas.

Porttitor lacus luctus accumsan tortor posuere ac ut.
Bibendum neque egestas congue quisque egestas.
Nisi lacus sed viverra tellus in.
Ullamcorper morbi tincidunt ornare massa eget egestas purus.
Sed elementum tempus egestas sed.
Purus in mollis nunc sed id semper.
Cras sed felis eget velit aliquet sagittis id
consectetur.

The text isn't consistently formatted in any other way other than the
leading indent, if any, which is a tab (although I have changed it to
space here because gmail).

What I would like to be able to do is one of two things:

A) Ideally:

Select whole document and run "some command(s)" which will:

1. Leave any lines which are "flush left" on the left margin where they are
2. Leave the first indented line indented one tab
3. For each additional line, indent by one additional tab
4. Each "paragraph" or "block" will have a blank line between each
one, and a new paragraph will always start with the line that is not
indented at all.


B) If ideally isn't possible

Select a PORTION of text (some number of lines, at least 4 lines), and
run "some command(s)" which will increase the indent by one tab for
each line of the selected portion of text

For example, if there are 2 lines, I wouldn't bother selecting that
and running the command, because nothing needs to be done

If there are exactly 3 lines, I'll just manually indent the 3rd line.

If there are more than 3 lines, then I would select "line 3 and all
following lines" up to (but not including) the blank line, and each
line should be indented progressively more and more.

I hope what I am trying to describe is clear. Even more, I hope it is
possible, but if it is, I have no idea how.

Any ideas would be most welcome.

Thanks!

Tj

-- 
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/CADjGqHsMYxOJ%2BBUqptXRY%2Bb4Chyb0%3DtFaNPmSkb62-Kj%3D66aTQ%40mail.gmail.com.


WriteChangesWhenSentToBackground

2020-06-11 Thread TJ Luoma
I just wanted to make sure that no one else had missed what I think is one
of the most useful¹ new features in BBEdit

(¹ by which I mean a feature that has the potential to be used most often
by the most number of people)

Quoting https://www.barebones.com/support/bbedit/notes-13.1.html:

If you want text documents with unsaved changes to automatically save when
switching BBEdit to the background, you can now do this with an expert
preference:

defaults write com.barebones.bbedit WriteChangesWhenSentToBackground -bool
YES

There are some more details in the release notes, which are worth reading
if you are curious about this feature, but I've found this to be super
useful and super fast, not to mention that it's one of these features that
I wish every app would offer, because saving is the best way to avoid
losing work if something bad happens.


For the past few years I've done something very similar using Keyboard
Maestro and AppleScript, but obviously something built-in is better for
several reasons, and I'll keep using it for a few Macs I have that are
running versions of macOS which are too old for BBEdit v13:

-- With thanks to Christopher Stone and Rich Siegel
-- Source: https://groups.google.com/d/topic/bbedit/dfT5wJY5wSI/discussion

if application "BBEdit" is running then
 try
  tell application "BBEdit"
   set docList to (text documents whose on disk is true and
modified is true)
   repeat with theDoc in docList
save theDoc
   end repeat
  end tell
 end try
end if

-- end of AppleScript


Anyway, I only happened to see this because I'm a nerd about reading
Release Notes, but even I have missed things in the Release Notes in the
past, so I figured it might be worth highlighting this.

~ TjL

-- 
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: 
--- 
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/CADjGqHv-xGNokg%2BPRRi3Q_JKo-F1Ptv_ot4vU1SLuxF60xusWA%40mail.gmail.com.


Re: The $PATH in BBEdit

2020-06-02 Thread TJ Luoma
On Tue, Jun 2, 2020 at 4:54 PM Rich Siegel  wrote:

On 6/2/20 at 4:19 PM, luo...@gmail.com (TJ Luoma) wrote:
>
> >1. Where is BBEdit getting its $PATH definition from?
>
> Your Unix login environment (e.g. ~/.bash_profile or equivalent
> for zsh or whatever shell it is you're using). So, $PATH should
> be the same in BBEdit as it is in Terminal.
>


1. That is obviously the smartest way to do it, and so I should have
assumed that would be the way that BBEdit would do it.

2. For those new to zsh, make sure that your $PATH is set in ~/.zshenv

3. FWIW, I have used this at the top of my scripts for a long time:

if [[ -e "$HOME/.path" ]]
then
 source "$HOME/.path"
else
 PATH=/usr/local/scripts:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
fi

That way I can define a PATH in a file un-creatively named ~/.path and have
it automatically apply to all of my scripts (which makes it easy to
update/change), but if (for some reason) that file is not there, it will
use my most commonly desired PATH.

TJ

-- 
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/CADjGqHvc54yGKvSYk%3DqBffLHnkF%2ByWPZNAaCBwpFXpU06Db3dw%40mail.gmail.com.


The $PATH in BBEdit

2020-06-02 Thread TJ Luoma
Quoting the "BBEdit 13.1 Release Notes" from
https://www.barebones.com/support/bbedit/notes-13.1.html

> BBEdit has built-in support for cmark as well as "classic" Markdown
(Gruber's original Markdown.pl script). In addition, if you have Discount,
MultiMarkdown, cmark-gfm, or Pandoc installed, BBEdit can use those as
well. If a particular tool is not installed, its corresponding option on
the menu is disabled.
>
> Finally, the "Custom" option provides the means to specify your own
rendering command and arguments. There are some rules that you must follow:
>
> The command name must be available in $PATH. You can specify a fully
qualified path, but this is discouraged.
>

1. Where is BBEdit getting its $PATH definition from?

2. Can it be edited?

The reason that I ask is that for the past several years, macOS has had no
good way to define the $PATH for GUI applications, and most do not even
include /usr/local/bin/.

Since BBEdit can put a tool into /usr/local/bin/ then I assume it also
includes /usr/local/bin/ in its $PATH but I also put scripts that I have
written into /usr/local/scripts/ however there is no easy way to tell most
GUI apps of that path except using a fully qualified path, so I'm wondering
what I should do in BBEdit's case.

Obviously this would be easily fixable if Apple would create a way to
define a $PATH for GUI apps, but since it took away the previous one and
hasn't come up with an alternative for many years, I'm not holding my
breath.

TJ

-- 
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/CADjGqHv2Vj0zr_jYrs%2BaL4p7pKRQcsvS2EdBHMhQBmpK3U52hQ%40mail.gmail.com.


Re: Removing text from parenthesis on

2020-06-01 Thread TJ Luoma
On Mon, Jun 1, 2020 at 10:32 AM 'anotherhoward' via BBEdit Talk <
bbedit@googlegroups.com> wrote:

> What if I wanted to extract all the text up to, but not including, the
> left parenthesis?
>

search for

\(.*

and replace it with nothing.

You may want to add a space before it if you want to exclude the space





>
> On Monday, June 1, 2020 at 9:49:58 AM UTC-4, Jean-Christophe Helary wrote:
>>
>>
>>
>> > On Jun 1, 2020, at 21:31, Howard  wrote:
>> >
>> > Here is an input sample:
>> >
>> > Arizona (5)
>> > Minnesota (4)
>> > Cleveland (2)
>> > San Diego (4)
>> >
>> > Using Grep, I want to remove all the text in each item from the left
>> parenthesis on. How can I do that?
>>
>> including the left parenthesis:
>> search for \(.+$
>> replace with nothing
>>
>> excluding the left parenthesis:
>> search for (?<=\().+$
>> replace with nothing
>>
>> The "exclusion" uses a "lookbehind" match as in "look behind this to see
>> if the rest matches, but only act on the rest". So here, it says "look
>> behind a left parenthesis see if you find anything"
>>
>>
>> --
>> Jean-Christophe Helary @brandelune
>> http://mac4translators.blogspot.com
>>
>> --
> 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/bbca3dfb-ac5e-4c35-b0d5-9c693153bfe8%40googlegroups.com
> 
> .
>

-- 
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: 
--- 
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/CADjGqHs5FPMgL%2BTtWm3pgck1_OXG5T60XpQkNqtjBeH3mU1D_A%40mail.gmail.com.


Re: Can I make the tab stops more noticeable?

2020-05-14 Thread TJ Luoma
On Wed, May 13, 2020 at 10:06 PM Christopher Waterman
 wrote:

> I believe the guide contrast slider effects the contrast of the tab stops as 
> well.

Oh! You are correct! Thank you. I should have tried that.

Tj

-- 
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/CADjGqHsYt4Fi-U-ED0n_jS2X1ZTpHmpcwfnn6Z0D1E5avQUrfg%40mail.gmail.com.


Can I make the tab stops more noticeable?

2020-05-13 Thread TJ Luoma
In my daily quest to get older and have my vision get gradually worse,
I've noticed that it's getting harder to notice the "Tab Stops" in
BBEdit documents

This is the setting that I am referring to:

https://i.luo.ma/ss/bbedit-preferences-appearance-tab-stops-2020-05-13.png

I don't always have it on, but when I do, it's pretty faint.

Is that something that can be customized somehow?

Thanks

Tj

-- 
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/CADjGqHu5AV6Tm6wt28SZjB2kgmWUtgmScpZpFnFEe%2BvE%3DMxeeg%40mail.gmail.com.


Re: Shortcut to preview in a specific browser?

2020-04-29 Thread TJ Luoma
I don't know a way to assign a keyboard shortcut to a browser
directly, but that's OK because the preview menu items include the
version number, which change frequently.

But you can create a script to do it, and script can have a keyboard
shortcut, and the script will keep working even when the version
number changes.

#!/bin/zsh -f

/usr/bin/open -a "Marked 2" "$BB_DOC_PATH"

exit 0

Note if you use Marked via 'Setapp' it is referred to as 'Marked' not 'Marked 2'

If you want to use a different app / browser, change 'Marked 2' to the
name of the app / browser.




On Wed, Apr 29, 2020 at 1:20 AM Jan Erik Moström  wrote:
>
> Is it possible to set a shortcut to a specific browser (for preview)? I
> can't find anything about it in the manual (and I wonder if this is the
> reason why I have this old AppleScript that I use to preview in Marked
> :D )
>
> = jem
>
> --
> 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: 
> 
> ---
> 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/FE641933-0E9B-4F50-8EED-08618E168CD7%40mostrom.pp.se.

-- 
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: 
--- 
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/CADjGqHvLjvJR0BKT%3DA9%3DnRQMJ6HvoC7PpCGbkjNR_iUB0xRCmQ%40mail.gmail.com.


Re: Live Match Highlighting

2020-04-07 Thread TJ Luoma
I think what you want is

Preferences > Editing > Live Search results

Uncheck that and try again.

-- 
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: 
--- 
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/CADjGqHtL%2BR%3DM9TUDXZmoxDQzhQmOi9897asVmKxwwkpKBP0HrA%40mail.gmail.com.


Re: How to automate Zap Gremlins

2020-03-04 Thread TJ Luoma
On Wed, Mar 4, 2020 at 5:36 PM ‘Chad Baker’ via BBEdit Talk
 wrote:

> The file opens fine without the ¿ gremlins in BBEdit without any intervention 
> on my part. And I
> can search it fine in BBEdit. What Console does differently , that I like, is 
> that when I search
> it will filter the file so that it only shows log lines that have a matching 
> word, and hides the
> rest. So when I search “error” it will hide 10,000 lines of irrelevant log 
> content and just show
> me the 5 lines of errors. If BBEdit has a mode where it can hide lines that 
> don’t contain a match,
> then that would work too. I could dump Console and just use BBE for my log 
> analysis tool

I don’t know if BBEdit has such a mode, but there’s always `grep`
which will just show matching lines.

 fgrep -i error input.log

You could used that on the command line or as a text filter in BBEdit,
I suppose.

> If I follow your suggestion and use Reopen Using Encoding Unicode (UTF-16, No 
> BOM) it looks fine in
> BBEdit, but it doesn’t actually change the file so Console will search it 
> correctly. For that, I
> still have to do the steps I mentioned and actually do a destructive edit 
> that removes the ¿’s
> then Save.

Well, at the risk of getting banned from the list ;-)
I’m going to offer another non-BBEdit solution.

I don't have a UTF-16 file handy to test, but it should work something
like this:

 iconv --from-code=UTF-16 --to-code=UTF-16LE input.log > input-16LE.log

That will save the log to a new file which can be opened in BBEdit or elsewhere.

(There’s also the `-c` option, which means “When this option is given,
characters that cannot be converted are silently discarded, instead of
leading to a conversion error.”)

If you want to combine those two commands, you could try this:

 iconv --from-code=UTF-16 --to-code=UTF-16LE input.log | fgrep -i error

That convert the file and pipe the resulting text to `fgrep` which
will then filter out everything except the lines which contain the
word 'error'

Tj

-- 
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/CADjGqHsFf%2BzLSLuQxaxxn5Y2AjeHiNM9Qj9ECwbRads3X2W3KA%40mail.gmail.com.


Can I _find_ "gremlins" instead of "zap"ping them?

2020-02-22 Thread TJ Luoma
I often use "zap gremlins" (one of my favorite features of BBEdit) but
sometimes I'd rather _locate_ them instead of zapping them so I can
manually change them.

Is that possible? If so, how?

-- 
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: 
--- 
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/CADjGqHuycUTuGcyiVHoHnPGiX2RwFPGKLespqy%2BgyN5-14Reag%40mail.gmail.com.


Updated BBEdit Installation script for Mac OS X 10.6.8 (Snow Leopard) to macOS 10.15 (Catalina)

2019-10-15 Thread TJ Luoma
If you need to install/update BBEdit on a variety of Macs running a
variety of versions of macOS, you might like

https://github.com/tjluoma/di/blob/master/di-bbedit.sh

I've recently re-written the script to be a lot more efficient. It
supports BBEdit version 13, but also will automatically install the
proper version of BBEdit for any version of Mac OS X going back to
10.6.8.

When downloading the latest version of BBEdit 13, it will also
download the latest release notes too, so you can keep on-top of
what's new in the world of BBEdit.

If you have any questions, please feel free to contact me off-list.
I'm happy to help if I can.

TjL

-- 
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 to the group.
Follow @bbedit on Twitter: 
--- 
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/CADjGqHs8aCBK2Cc-5Y14B6h4F5ejxJmBKxmy6uA5w-7WxgckZQ%40mail.gmail.com.


Re: Remove license to downgrade to free version

2019-05-22 Thread TJ Luoma
That `sort -i` should be `sort -f`

(I always forget that `-i` is "--ignore-nonprinting" not "--ignore-case")

I made a gist of this which includes a with a line-by-line
explanation, for people who don't speak $SHELL

https://gist.github.com/tjluoma/93c625cf860a0153019014920a0fa8d3

Tj

--
TJ Luoma
TJ @ MacStories
Personal Website: luo.ma (aka RhymesWithDiploma.com)
Twitter: @tjluoma

On Wed, May 22, 2019 at 8:30 AM TJ Luoma  wrote:
>
> I logged in as a different user on my Mac and BBEdit presented itself
> as "unregistered" so your best bet is probably to create a new
> _administrator_ account, then log in as that user and delete your user
> account (which I would recommend anyway).
>
> That should take are of "downgrading" most applications — except Mac
> App Store apps, which you should probably just delete. You can find
> them by running this command in Terminal:
>
> find /Applications -iname _MASReceipt -type d -maxdepth 3 -print \
> | sed 's#/Contents/_MASReceipt##g' \
> | sort -i \
> | bbedit --scratchpad
>
> (see how I made that BBEdit-related at the end there? ;-)
>
> Tj
>
>
> --
> TJ Luoma
> TJ @ MacStories
> Personal Website: luo.ma (aka RhymesWithDiploma.com)
> Twitter: @tjluoma
>
> On Wed, May 22, 2019 at 8:03 AM Ian Mason  wrote:
> >
> > Hi
> >
> > I'm handing over my Mac to someone else and I have my licensed copy of 
> > BBEdit 12 on it - downloaded, not AppStore version. The user I'm giving the 
> > computer to wants to carry on using the free version of BBEdit as a text 
> > editor, but I don't want to hand over my license to them - how do I 
> > 'downgrade' and 'unlicense' my installation of BBEdit on this machine?
> >
> > Ian
> >
> > --
> > 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 to the group.
> > Follow @bbedit on Twitter: <https://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.
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/bbedit/1b3ea33a-b443-4878-b060-870f3e3f3c80%40googlegroups.com.

-- 
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 to the group.
Follow @bbedit on Twitter: <https://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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/CADjGqHt7B7-5yOe1BgAwSBMWcjr3k-0koT7fqV4K5uwKw6MR5g%40mail.gmail.com.


Re: Remove license to downgrade to free version

2019-05-22 Thread TJ Luoma
I logged in as a different user on my Mac and BBEdit presented itself
as "unregistered" so your best bet is probably to create a new
_administrator_ account, then log in as that user and delete your user
account (which I would recommend anyway).

That should take are of "downgrading" most applications — except Mac
App Store apps, which you should probably just delete. You can find
them by running this command in Terminal:

find /Applications -iname _MASReceipt -type d -maxdepth 3 -print \
| sed 's#/Contents/_MASReceipt##g' \
| sort -i \
| bbedit --scratchpad

(see how I made that BBEdit-related at the end there? ;-)

Tj


--
TJ Luoma
TJ @ MacStories
Personal Website: luo.ma (aka RhymesWithDiploma.com)
Twitter: @tjluoma

On Wed, May 22, 2019 at 8:03 AM Ian Mason  wrote:
>
> Hi
>
> I'm handing over my Mac to someone else and I have my licensed copy of BBEdit 
> 12 on it - downloaded, not AppStore version. The user I'm giving the computer 
> to wants to carry on using the free version of BBEdit as a text editor, but I 
> don't want to hand over my license to them - how do I 'downgrade' and 
> 'unlicense' my installation of BBEdit on this machine?
>
> Ian
>
> --
> 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 to the group.
> Follow @bbedit on Twitter: <https://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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/bbedit/1b3ea33a-b443-4878-b060-870f3e3f3c80%40googlegroups.com.

-- 
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 to the group.
Follow @bbedit on Twitter: <https://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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/CADjGqHvydAekV4WJ4roJYk_CBFMH7Zo0VopBWUq5SW%2BL3M-Tbg%40mail.gmail.com.


Re: Assigning F-key shortcuts - Mac

2019-03-04 Thread TJ Luoma
Also note that, by default, you may need to hold down the “fn” key for the
function keys to work like function keys.

This can be changed in System Preferences > Keyboards.


-- 

--
TJ Luoma
TJ @ MacStories <http://www.macstories.net/author/tjluoma/>
Personal Website: luo.ma <http://luo.ma/> (aka RhymesWithDiploma.com
<http://rhymeswithdiploma.com/>)
Twitter: @tjluoma <http://twitter.com/tjluoma>

-- 
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 to the group.
Follow @bbedit on Twitter: <https://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.


Automatically switch between color schemes?

2019-02-14 Thread TJ Luoma
I just upgrade to Mojave, and I'm still not sure that I like it, but I
definitely don't like having BBEdit show up light when dark mode is
on, and vice versa.

I'm _not_ talking about the "Match application appearance to selected
editor color scheme" setting.

I'd like to be able to have BBEdit use "BBEdit Classic" when the
system is set to light mode, and "BBEdit Dark" when the system is in
dark mode.

I tried googling and didn't find anything, but I'm absolutely sure
that someone out there has figured this out.

So… what's the trick?

TIA

TjL

--
TJ Luoma
TJ @ MacStories
Personal Website: luo.ma (aka RhymesWithDiploma.com)
Twitter: @tjluoma

-- 
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 to the group.
Follow @bbedit on Twitter: <https://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.


Re: Old BBEdit versions?

2019-02-07 Thread TJ Luoma
On Thu, Feb 7, 2019 at 5:54 AM @lbutlr  wrote:

> How would I go about fixing “Open With” Showing old versions of BBEdit
> that are not installed?
>
> There is only one BBEdit application on my computer.
>
> # mdfind -name BBEdit | grep "app$"
> /Applications/BBEdit.app
> #
>
> <
> https://www.dropbox.com/s/rji8c22inr99l38/Screenshot%202019-02-07%2003.40.32.png?dl=0
> >
>


Try this in Terminal:

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister
-kill -r -domain local -domain system -domain user


Source:
http://www.leancrew.com/all-this/2013/02/getting-rid-of-open-with-duplicates/

Was a big problem a few years ago. I’m assuming the old command still
works, which might be a bad assumption.

ISTR that you might get notifications after this suggesting that you are
opening apps for the first time. Unavoidable side effect of rebuilding the
“open with” database, I’m afraid. Unless that has changed, hopefully.

TjL








> --

--
TJ Luoma
TJ @ MacStories <http://www.macstories.net/author/tjluoma/>
Personal Website: luo.ma <http://luo.ma/> (aka RhymesWithDiploma.com
<http://rhymeswithdiploma.com/>)
Twitter: @tjluoma <http://twitter.com/tjluoma>

-- 
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 to the group.
Follow @bbedit on Twitter: <https://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.


Re: How to make BBEdit save changes automatically when closing window?

2019-01-29 Thread TJ Luoma
Do you close windows by pressing ⌘W or by clicking on the title bar button?

If the former, there's probably a way to re-map ⌘W to save-then-close…
if not, you could surely do so with Keyboard Maestro.

If by clicking … I don't think there's a way to avoid the dialog, but
I might be wrong.

Tj


--
TJ Luoma
TJ @ MacStories
Personal Website: luo.ma (aka RhymesWithDiploma.com)
Twitter: @tjluoma

-- 
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 to the group.
Follow @bbedit on Twitter: <https://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.


Re: Dark Mode?

2018-09-28 Thread TJ Luoma
I like "BBEdit Light" a little more than "Classic BBEdit" but I like
them both a lot more than a dark theme.

(I ran the Mojave betas for quite awhile but never took to the dark
theme myself. I also went back to High Sierra because I like my
automation apps and Mojave is the closest thing I've seen to Windows
Vista since Windows Vista.)

Tj

--
TJ Luoma
TJ @ MacStories
Personal Website: luo.ma (aka RhymesWithDiploma.com)
Twitter: @tjluoma

On Fri, Sep 28, 2018 at 10:19 PM Simdude  wrote:
>
> Ok, this isn't a request for support or anything but more of a curiosity. Am 
> I the only person in the world that likes the classic light BBedit mode 
> instead of a Dark Theme?
>
> --
> 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 to the group.
> Follow @bbedit on Twitter: <https://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.

-- 
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 to the group.
Follow @bbedit on Twitter: <https://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.


Re: AppleScript to Save, but only if file has been saved before (aka is not “untitled text”?

2018-08-23 Thread TJ Luoma
That seems to work perfectly! Thank you!

Because the macro can run after BBEdit has _quit_ (KM can't always tell the
difference, and although I could make a check for "if BBEdit is running" in
Keyboard Maestro, I'd rather do it in AppleScript), I modified it to be
this:

*if* *application* "BBEdit" *is* running *then*

*try*

*tell* *application* "BBEdit"

*set* docList *to* (*documents* *whose* on disk *is* *true* *and* modified
*is* *true*)

*repeat* *with* theDoc *in* docList

*save* theDoc

*end* *repeat*

*end* *tell*

*end* *try*

*end* *if*


I'm not sure why the 'try / end try' was there in my original Keyboard
Maestro macros, but it doesn't seem to hurt, so I've left it here too.


Many thanks!

Tj



--
TJ Luoma
TJ @ MacStories <http://www.macstories.net/author/tjluoma/>
Personal Website: luo.ma <http://luo.ma/> (aka RhymesWithDiploma.com
<http://rhymeswithdiploma.com/>)
Twitter: @tjluoma <http://twitter.com/tjluoma>



On Thu, Aug 23, 2018 at 11:37 AM Christopher Stone <
listmeis...@suddenlink.net> wrote:

> On 08/23/2018, at 10:21, TJ Luoma  wrote:
>
> (I use this with Keyboard Maestro so that when BBEdit “deactivates”, the
> file will be saved. I have since learned that BBEdit has a feature to do
> this itself, but I've been using Keyboard Maestro for a long time, so I
> figured I'd stick with it.)
>
> The problems with this are two-fold:
>
> 1. If the file has not been saved before, BBEdit will (understandably)
> bounce in the dock to tell me to name the file which it is trying to save.
> I would rather not bother trying to save as-yet-unsaved documents when
> BBEdit deactivates.
>
> 2. Perhaps more significantly, this AppleScript only saves the front
> document, and I'd really much prefer that it do an “Save All”… but, again,
> only for files which can be saved without user-intervention.
>
> --
>
> Hey TJ,
>
> Something like this should do the job:
>
> 
> # Auth: Christopher Stone
> # dCre: 2018/08/23 10:35
> # dMod: 2018/08/23 10:35
> # Appl: BBEdit
> # Task: Save modified on-disk documents.
> # Libs: None
> # Osax: None
> # Tags: @Applescript, @Script, @BBEdit, @Save, @Modified, @On-Disk,
> @OnDisk, @Documents
> 
>
> *tell* *application* "BBEdit"
> *set* docList *to* (*documents* *whose* on disk *is* *true* *and*
> modified *is* *true*)
> *repeat* *with* theDoc *in* docList
> *save* theDoc
> *end* *repeat*
> *end* *tell*
>
> 
>
> *NOTE* – this has only had light testing.
>
> --
> 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.
>

-- 
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.


AppleScript to Save, but only if file has been saved before (aka is not “untitled text”?

2018-08-23 Thread TJ Luoma
For a long time I have used this AppleScript that I use with Keyboard
Maestro to automatically save the front-most document:

if application "BBEdit" is running then
try
   tell application "BBEdit"
  tell document 1
save
  end tell
   end tell
end try
end if

(I use this with Keyboard Maestro so that when BBEdit “deactivates”, the
file will be saved. I have since learned that BBEdit has a feature to do
this itself, but I've been using Keyboard Maestro for a long time, so I
figured I'd stick with it.)

The problems with this are two-fold:

1. If the file has not been saved before, BBEdit will (understandably)
bounce in the dock to tell me to name the file which it is trying to save.
I would rather not bother trying to save as-yet-unsaved documents when
BBEdit deactivates.

2. Perhaps more significantly, this AppleScript only saves the front
document, and I'd really much prefer that it do an “Save All”… but, again,
only for files which can be saved without user-intervention.

Despite all my best efforts, I still don't understand AppleScript very well
(and my efforts at Googling have not been productive), but I assume there’s
a way to accomplish #1, but I can’t figure it out. There must be some way
to tell BBEdit to save if the window title doesn’t start with “untitled
text” or something like that.

I assume that #2 is so complicated as to be un-attainable, but I figured
I’d ask, and hope that maybe someone who is great at AppleScript might have
a chance to prove me wrong ;-)

Thanks for any advice you may be able to offer.

Tj

--
TJ Luoma
TJ @ MacStories
Personal Website: luo.ma (aka RhymesWithDiploma.com)
Twitter: @tjluoma

-- 
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.


AppleScript to set the current file to: language = 'Unix Shell Script' ?

2018-08-13 Thread TJ Luoma
Hello Friends

Two questions:

1. How can I tell BBEdit “If you open a file with no file extension, assume
it is a 'Unix Shell Script' file?

2. Is there a way (presumably via AppleScript?) to tell BBEdit “Hey, this
document that you are currently showing, set its language to 'Unix Shell
Script'"?

Any help appreciated!

Thanks!

Tj


--
TJ Luoma
TJ @ MacStories <http://www.macstories.net/author/tjluoma/>
Personal Website: luo.ma <http://luo.ma/> (aka RhymesWithDiploma.com
<http://rhymeswithdiploma.com/>)
Twitter: @tjluoma <http://twitter.com/tjluoma>

-- 
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.


Shell script to make BBEdit the default text editor for 'open -t' and LaunchServices

2018-07-25 Thread TJ Luoma

I was looking for a way to make BBEdit the default text editor for _all_ 
text files. 

More specifically, I wanted to be able to use 'open -t' and have the file 
open in BBEdit.

Just to refresh your memory, quoting from `man open`:

 -t  Causes the file to be opened with the default text editor, as 
determined via LaunchServices

I went searching on the web for this, but 99% of what I saw came down to 
"Select the file in Finder, choose 'Get Info' and tell it to 'Change All' 
of those file extension types to open with BBEdit!' Of course that wasn't 
helpful because I already knew that, but what about files with _no_ 
extension? And what about 'open -t'? 

Finally I came across a StackOverflow answer 
(https://stackoverflow.com/questions/9370584/set-textmate-as-the-default-text-editor-on-mac-os-x)
 
which gave me enough of an answer that I was able to adapt it for BBEdit.

In case anyone else is curious, here is the command that I used:

defaults write com.apple.LaunchServices/com.apple.launchservices.secure 
LSHandlers -array-add \
'{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.barebones.bbedit;}'


After that, I used `open -t ~/.ssh/authorized_keys` and the file opened in 
BBEdit. I didn't even have to logout/login or reboot, as some had suggested.

(This was in the public beta 3 of Mojave, FWIW.)

I hope this might be of use to someone else… or possibly me, in the future, 
when I search the web for the answer to this question and find my own 
answer to it ;-)

Tj


-- 
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.


Need help with AppleScript to rename active document

2018-07-25 Thread TJ Luoma

I was searching for a way to rename the current BBEdit document today when 
I ran across a 14-year-old AppleScript from John Gruber: 


Here's the script for the then-current BBEdit-8

tell application "BBEdit"
activate
set old_name to name of text window 1
set dialog_result to display dialog ¬
"Rename active document:" default answer (old_name) ¬
buttons {"Cancel", "Rename"} default button 2 ¬
with icon note
if button returned of dialog_result = "Rename" then
set new_name to text returned of dialog_result
set d to active document of text window 1
if (d's on disk) then
set the_file to d's file
tell application "Finder"
set name of the_file to new_name
end tell
else -- it's a document that has never been saved
set name of d to new_name
end if
end if
end tell

This _almost_ works for me, but I can't figure out what's wrong, and I 
don't know enough about AppleScript to fix it.

When I tried it, I was prompted with the current filename (but without the 
file's extension, not that I really cared about the file extension in this 
case, but it seems like it should be included in case I _did_ want to 
change it).

However, when I tried to rename the file, I received this error:

Finder got an error: Can’t set name of file 
"SSD:Users:luomat:Dropbox:scripts:pdf-remove-ATLA-last-page.sh" to 
"atla-remove-last-pdf-page.sh".

If I had to guess, I'd say that I need to tell the Finder to use the full 
path (aka 'dirname' in Unix parlance) of 'the_file' for 'new_name'.

But I'm not sure how to do that (neither am I 100% sure that is the 
problem, I'm just guessing from the error message).

Anyone already have this solved, or able to suggest a solution?

Bonus points if you can change the extension too, but if I can rename the 
current file with the current file extension I will still be better off 
than I am right now!

Thanks!

TjL


-- 
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: 
--- 
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.


Re: html2txt.py as a text filter

2016-04-18 Thread TJ Luoma
If I want to _replace_ the contents of the current file, NOT create a
separate document, I thought this would be what I needed to do as a Text
Filter

/Users/luomat/Library/Application Support/BBEdit/Text Filters/html2text

is

/#!/bin/zsh -f
#
#
# From: Timothy J. Luoma
# Mail: luomat at gmail dot com
# Date: Mon, Apr 18, 2016 12:23

NAME="$0:t:r"

if [ -e "$HOME/.path" ]
then
source "$HOME/.path"
else
PATH=/usr/local/scripts:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
fi

/usr/local/bin/html2text "$BB_DOC_PATH"



exit 0
#
#EOF


But it does nothing.






--
TJ Luoma
TJ @ MacStories <http://www.macstories.net/author/tjluoma/>
Personal Website: luo.ma <http://luo.ma/> (aka RhymesWithDiploma.com
<http://rhymeswithdiploma.com/>)
Twitter: @tjluoma <http://twitter.com/tjluoma>


On Mon, Apr 18, 2016 at 11:35 AM, Brian Christiansen <bria...@gmail.com>
wrote:

> Patrick,
>
> Thanks for the reply, I appreciate your suggestions. Unfortunately,
> neither of those options are within my current skill set, nor do I have
> time to level them up; I am no scripter. I am a little surprised no one
> else in our community was using this script, as I thought it was fairly
> popular amongst the Markdown crowd, especially since it doesn't need
> anything setup on your Mac to run, except for having Python installed, as
> OS X has by default. You just drop the .py into the Text Filters folder,
> and the magic happens. Maybe my reply will bump this thread so someone
> familiar with this can offer how they've worked around it. If
> not, ¯\_(ツ)_/¯ and thanks for all the fish.
>
> Best,
> ~brian
>
>
>
> On Monday, April 11, 2016 at 5:10:11 PM UTC-4, Patrick Woolsey wrote:
>
>> Though I haven't used this particular tool before, I would like
>> to offer the following general observation:
>>
>> Please keep in mind that a text filter does not _have_ to be a
>> single executable file -- you can also symlink a binary, or use
>> an AppleScript, shell, or Unix code (Perl/Python/Ruby/etc)
>> `wrapper` to invoke _any_ desired executable -- and the only
>> hard requirement is that a text filter must accept input and
>> provide output as documented in the manual:
>>
>> [from "Text Filters" on pg. 35]
>>
>> When you apply such an item, BBEdit will pass either the
>> selected text
>> (if any) or the contents of the entire document on STDIN to Unix
>> executables and filters, as a reference to a 'RunFromBBEdit'
>> entry point
>> in AppleScripts, as text input to Automator workflows, and
>> as a source
>> to text factories. (An AppleScript script intended for use
>> as a text
>> filter must have a 'RunFromBBEdit' handler.)
>>
>> AppleScript scripts and Automator workflows should return a
>> string which
>> BBEdit will use to replace the selection range, Unix filters should
>> write to STDOUT, and the text emitted by a text factory will
>> replace the
>> selection range.
>>
>> So, you should be able to just install the latest 'html2.txt.py'
>> as its directions indicate, and then create a suitable wrapper
>> to employ this tool as a text filter.
>>
>>
>> As an alternate approach, you could create a 'Scripts' menu
>> script to target the current (unedited) document's file via the
>> BB_DOC_PATH environment variable, then convert its contents and
>> e.g. automatically create a Markdown 'counterpart' file.
>>
>>
>> In closing, I hope this helps explain the options BBEdit offers
>> you (and anyone else inclined :) at least well enough to give
>> them a try. :-)
>>
>>
>> Regards,
>>
>>   Patrick Woolsey
>> ==
>> Bare Bones Software, Inc. <http://www.barebones.com/>
>>
>>
>>
>> On 4/11/16 at 3:00 PM, bri...@gmail.com (Brian Christiansen) wrote:
>>
>> >For years, I used Aaron Swartz's (RIP) html2.txt.py to convert
>> >HTML docs to -- wait for it -- text. When working, it did a
>> >wonderful job leaving you with clean Markdown-formatted output,
>> >even if supplied with Google Docs' excuse for HTML export as
>> >its input.
>> >
>> ><https://github.com/html2text/html2text.py>
>> >
>> >At some point, this stopped functioning as a text filter. I'm
>> >not sure if it was a change to BBEdit or to OS X. It was
>> >probably a while ago because I tried it, it failed with an
>> >error, and I left it. Now, I have something it may be useful
>> >for, but the forks of the python script *appear* to have
>

Re: BBEdit's settings/preferences on Dropbox / iCloud

2016-01-05 Thread TJ Luoma
Dropbox, for the simple reason that you have a web-based interface that
you can use to retrieve any files which were deleted _and_ previous
versions of files going back 30 days.

I know that iCloud now has some mechanism for retrieving deleted files via
icloud.com but Dropbox's is much more feature-rich and intuitive to me.

I also prefer the fact that it is much easier to see when Dropbox is
working to sync files via the menu bar icon, rather than iCloud, which
continues to try to hide everything behind a shroud of “Trust us, it just
works!”

TjL

p.s. - also note that the “Keep Historical Backups” feature in BBEdit can
use the sync folder as well.

p.p.s. - [Off-Topic]  if you want to sync _other_ files or folders but
don't want to use Dropbox/iCloud or can't (due to space limitations),
checkout BitTorrent Sync. It will allow you to sync _any_ folder, without
having to move it. So you could sync your ~/Documents or ~/Movies/ or
~/Pictures/ folders, for example. The only thing to be careful of is apps
that store database files (i..e Photos, iTunes) which may not sync well. I
get around that by moving them out of the default folders (for example my
iTunes library goes in ~/iTunes not ~/Music/). See
http://forum.bittorrent.com and http://www.getsync.com for more, or feel
free to contact me off-list.





--
TJ Luoma
TJ @ MacStories <http://www.macstories.net/author/tjluoma/>
Personal Website: luo.ma <http://luo.ma/> (aka RhymesWithDiploma.com
<http://rhymeswithdiploma.com/>)
Twitter: @tjluoma <http://twitter.com/tjluoma>


On Tue, Jan 5, 2016 at 1:46 AM, Vlad Ghitulescu <v...@ghitulescu.de> wrote:

> Hello and a happy new year to you all!
>
>
> 2016 begun with a new challenge for me: all of a sudden my iMac got a
> kernel panic!
> I have TimeMachine, two local backups (one of it only 2 hours before the
> crash) and even 21 days of AppleCare left :-) so everything is as good as
> it can be :-/ … but right now I'm typing this email on my iPhone and
> planning a better world: a world with **two** Macs! ;-)
>
> A recent question in BBEdit-Talk reminded me that it is possible to
> configure BBEdit to have all the setting/preference-files on Dropbox /
> iCloud.
> Is this correct?
>
> And if so: what would you recommend, Dropbox or iCloud?
>
> Any comments / advices are highly appreciated - I'm still recovering from
> the kernel disaster! :-(
>
> Thanks!
>
>
> Regards,
> Vlad
>
> --
> 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.
>

-- 
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.


Re: The Application Support files on Dropbox

2015-12-16 Thread TJ Luoma
On Wed, Dec 16, 2015 at 5:22 AM, Jan Erik Moström <li...@mostrom.pp.se>
wrote:

Since I'm having a low workload today (thank you universe) I'm doing a bit
> of cleanup and restructuring of my computers - one thing being to clean up
> my "dropbox mess".
>
> My question is simply: is it possible to have the "Application
> Support/BBEdit" directory in a subfolder somewhere? (I keep other
> applications data files in a shared folder buried deep in some subfolder)
>

It is not… (unless you mean iCloud, but that seems far outside the scope of
your question)

However, if you are just looking to reduce visual clutter, you could also
tell the Finder not to __show__ the folder in Dropbox

SetFile -a V "$HOME/Dropbox/Application Support/BBEdit"

This will tell the Finder not to show the file (SetFile -a V = "set
visiiblity to no") but will allow BBEdit to know that it is there.

If you need to access that folder for some reason, you can always use the
Finder’s “Go » Go To Folder” menu and put in "~/Dropbox/Application Support"

I use this a lot for folders I can't move but don't need to see and/or
access often.

TjL


--
TJ Luoma
TJ @ MacStories <http://www.macstories.net/author/tjluoma/>
Personal Website: luo.ma <http://luo.ma/> (aka RhymesWithDiploma.com
<http://rhymeswithdiploma.com/>)
Twitter: @tjluoma <http://twitter.com/tjluoma>

-- 
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.


Re: The Application Support files on Dropbox

2015-12-16 Thread TJ Luoma
On Wed, Dec 16, 2015 at 9:28 AM, Jan Erik Moström <li...@mostrom.pp.se>
wrote:

> Thanks, I knew that someone would have come up with a solution :D
>

For the sake of completeness I should have added that if you ever want to
_undo_ that action, the command is

SetFile -a v "$HOME/Dropbox/Application Support/BBEdit"

The two commands differ only in the _case_ of the 'v/V':

SetFile -a v = show

SetFile -a V = hide


--
TJ Luoma
TJ @ MacStories <http://www.macstories.net/author/tjluoma/>
Personal Website: luo.ma <http://luo.ma/> (aka RhymesWithDiploma.com
<http://rhymeswithdiploma.com/>)
Twitter: @tjluoma <http://twitter.com/tjluoma>

-- 
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.


Re: [ANN] BBEdit 11.5 (3819) pre-release

2015-12-07 Thread TJ Luoma
Am I correct in saying that once I start using a pre-release version of
BBEdit, the only way to tell if new builds have been released is to check
this email list ?

The “Check for Updates” does not seem to fine newer versions of
“beta” BBEdit builds.

TjL

-- 
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: 

--- 
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.


Re: Strip Trailing Whitespace via TextFilter, not Preference

2015-11-12 Thread TJ Luoma


On Thursday, November 12, 2015 at 11:26:33 AM UTC-5, Christopher Stone 
wrote:
>
> PATH=/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
>
>
> Not necessary for normal usr commands.
>

I know it shouldn't be, but I've gotten bitten by that in the past with 
some apps (Hazel and Keyboard Maestro) which don't always seem to get the 
$PATH I want, so I just got in the habit of declaring it. Actually I use 
this:

if [ -e "$HOME/.path" ]
then
source "$HOME/.path"
else
PATH=/usr/local/scripts:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
fi







> #!/bin/zsh
>
> read -r -d '' bbeditScript <<'EOF'
> tell application "BBEdit"
> tell front document
> if on disk = true then
> tell it to save
> end if
> end tell
> end tell
> EOF
>
> sed -E 's![[:blank:]]+$!!';
> osascript -e "$bbeditScript" &|
>
>
That worked great, and the `sed` command is much more compact.

 

> The only downside seems to be that the cursor/insertion point moves when 
> it runs. I don't know how to avoid that. IF anyone else does, or has a 
> better way of doing this, please let me know.
>
>
> Look at the environment variables on p. 318 of the BBEdit user manual.
>
> You can discover a number of things about the selection and restore it 
> using the same AppleScript you save the document with.
>

Thanks. I never really learned AppleScript beyond the “Go check Google” 
stage. Will check out the manual though…
 

>
> Or you can go pure AppleScript which will not affect the selection.
>
> *tell* *application* "BBEdit"
>   *tell* *front* *text document*
> *tell* *its* *text* *to* *replace* "[[:blank:]]+$" using "" options 
> {search 
> mode:*grep*, starting at top:*true*}
> *if* *its* on disk = *true* *then* *save* *it*
>   *end* *tell*
> *end* *tell*
>
>
>
Whenever I used that, the trailing spaces were removed, but the document 
ended up unsaved… and empty. Not sure why.


-- 
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: 

--- 
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.


Re: Strip Trailing Whitespace via TextFilter, not Preference

2015-11-12 Thread TJ Luoma


On Thursday, November 12, 2015 at 12:40:56 PM UTC-5, Christopher Stone 
wrote:
>
>
> You ran the script from where?  Oh – if you ran it via osascript from a 
> text filter then of course it didn't work.
>
> It should be saved as a compiled AppleScript using the Script Editor.app 
> and run from BBEdit's Script menu.
>

Well…that would be why it didn't work. (I'll refer back to my previous 
comments about not being very familiar with AppleScript) 

Thanks, I'll give that a try.


-- 
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: 

--- 
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.


Re: Two side-by-side documents in full-screen mode?

2015-10-28 Thread TJ Luoma

Tile Across doesn't fill the screen. It leaves room for the Dock, even if 
the Dock is hidden. And it doesn't use OS X’s full-screen mode (yes, I know 
I can hide the menu bar, but that's not what I want).

It appears the answer to my question is 'no' - at least for now.

TjL




On Wednesday, October 28, 2015 at 6:01:30 AM UTC-4, jgill wrote:
>
> Window menu > Arrange > Tile across
>
> You can now set the menu bar to automatically hide itself in System 
> Preferences > General.
>
> On Wednesday, October 28, 2015 at 12:15:34 AM UTC, TJ Luoma wrote:
>>
>>
>> Is there a way to see two BBEdit documents side-by-side in full-screen 
>> mode in El Capitan?
>>
>> I'm using a 12" retina MacBook so screen space is at a premium, but I'd 
>> like to try a way, if there is a way.
>>
>> TjL
>>
>>
>>

-- 
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.


Two side-by-side documents in full-screen mode?

2015-10-27 Thread TJ Luoma

Is there a way to see two BBEdit documents side-by-side in full-screen mode 
in El Capitan?

I'm using a 12" retina MacBook so screen space is at a premium, but I'd 
like to try a way, if there is a way.

TjL


-- 
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: 

--- 
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.


Re: Need help with AppleScript that converts a selected string of words to "Title Case"

2015-10-21 Thread TJ Luoma


I have noticed this with most “titlecase” programs that I have 
tried. My solution has been to first make everything lowercase and then 
apply the titlecase, which seems to work more reliably.


YMMV.

TjL


On 21 Oct 2015, at 2:23, Michelle wrote:


Hello, Fletcher,

Thanks!  It's a big improvement over my original.  However, it's still 
not

quite 100% there.  Couple things:

1.  I need it to change "THE" and "The" to "the" (and the same for all 
of

the other words that I listed).  Currently, it leaves lower-case "the"
uncapitalized, which is good, but it completely ignores "THE" and 
"The."


2.  If one of the listed words happens to be the first or last word of 
a

string, it should be capitalized.

Thanks again!  I hope that many others can benefit from this, too.

Michelle



On Tuesday, October 20, 2015 at 10:21:33 PM UTC-7, flet...@cumuli.com 
wrote:


I found a regular expression online and adapted it for BBEdit. If you
replace the else conditional of your script with this it seems to 
work.


tell application "BBEdit"
tell window 1
 if (selection as text) is "" then
   set cursorPoint to characterOffset of selection
   find "\\b\\w" options {search mode:grep, backwards:true} with
selecting match
   set selection to (grep substitution of "\\U&")
   select insertion point before character cursorPoint
 else
   replace
"\\b(a)(?!(nd?|s|t)?\\b)|\\b(b)(?!(ut|y)?\\b)|\\b(f)(?!(or|rom)?\\b)|\\b(i)\\b|\\b(i)(?!(n|nto|t)?\\b)|\\b(n)(?!(or)?\\b)|\\b(o)(?!(f|n|nto|r)?\\b)|\\b(s)(?!(o)?\\b)|\\b(t)(?!(he|o)?\\b)|\\b(w)(?!(ith)?\\b)|\\b([^abfinostw])(?!\\b)"
using "\\u\\0" options {search mode:grep} searching in selection
 end if
end tell
end tell

The find pattern is kind of a bear, but it breaks down to selecting 
the
first letter of a word which is not equal to one of the items in your 
list.
You can use this directly in BBEdit and then it's double escaped in 
the
AppleScript above. For example, it selects an "a" which starts a word 
and
is not followed by "n", "nd", "s", or "t", a "b" which starts a word 
and is

not followed by "ut" or "y", etc.

\b(a)(?!(nd?|s|t)?\b)|\b(b)(?!(ut|y)?\b)|\b(f)(?!(or|rom)?\b)|\b(i)\b|\b(i)(?!(n|nto|t)?\b)|\b(n)(?!(or)?\b)|\b(o)(?!(f|n|nto|r)?\b)|\b(s)(?!(o)?\b)|\b(t)(?!(he|o)?\b)|\b(w)(?!(ith)?\b)|\b([^abfinostw])(?!\b)


The replacement pattern is \u\0 which changes the found character to
uppercase.

The regex pattern I adapted can be found here, but it uses a 
different

engine than BBEdit and didn't code quite the same list of words.

http://indesignsecrets.com/grep-solution-to-flawed-title-case-feature.php


[fletcher]




--
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: 

---
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.


--
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: 

--- 
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.


Replacing QuickCursor with BBEdit and Keyboard Maestro

2015-08-07 Thread TJ Luoma


Replacing QuickCursor with Keyboard Maestro
http://www.macstories.net/mac/replacing-quickcursor-with-keyboard-maestro/

This is an update to an article that I wrote about two years ago, and I 
thought it might be of interest to some folks on the list.


Aside: for reasons I do not understand, when I use the `--resume` option 
to the `bbedit` tool from inside a Keyboard Maestro macro, it does not 
seem to work, although it used to. However, when I call `bbedit` 
directly from the shell, it works fine. I have no idea how to debug 
this, so I just added the “resume” functionality inside the Keyboard 
Maestro macro.


TjL

--
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.


Re: Auto save when losing focus

2014-12-30 Thread TJ Luoma
I do this in Keyboard Maestro, which runs this AppleScript whenever
BBEdit loses focus

if application BBEdit is running then

try

tell application BBEdit

tell document 1

save

end tell

end tell

end try

end if



This will save the front-most document.


I'm sure there's a way to tell it to save all documents, but I'm not
sure what that is off the top of my head.


Tj



On Tue, Dec 30, 2014 at 9:20 AM, Tom Mai medil...@gmail.com wrote:
 Hi,
 does anybody know how to convince BBEdit to auto save the current
 document(s) when it loses focus?

 --
 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.

-- 
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.


Re: Clipboard manager

2014-12-29 Thread TJ Luoma
Flycut

http://itunes.apple.com/us/app/flycut-clipboard-manager/id442160987?mt=12

On Monday, December 29, 2014, Greg Raven gregra...@gmail.com wrote:

 Well, it seems that OS X 10.10 has killed my favorite clipboard manager --
 PTHPasteboard.

 What's everybody else using?

 --
 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
 javascript:_e(%7B%7D,'cvml','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
 javascript:_e(%7B%7D,'cvml','bbedit%2bunsubscr...@googlegroups.com');.
 To post to this group, send email to bbedit@googlegroups.com
 javascript:_e(%7B%7D,'cvml','bbedit@googlegroups.com');.


-- 
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.


Re: Text factory - transform files in folder A and write to folder B, possibly with new extension?

2014-12-03 Thread TJ Luoma
This seems like a job better suited to Hazel (or launchd) and some
shell scripts, but (as Oliver Taylor mentioned) it really depends on
the kind of transformation(s) you want to make.



On Wed, Dec 3, 2014 at 6:38 AM, Martin Post martinpostber...@gmail.com wrote:

 Is it possible to have a BBedit text factory read and convert e.g. all HTML
 files in an in folder and store the transformed documents (possibly with
 another filename extension such as .xml in a separate out folder? I
 suppose this is automatable, but I have zero AppleScript
 know-how/experience. Maybe a kind soul who has done this before can share a
 script or some tips. Thank you!

 --
 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.

-- 
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.


Text Filter for BBEdit 11 to reformat (pretty print) XML using `tidy`

2014-11-12 Thread TJ Luoma
I have made a Text Filter for BBEdit which uses `tidy` to reformat XML.

It does not attempt to do anything other than clean it up.

You can find it at:

https://github.com/tjluoma/text-filters/raw/master/Tidy-XML.sh

It should also be easy to change any `tidy` argument that you wish to
use differently.

I am by no means a `tidy` expert, I have just found that these
settings work for me. I would welcome suggestions for possible
improvements.

(See https://github.com/tjluoma/text-filters if you need help figuring
out how to install Text Filters for BBEdit)

TjL

-- 
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.


Re: Go Here in Terminal

2014-10-28 Thread TJ Luoma
1) The easiest way to get the Bundle ID is to use Terminal:

 defaults read /Applications/iTerm.app/Contents/Info
CFBundleIdentifier

You can use this for any app, just replace /Applications/iTerm.app
with the path to the app itself, the /Contents/Info part stays the
same in 99% of the cases.

(Technically you only need the  marks if there is a space in the
path, but it won't hurt to use it either way.)


2) If you are using iTerm2, the Bundle ID is

   com.googlecode.iterm2

TjL





On Tue, Oct 28, 2014 at 7:24 AM, François Schiettecatte
fschietteca...@gmail.com wrote:
 Hi

 You have to go to Help - BBEdit Help - Expert Preferences, and search for 
 Terminal:

 • The Run in Terminal and Go Here in Terminal commands will use 
 Apple's Terminal application by default. If you would like to use a 
 different one:

 defaults write com.barebones.bbedit TerminalBundleID -string 
 com.example.TerminalAppBundleID

 (Use the actual terminal's bundle ID in place of 
 com.example.TerminalAppBundleID…)


 Doing a quick google search yielded this to get the bundle ID of an app:

 
 http://stackoverflow.com/questions/8742355/how-to-get-bundle-id-of-your-app-ios-uia-automation

 Following these instructions I get:

 keyCFBundleIdentifier/key
 stringnet.sourceforge.iTerm/string

 Looks like you are all set!

 François


 On Oct 28, 2014, at 3:29 AM, Jan Erik Moström li...@mostrom.pp.se wrote:

 Sigh, I searched the manual but I couldn't find anything ... I promise

 Thanks

 On Tue, Oct 28, 2014 at 5:30 AM, Christopher Stone
 listmeis...@suddenlink.net wrote:
 On Oct 27, 2014, at 03:55, Jan Erik Moström li...@mostrom.pp.se wrote:

 Is it possible to get BBEdit to use some other app than Terminal, like for 
 example iTerm?
 __

 Hey Jan,

 Look in the Expert Prefs.

 --
 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.

 --
 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.

 --
 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.

-- 
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.


Re: Is there any way to integrate BBEdit with Xcode ???

2014-05-29 Thread TJ Luoma
You can use BBEdit anywhere you can edit text on the Mac.

QuickCursor is dead, but you can replicate it with Keyboard Maestro

http://i.tuaw.com/2013/08/30/replicating-quickcursor-using-bbedit-and-keyboard-maestro/

in fact, BBEdit users will have the best success with this, since the
command line `bbedit` tool (which is what I use with Keyboard Maestro)
has this feature:

   --resume (no short variant)
Used in combination with -w or --wait, this switch will cause the 
 application which was frontmost when the bbedit tool was invoked to be made 
 frontmost again once you close the file(s) specified on the command line.


Feel free to get in touch if you need help getting started with this.

Tj




On Tue, May 27, 2014 at 8:32 PM, Steve Samuels sjsamu...@gmail.com wrote:


 On Friday, May 23, 2014 9:37:47 PM UTC-4, Stede Troisi wrote:

 This is sort of like asking if I could legally not pay taxes for the rest
 of my life. I kind of know the answer, but maybe, just maybe there are
 miracles. :-)


 Maybe https://github.com/jessegrosjean/quickcursor   or
 http://www.alfredforum.com/topic/1857-edit-with%E2%80%A6-a-quickcursor-alternative-30/

 --
 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.

-- 
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.


Re: ftp?

2014-04-03 Thread TJ Luoma
As others have mentioned, BBEdit can do (S)FTP itself, so I'm not sure
exactly what you're looking for, but I use Transmit and/or Expandrive.

TjL

On Thu, Apr 3, 2014 at 7:43 AM,  goo...@softwaretimes.com wrote:
 I just upgraded to Mavericks and BBEdit 10.5. I had been using Interarchy
 6.2 (ftp) on my iBook G4. Which ftp client would you guys recommend that
 works well with BBEdit?

 Thanks.

 Denny Schlesinger

 --
 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.

-- 
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.


Re: ftp?

2014-04-03 Thread TJ Luoma
On Thu, Apr 3, 2014 at 1:08 PM, Steve Nicholson li...@steveandmimi.com wrote:

 I'm a big fan of Transmit. The Transmit Disk feature makes an FTP volume 
 show up as a shared drive in Finder.

OOh, I'm glad you mentioned that, as I'd meant to add that when I
suggested Expandrive.

-- 
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.


Autosaving BBEdit (was Re: Digest for bbedit@googlegroups.com - 2 Messages in 1 Topic)

2013-12-23 Thread TJ Luoma


On 23 Dec 2013, at 11:46, David Cortesi wrote:



The auto save is really crash recovery; it's not that the
Save command is periodically invoked, but rather that enough
information is periodically saved that in the event of some
external event, information can be recovered the next time you
start the application.


Interesting. OK, what I need protection from is not a
BBEdit failure but a personal brain fart/user error.

Is there a way to make sure that the file is written to disk
every so many minutes?


I use Keyboard Maestro to do this, not only in BBEdit but in other apps 
which I trust far less (*cough-Microsoft Word-cough*) to recover well 
from crashes.


You can find my Keyboard Maestro macro here, as well as instructions on 
how to use it.


https://github.com/tjluoma/km-bbedit-autosave

TjL

--
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.


Re: Want to paste multiple lines to a single line - Is it possible?

2013-12-14 Thread TJ Luoma
Same info, as downloadable PDF:

http://developer.apple.com/documentation/opensource/Conceptual/ShellScripting/ShellScripting.pdf



On Sat, Dec 14, 2013 at 10:57 AM, Oliver Taylor olivertay...@me.com wrote:
 On Dec 13, 2013, at 6:47 PM, Rick Yentzer ryent...@gmail.com wrote:

 Any recommendations for an intro to shell scripting? I'd like to learn
 more about it.


 Apple has a pretty great document on the subject:

 https://developer.apple.com/library/mac/DOCUMENTATION/OpenSource/Conceptual/ShellScripting/Introduction/Introduction.html

 --
 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.

-- 
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.


Re: Want to paste multiple lines to a single line - Is it possible?

2013-12-10 Thread TJ Luoma
Your question is not very clear to me.

First you say paste them into line 20 and then you say each one
should be its own file. I do not know what would be in lines 1-19.

If what you mean is that you want to take ~/Desktop/RWWEB/page10\
Kaf/index.html and make each line into its own document, yes, you can
do that very easily.

I created a shell script which can do this. You can find it at

https://gist.github.com/tjluoma/7892036

The two most important lines to change are these:

  FILE=$HOME/Desktop/RWWEB/page10 Kaf/index.html

  STARTER_FILE=$HOME/Desktop/RWWEB-Header-File.html

FILE should be the path to the file that has all of the lines that you
want to put into separate files

_IF_ there is a standard file which should be used to start each file
(i.e. lines 1-19) then it must exist at STARTER_FILE


TO USE:

* Download the gist and place it somewhere easy to find like your Desktop

* Rename it to something like eachlinetofile.sh

* Open Terminal.app and change to the directory where you saved the file:

  cd ~/Desktop/

(obviously change ~/Desktop to wherever you saved the file)

* Make  eachlinetofile.sh executable by issuing this command:

 chmod 755 eachlinetofile.sh

* Execute the file in Terminal:

 ./eachlinetofile.sh

I hope that helps, but be sure that you understand what it is doing
before you run it. No guarantee expressed or implied. U se entirely at
your own risk.

TjL

ps - I realize that the answer itself isn't specifically
BBEdit-related, but I wrote this script in BBEdit, so I figure that
counts :-)


On Tue, Dec 10, 2013 at 12:49 AM, James Ada halil...@gmail.com wrote:
 Hi guys heres the question.
 I have a html file where I have thousands of lines of data (screen on the
 right) and I need to paste them into line 20, each time saving them as there
 own file.
 Is there a quick way of doing this???

 --
 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.

-- 
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.


bbwait

2013-09-05 Thread TJ Luoma

`bbwait` is a shell script I wrote to use `bbedit` as your EDITOR and 
VISUAL editor. It is available here:

https://github.com/tjluoma/bbwait

I would be interested in any comments or feedback from folks in this group. 
(Did I explain how it works OK? Did I miss anything? Anything that I 
should have added/removed/etc?)

`bbwait` is especially designed with `visudo` in mind, because I wanted to 
have the security of the syntax checking of `visudo` without actually using 
`vi` because this is 2013 not 1983 and no one should be using `vi` unless 
they lost a bet.

But I digress. Mostly because I hate `vi`.

I even explain how to set this up to that you can use your preferred editor 
when logged in via SSH but use `bbwait` in other situations.

Thanks!

Tj


-- 
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.


Re: how to strip HTLM from word doc on mac?

2013-08-09 Thread TJ Luoma


On 9 Aug 2013, at 13:19, SBD wrote:

I'm looking for a way to strip all codes (I want plain text) from 
things I have copy/pasted into a word doc on my Mac.  I understand 
this can be done by using Notepad on PCs, but I'm not able

to figure this out via my new Mac.  Any suggestions?  Thanks!


There have been plenty of good suggestions made already, but I'll add 
one specific to BBEdit:


1. Download and install this to BBEdit's Text Filters folder:

https://github.com/tjluoma/bbedit/blob/master/Text-Filters/HTML-to-Plain-Text.sh

2. Install lynx (if it isn't already)

http://code.google.com/p/rudix/wiki/lynx

And then you can use BBEdit's Text Filter feature to convert any HTML 
document to plain text.


The advantage of using `lynx` instead of trying to create your own 
solution is that it has been designed to deal with all sorts of 'edge 
cases' of weird and/or badly written HTML.


TjL

--
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.




Re: Anyone have a copy of Version 9?

2013-07-12 Thread TJ Luoma


On 12 Jul 2013, at 16:23, milkhouse.i...@gmail.com wrote:

Is it available on the site somewhere? I switched jobs/machines and 
don't have a copy. Foolish me.



http://www.barebones.com/support/bbedit/updates.html#up9

--
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.




Re: Running a unix program with BBedit input

2013-05-29 Thread TJ Luoma


On 29 May 2013, at 13:19, dweinberger wrote:

I've looked around for samples and instructions, but I haven't found 
what
I'm looking. Which isn't to say that they're not there, and probably 
right

under my nose.

I want to the content of the front BBedit through pandoc with the
appropriate parameters set, so that it turns markdown into html just 
the
way I like it. (Preferably, I'd like to save the resulting html as a 
file

with the same name as the file in the front window, but with a .html
extension. But this is in parentheses because it's icing on the cake.)

I think we're supposed to do this through a Text Factory, perhaps 
using the
run Unix Filter, but I can't figure out how to do it. Are there 
samples

that use command line apps in similar ways?


I don't know if this is the right way to think about it, but I always 
think of Unix Filters as I want to do something and change the file 
that I am working on but I think of Scripts as I want to take this 
file and do something else to it.


For example: if I want to change the current document so that its 
content has been processed with 'sort -u | sed G' then I'd use a Unix 
Filter, but if I wanted to take the current document and convert it to 
Markdown, then I'd use a Script.


The BBEdit user manual has information on this around page 318.


(I've installed markdown to html scripts that work fine. I'm looking 
for a
little more control. Plus, pandoc will also convert markdown to rtf, 
which

I occasionally need.)


Here's a very simple example which uses multimarkdown to convert the 
current file to HTML


#!/bin/zsh -f

INPUT_FILE=$BB_DOC_PATH

OUTPUT_FILE=$INPUT_FILE:r.html

	multimarkdown --extensions --smart --process-html --to=html 
--output=$OUTPUT_FILENAME $INPUT_FILE


exit

save that as MMD to HTML.sh and put it in the /Application 
Support/BBEdit/Scripts/ folder and it will appear in your Scripts menu.


There's a much more complicated version of this (it does a lot of error 
checking, as well as letting you specify what app should open the file 
that you create) available as MMD to HTML.zsh at


https://github.com/tjluoma/bbedit

but the above version is a (*ahem*) bare bones example of how you can do 
it. Search the user manual for BB_DOC_PATH for more.


TjL

--
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.




Re: Best way to filter HTML

2013-05-26 Thread TJ Luoma



On 25 May 2013, at 16:13, Rob Lewis wrote:

Never tried any of BBEdit's fancier features. What would be the best 
way to
take a file of HTML and extract just the code between the following 
tag

pairs:

p itemprop=articleBody and /p

There may be multiple blocks like this in the file.


It would be helpful to know if you are trying to remove all of the HTML 
markup or you are trying to get a plain-text rendering of the HTML file.


For the latter, the only recommendation that I would give would be to 
create a Text Filter or Script which would send the file through `lynx` 
which is going to do much better at parsing HTML and outputting plain 
text than any home-made solution.


TjL

--
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.




Re: Worksheet - Path to It?

2013-04-02 Thread TJ Luoma
On Mon, Apr 1, 2013 at 10:39 PM, Christopher Stone
listmeis...@suddenlink.net wrote:

 Since I've jumped into the shell with both feet I'm finding that moving the 
 theoretical to the practical is sometimes a chore (as is often the case).  :)

I should point out that I only recommend using full paths when testing
a new environment.

In general I don't use full paths. That would be hugely annoying and
of little practical value IMO. (Not to mention causing the script to
break if it's moved to a Linux/FreeBSD box where the same utilities
are found but not in the same location… although in practice I don't
actually use many of my scripts on other OSes.)

* One of the first things I do when setting up a new Mac is define the
$PATH that I want and save it to ~/.path

* My ~/.zshenv checks for ~/.path and imports it, if found, and generates it

* I put my shell scripts into ~/Dropbox/bin/ and add that to my $PATH
so they will always be available to whichever Mac I am using.

* If I am writing a shell script which uses a program which is not
part of a standard OS X installation (for example, lynx or wget), I
will (usually / when I remember) put this near the top of my script
right after the #!/bin/zsh

# This is a zsh-specific way of saying 'is there a program called
'FOO' in my $PATH??. You could do this same with `which` but this is
cleaner
if ((! $+commands[FOO] ))
then

# if FOO is _not_ in $PATH then this part of the if/then will 
be executed   
# note: if FOO is a FUNCTION or ALIAS, it will come back not 
found,
so make sure we are only
# testing for things that will show up in $PATH

echo $0: FOO is required but not found in $PATH
exit 1
fi

* I have a TextExpander snippet called `rqr` (for 'require` obviously
:-) which will automatically insert that little block of code,
prompting me to insert whatever command I want to require:

Here is the TextExpander snippet:

if ((! $+commands[%fill:command%] ))
then

# note: if %fill:command% is a function or alias, it will come 
back not found

echo $0: %fill:command% is required but not found in $PATH
exit 1

fi


HTH

TjL

-- 
-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Worksheet - Path to It?

2013-04-01 Thread TJ Luoma
On Mon, Apr 1, 2013 at 9:13 PM, Christopher Stone 
listmeis...@suddenlink.net wrote:

 On the other hand I *did* find the section on BBEdit's Environment
 Variables.


`printenv` will let you see all of the variables which are set, and their
values:


#!/bin/bash

/usr/bin/printenv | /usr/local/bin/bbedit

exit 0

-- 
-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Worksheet - Path to It?

2013-04-01 Thread TJ Luoma
On Mon, Apr 1, 2013 at 9:41 PM, Christopher Stone 
listmeis...@suddenlink.net wrote:

Is there any special reason you're using the full path to the commands?



Yes: when the environment is unknown, it's possible that the $PATH has not
been set, or is not the same as what you expect it to be, so it's not a bad
idea to use full paths. Assuming that the $PATH is set the way that you
expect it to be set is a good way to end up wondering why something works
perfectly in Terminal but doesn't work in another setting.

(Warning: Long-winded additional comments below. :-)

In 98.352% of the cases, that won't be a problem, but it *can be*
especially if you have modified your PATH in your $SHELL. Even
/usr/local/bin/ isn't in the default $PATH on OS X.

Compounding this problem is that the method for setting the $PATH for GUI
apps has recently changed

Until fairly recently it was suggested that you add the path to
~/.MacOSX/environmental.plist or something like that, but IIRC that stopped
working recently (10.8 or 10.7, I think).

If you google for an answer, you're going to find most people saying that
you should use ~/.MacOSX/environmental.plist … Although some will
suggest /etc/paths.d/ or /etc/paths.

FWIW in 10.8 it appears that the most reliable way of setting the PATH for
GUI programs is to add it to /etc/launchd.conf

For example, in mine, I have added:

setenv PATH /Users/luomat/Dropbox/Apps/site44/bin.luo.ma:
/Users/luomat/Dropbox/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

That setting may only get read from an app on login, so if you change it
you might have to restart the app and/or logout/login to get it to be seen
by all apps again.

(I'm not sure what the best way to set the global $PATH is if you don't
have access to /etc/launchd.conf … fortunately that's not something I've
had to worry about. I'm also not sure if you can rely on $HOME working
properly in /etc/launchd.conf either, which is why I haven't used it in my
example. )

TjL

-- 
-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: BBEdit RegEx Cheat-Sheet

2013-03-25 Thread TJ Luoma
On Mon, Mar 25, 2013 at 8:59 AM, Christopher Stone 
listmeis...@suddenlink.net wrote:

From time to time I need to double-check a reference when writing regex, so
 I've made my own cheat-sheet.


This is GLORIOUS.

Thank you!


I'm also interested in other people's cheat-sheets of all kinds - Perl,
 Python, Ruby, Shell - whatever.


Hear hear!

TjL

-- 
-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Sort and disply duplicate lines wtih number in front

2013-03-23 Thread TJ Luoma
On Sat, Mar 23, 2013 at 8:39 PM, Jim Walker tvcne...@gmail.com wrote:

 Can I pay someone to write a script which I can added to BBedit
 so I can run the scripts, like linesort used to work, and get the totals
 like below?


Oh goodness, don't pay anyone to write simple shell scripts for you when
the Internet is chock full of nerds who will do that for free ;-)

Here's the script you need for a Text Filter in BBEdit:

#!/bin/sh

/usr/bin/sort --numeric-sort $@ |\
/usr/bin/uniq -c |\
/usr/bin/sort --numeric-sort

exit 0
#EOF

(What That Script Does: line 1 will sort the contents of the file, line 2
will combine duplicate lines and prefix it with a count of how many lines
matched that line, and line 3 will sort that again so that the lines which
have the most duplicates will be at the bottom of the list.)


To use this:

* Copy the above into a new BBEdit document and make sure that the
#!/bin/sh line is the first line in the file

* Save it to ~/Application Support/BBEdit/Text Filters/

(or ~/Dropbox/Application Support/BBEdit/Text Filters/ if you sync via
Dropbox)

* name it something like Linesort With Totals.sh

* find it under the Text Filters menu:

http://images.luo.ma/bbedit/linesort/linesort-as-text-filter.jpg


NOTE:

TextFilters will REPLACE the content of your file.

If you want to leave the contents of the file alone and have the output
of Linesort With Totals.sh to appear in another BBEdit file, you should
use it as a BBEdit _Script_ which means:

Use this script instead:

#!/bin/sh

/usr/bin/sort --numeric-sort $BB_DOC_PATH |\
/usr/bin/uniq -c |\
/usr/bin/sort --numeric-sort

exit 0
#EOF

* put it into ~/Application Support/BBEdit/Scripts/
(or ~/Dropbox/Application Support/BBEdit/Scripts/

* find it under the 'scripts' menu:

http://images.luo.ma/bbedit/linesort/linesort-as-script.jpg

BTW I have created a script which can be used as _either_ a Text Filter
_or_ a BBEdit Script. You can find it here:

http://images.luo.ma/bbedit/linesort/Linesort%20With%20Totals.sh

(to download it, go to http://images.luo.ma/bbedit/linesort/ and then
control+click on the .sh file)

No guarantees, use at your own risk, if it breaks you get to keep both
parts, but it worked for me.

TjL
(Shell Script Nerd since the early 1990s)

-- 
-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Sort and disply duplicate lines wtih number in front

2013-03-23 Thread TJ Luoma
On Sat, Mar 23, 2013 at 11:51 PM, Marshall Clow mtc...@gmail.com wrote:

 On Mar 23, 2013, at 5:39 PM, Jim Walker tvcne...@gmail.com wrote:

 Can I pay someone to write a script which I can added to BBedit
 so I can run the scripts, like linesort used to work, and get the totals
 like below?

 is there some reason that
 sort | uniq -c
 won't do what you want?


If I had to guess, I'd say that Jim was probably looking for a solution he
could use inside BBEdit, without having to go into the Terminal.

I used BBEdit for years before I realized how easy it was to run scripts on
BBEdit documents, and if you've never done it, it can seem pretty
intimidating.

(As my old Comp Sci prof used to say: Everything is easy when you know
what you're doing.)

TjL

-- 
-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: BBEdit bounces but no windows open

2013-03-11 Thread TJ Luoma
On the command line try this

 open -F -a BBEdit

On Monday, March 11, 2013, Gary Hoffman wrote:

 In my iMac with Mac OS X 10.7.5, I've tried opening an older BBEdit and
 now a new one (10.5.2) but after bouncing, it never opens a window. There
 are a number of inaccessible files it may be trying to open. I've trashed
 all the files in ~/Library/Application Support/BBEdit.

 How can I launch the app and have it ignore the files it thinks it needs
 to open?

 Gary

 --
 --
 You received this message because you are subscribed to the
 BBEdit Talk discussion group on Google Groups.
 To post to this group, send email to 
 bbedit@googlegroups.comjavascript:_e({}, 'cvml', 'bbedit@googlegroups.com');
 To unsubscribe from this group, send email to
 bbedit+unsubscr...@googlegroups.com javascript:_e({}, 'cvml',
 'bbedit%2bunsubscr...@googlegroups.com');
 For more options, visit this group at
 http://groups.google.com/group/bbedit?hl=en
 If you have a feature request or would like to report a problem,
 please email supp...@barebones.com javascript:_e({}, 'cvml',
 '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 javascript:_e({}, 'cvml',
 'bbedit%2bunsubscr...@googlegroups.com');.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Strip away all HTML, leaving just the URLs

2013-03-07 Thread TJ Luoma
On Wed, Mar 6, 2013 at 10:58 AM, Nick grizfa...@gmail.com wrote:
 Thanks, that did exactly what I was looking for. But, I realized I also need
 to do this for anchor tags with relative links, such as:
 a href=/xxx//zzz.shtmlordinateur de bureau/a


I'm going to re-post my previous suggestion because it: will work for
all of these cases, boils down to one line, is extremely easy to
understand, and involves no complicated regex knowledge.

Create a BBEdit Text Filter which does this:

cat $@ | lynx -dump -listonly -nonumbers -stdin -width 1024

That's it. (Assuming lynx is installed, if it's not, it's easy to get.)

Translation:

cat $@ = Take the standard input

send (pipe) it to lynx

-dump = dump whatever lynx processed to stdout
-listonly = create a list of links as output
-nonumbers = don't number links in the output (1…2…3…)
-stdin = tell lynx to look for stdin
-width 1024 = how wide you want the output to be

`lynx` is designed to parse HTML in all sorts of weird forms, and it
will handle cases where there are relative links with or without a
BASE.

I realize that there are always more than one way to do something, but
rather than try to reinvent HTML parsers, I'd rather use a program
which has been developed for years to do what you're trying to do.

`lynx` may not be part of the standard OS X install, but it's easy to
get. If you use Homebrew, it's just `brew install lynx` otherwise go
to Rudix and get the installer.

You can download the full version of this Text Filter which I use (and
which includes some additional error checking) here:
http://db.tt/fcAIRZuU

TjL

-- 
-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Keyboard shortcut to open terminal and run: latexmk [insert name of bbedit file that is open]

2013-03-07 Thread TJ Luoma
On Thu, Mar 7, 2013 at 11:30 AM, lawlist
keith.david.bershat...@gmail.com wrote:
 Oh, that would be most awesome, to have the terminal run under the hood.
 Does the automator have an easy way to tell the terminal to run under the
 hood and insert a user defined command (latexmk -c) or  (latexmk, plus the
 name of the file in the working directory)?  I've only used the automator on
 a few occasions.

I don't think Automator or AppleScript is the way to do this.

You just need a shell script.

See page 34 and pages 314-319 in the User Manual (see the Help menu)
paying particular attention to the Document State variables on 318.

I think that you can probably accomplish this by something as simple as:

#!/bin/sh

latexmk -c $BB_DOC_PATH

exit

but there's also the Run… command under the #! menu too.

TjL

-- 
-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Convert quoted string to POSIX path?

2013-03-01 Thread TJ Luoma
On Fri, Mar 1, 2013 at 2:48 PM, LuKreme krem...@kreme.com wrote:

 mv This is a File! 20130301 - This is a File!

 Which fails if I try to execute it because of the !.

 I have to go back and convert it to something like:

 mv This is a File! 20130301\ -\ This\ is\ a\ File\!

 which works.

 Anyone have an idea for a shortcut instead of manually catching these and 
 fixing them manually?

Use single quotes instead of double quotes

mv   'This is a File!'   '20130301 - This is a File!'

that prevents the shell from grabbing the '!'

However, if your filenames have ' in them, then you might run into problems.

TjL

-- 
-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Strip away all HTML, leaving just the URLs

2013-03-01 Thread TJ Luoma
Here's a text filter which will do just that, using `lynx` which
unfortunately is not installed in OS X by default, but you can acquire
it either from Homebrew (my preference) or if you want a precompiled
binary in a nice installer:
http://rudix.googlecode.com/files/lynx-2.8.7-3.pkg

TjL


#!/bin/zsh -f
# get just the links from a file
#
# From: Timothy J. Luoma
# Mail: luomat at gmail dot com
# Date: 2013-03-02

NAME=$0:t

if ((! $+commands[lynx] ))
then

echo $NAME: lynx is required but not found in $PATH

cat $@

exit 1

fi


cat $@ | lynx -dump -listonly -nonumbers -stdin -width 1024


exit 0

#
#EOF

-- 
-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: computer dragging

2013-02-27 Thread TJ Luoma
On Tue, Feb 26, 2013 at 8:34 PM,  galegor...@gmail.com wrote:
 When I have a file open with BBEdit my computer performance gets slower and
 slower. The keyboard buffer will store a bunch of keystrokes before anything
 appears on the screen. The first time this occurred I thought Time Machine
 was doing its momentary backup but it speed up when the Time Machine icon
 went back to sleep. Anyone else having a similar problem?

The only time I see this (not BBEdit specific, just in general) is
when my Mac is swapping.

Activity Monitor.app -- System Memory -- Swap Used

It's not as bad if you're on a computer with an SSD but still
noticeable sometimes.

TjL

-- 
-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Copying HTML of preview window

2013-02-17 Thread TJ Luoma
On Saturday, February 16, 2013, Jan Erik Moström wrote:

 I'm pretty sure I'm missing something really basic here. I seem to
 remember to having seen that it was possible to copy the HTML code from the
 preview window but now I can't figure out how to do it.

 Am I misremembering something or am I just stupid and can't find how to do
 it?


Any chance you are thinking of a time when you previewed a BBEdit document
in Marked.app?

That app does have a copy from preview feature.

Apologies if this isn't it. Just thought it was worth a shot.

TjL





-- 
-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Replace character in selection

2013-02-07 Thread tj


On Feb 7, 2013, at 9:38 PM, Zephyr Mays zephyr.m...@gmail.com wrote:

 Apologies for the newbie question; I'm just discovering the power of BBEdit.
 
 I'd like to change all instances of a character in a selection without 
 invoking the find/replace dialog (in this case the _ character).
 
 I hope to select/highlight this: These_Underscores_Should_Be_Spaces
 
 Hit a keyboard shortcut and have this: These Underscores Should Be Spaces
 
 Thanks in advance for any suggestions; I don't even know where to start.
 

If you made a text filter using sed it would be as simple as:

 sed 's#_# #g'

I'm on my iPad at the moment so I can't check out exactly how it's done but I 
think it would be something like 

 #!/bin/sh

 cat $@ | sed 's#_# #g'


Or perhaps the cat should be an echo. Anyway you get the idea hopefully.

TjL 

-- 
-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Save All command???

2013-01-28 Thread TJ Luoma
On Mon, Jan 28, 2013 at 3:48 PM,  drtimh...@gmail.com wrote:
 Is it just me, or does anyone else really hate the lack of a Save All
 command in BBEdit? I tend to work on updates that span multiple files at
 once, and i dont know how many times I've been tripped up by missing saving
 just ONE of the files and getting a bad build as a result.

 Any more votes for Save All in BBedit???


I reversed the keyboard shortcuts for 'Save' and 'Save All', and now
Save All appears all of the time.

Note: I _want_ ⌘ + S to be Save All -- you might not want that.

You can do this either in BBEdit's preferences or System Preferences,
but I think it's easier to do in BBEdit's preferences.

TjL

-- 
-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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, send email to 
bbedit+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Save All command???

2013-01-28 Thread tj



-- 
-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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, send email to 
bbedit+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Marked (app) cannot be used as Preview Helper in BBEdit

2012-05-06 Thread TJ Luoma
On May 6, 2012, at 7:12 PM, Martin Post martinpostber...@googlemail.com
wrote:

Marked is recognized and added to the list of helpers. I can write and save
a MultiMarkdown file and select Markup  Preview in Marked 1.4 in
BBEdit, and the Marked app will even launch. But no document is displayed -
neither as raw Marked code nor as a rendered HTML document.

Any idea how to resolve this issue?



http://db.tt/CwGoVe0u

Put this in your ~/Application Support/BBEdit/Scripts/ as open in
Marked.zsh or similar.

Then use that to open the file in Marked.

That's how I've done it, at least.

TjL

-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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


Re: directory structure of files and folders synchronised to both local drive and server by ftp with one save action?

2012-04-02 Thread TJ Luoma
On Apr 2, 2012, at 10:10 AM, ben b...@hdbatik.co.uk wrote:

open a directory section -- files and folders. edit a file. save it.
it gets saved to both the local hard drive and the server at the same
time. edit another file, save it, it gets saved to local drive and
server, etc. possible with bbedit 10 ?


Others mentioned Interarchy and Transmit (I found Transmit much easier to
learn and use, but try them both)

If you aren't afraid of the command line, try this:

https://github.com/joshdick/pytograph

In a nutshell, you instruct pytograph that there are directory structures
on your machine that match directory structures on a remote machine. It
monitors the directories on your local machine for changes, then makes
identical changes on the remote machine in real time via SFTP. So, if you
add/update/delete a file locally, that same file will be automatically
added/updated/deleted on the remote machine. If you delete a directory
locally, that same directory will be deleted from the remote machine.

I should mention that I found this via http://onethingwell.org/ which is a
good site to follow for these sort of I didn't know that existed but now I
want to use it sort of utilities. Not exclusively Mac stuff but definitely
the majority.

TjL

-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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


Re: directory structure of files and folders synchronised to both local drive and server by ftp with one save action?

2012-04-02 Thread TJ Luoma
On Mon, Apr 2, 2012 at 12:29 PM, Ben Dougall b...@hdbatik.co.uk wrote:
 Two copies, one save (one save from/in BBEdit)?

Another option just occurred to me:

Transmit, Interarchy, or ExpanDrive (http://www.expandrive.com/) and Hazel 3.

Hazel 3 has a 'sync' option. It only works on folders mounted on that
Mac, but if you mounted the server as a 'local' folder, I think it
would work.

(I'm using it to sync my Byword iCloud folder to Dropbox.)

TjL

-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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


Re: Write on Mac, preview as iPad?

2012-03-31 Thread TJ Luoma
On Mar 31, 2012, at 4:33 PM, Miraz Jordan mi...@firstbite.co.nz wrote:

 On Sun, Apr 1, 2012 at 08:05, Kendo schuster@gmail.com wrote:
 I am very happy using BBEdit off-line for website development on my
 Mac Pro, but I need to see a preview of how the site would look on an
 iPad. Is there a way to do that?

 Check out an app called Reflection from

 http://www.reflectionapp.com

 It displays your iPad or iPhone on your Mac's screen. Very handy.



Yes it's a very handy app, but it doesn't really address the original
poster's question, since there's no real way to do a preview of your
BBEdit file in Reflection.

I have the same question as the op. don't know of a way, but would like to.

TjL

-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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


Re: Tidy Cleanup Problem

2012-03-28 Thread TJ Luoma
On Wed, Mar 28, 2012 at 5:21 AM, Rick Gordon li...@rickgordon.com wrote:
 So how can I -- on an entire project -- get the result of Tidy  Cleanup 
 Document without the entity conversion -- or else, how can I reconvert the 
 entities to their numeric form.

My first thought is that you might pipe the project to /usr/bin/tidy
directly rather than using BBEdit's built-in.

I don't know if BBEdit's tidy will respect the HTML_TIDY environmental
setting, but that might be worth looking into as well.

TjL

-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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


Re: Automating HTML in BBedit with AppleScript

2012-03-28 Thread TJ Luoma
On Wed, Mar 28, 2012 at 5:21 AM, blue-orange goo...@etculli.com wrote:
 I have two txt files containing 1000 thumbnail and original image
 filenames that look like this:

 original.txt:
 Photo_19001_2010-11-18_13.45.59_orig.jpg
 Photo_19002_2010-11-18_21.07.04_orig.jpg
 Photo_19003_2010-11-19_10.48.19_orig.jpg
 Photo_19004_2010-11-19_14.05.01_orig.jpg
 Photo_19005_2010-11-19_14.05.05_orig.jpg
 ...

 preview.txt:
 Photo_19001_2010-11-18_13.45.59_prev.jpg
 Photo_19002_2010-11-18_21.07.04_prev.jpg
 Photo_19003_2010-11-19_10.48.19_prev.jpg
 Photo_19004_2010-11-19_14.05.01_prev.jpg
 Photo_19005_2010-11-19_14.05.05_prev.jpg




Assuming that :

1. all of the filenames are exactly the same except that _orig.jpg
changes to _prev.jpg
2. the file 'original.txt' has one filename per line

then you can use a small shell script to do this:

#!/bin/sh

while read line
do

PREV=`echo $line | sed 's#_orig.jpg#_prev.jpg#g'`

echo a href=\$line\img src=\$PREV\/a

done  original.txt

I put this script up at
http://dl.dropbox.com/u/18414/tmp/bbedit3282012.sh if you want to
download it.

Save it to the same directory as 'original.txt'. Assuming they are
both on ~/Desktop/ then you would open Terminal.app and do

cd ~/Desktop/

chmod 755 ./bbedit3282012.sh

./bbedit3282012.sh

or, if you want to save the output of `bbedit3282012.sh`, then do

./bbedit3282012.sh  out.html

and then the file out.html will have the HTML that you need.

TjL

ps - I really can't help but mention that you should include WIDTH and
HEIGHT on the IMG tags. Otherwise the page is going to jump all over
the place as those 1,000 images load!! I assume you just left them off
your example to reduce visual clutter.

-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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


Re: BBEdit strips spaces from the ends of my lines when it saves the file

2012-03-27 Thread TJ Luoma
On Mar 27, 2012, at 8:54 PM, Philip Sharman philip.shar...@gmail.com wrote:

 Does anyone know why BBEdit is stripping all whitespace off the ends of my 
 lines when I save the file?  (The spaces are there okay until I save.  Then 
 BBEdit deletes them.)  This happens for lines anywhere in the file, not just 
 at the end.


 I can't see any preference that controls this, and I can't find anything on 
 the web or in the mailing list.

Preferences  Text Files  Strip Trailing Whitespace

TjL

-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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


Re: BBEdit 10.1.1: Markdown previews in BBEdit, but not in browsers

2012-03-15 Thread TJ Luoma
On Thu, Mar 15, 2012 at 5:57 PM, Chip Warden chip.war...@gmail.com wrote:
 As I was going through Take Control of BBEdit, I ran across the Try 
 Markdown section and decided to do just that. I find that while Preview in 
 BBEdit works fine, choosing to preview in any browser displays only the 
 raw, unformatted text in the browser. What's wrong?

 Hey John,

 I'm pretty sure there is nothing wrong. BBEdit's Preview in BBEdit command 
 understands Markdown, and renders it correctly. On the other hand, when you 
 Preview in … to send the document to another browser, the raw document is 
 sent to the browser. If you View Source in whichever browser you're using, 
 you'll see it's just the Markdown document. Browsers don't understand 
 Markdown, so they render the document as text. If you want to see what the 
 Markdown document looks like when rendered as HTML, you'll need to translate 
 it first (running the Markdown document through markdown.pl, for example) and 
 view the resulting html file in your browser.


FWIW, I use [Marked][] when previewing Markdown

I make an open in Marked script for BBEdit

#!/bin/sh

if [ $BB_DOC_PATH !=  ]
then
open -a Marked $BB_DOC_PATH
fi

And assigned a keyboard shortcut for it.

Works great.

Marked is $4 on the Mac App Store.

(Disclaimer: the developer of Marked is a friend/colleague, but I
don't get anything out of referring people to it, and although I was a
beta tester for it, I bought my own copy. After all, it's only $4.)

[Marked]: http://itunes.apple.com/us/app/marked/id448925439?mt=12

-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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


Regex help - convert ALL CAPS to Caps if WORD is only WORD on line

2012-02-21 Thread TJ Luoma

Hi, my name is TJ and I'm terrible at regular expressions :-)

Here's what I want to do:

Match: Any line which is one word long (where 'word' is defined as
ASCII letters, only) and that word is ALL CAPS

Do:
* Change word from UPPERCASE to Capitalized
* Put a colon after WORD
* Wrap that word (and colon) in ** **
* Change EOL to a space.

So, for example

FOO
bah ablah alasfas

would become

**Foo:** bah ablah alasfas

Possible?

-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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


anyone know what /Library/PrivilegedHelperTools/com.barebones.authd does?

2011-12-31 Thread TJ Luoma

I don't suspect /Library/PrivilegedHelperTools/com.barebones.authd is
nefarious, I just don't know what its purpose is.

-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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


Re: What Happened to Arrange Windows?

2011-08-07 Thread TJ Luoma
And Chris's point is that you're now beating the greasy spot where the
dead horse used to be.

TjL

On Sunday, August 7, 2011, edac2 campb...@scdny.com wrote:
 The purpose of this forum, Chris, is to discuss issues with a program
 which is so important to developers. This is not a tech support
 question. My point is that BBEdit 9.6 had nine options for arranging
 windows and BBEdit 10 has one. Writing a script to bring that up to
 two options is not a solution since we used to have ten options. There
 is no reason why a new, improved version of BBEdit should have 1/10
 the window arranging options as its predecessor.

 --
 You received this message because you are subscribed to the
 BBEdit Talk discussion group on Google Groups.
 To post to this group, send email to bbedit@googlegroups.com
 To unsubscribe from this group, send email to
 bbedit+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/bbedit?hl=en
 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 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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


Re: Version 9

2011-07-28 Thread TJ Luoma
On Thursday, July 28, 2011, Steve Nicholson li...@steveandmimi.com wrote:
 On Jul 28, 6:01 am, crag geeks...@gmail.com wrote:
 Ahh no. Every link I found ended up downloading version 10. So again,
 anyone know of a link that will let me download version 9? There isn't
 one I can find on BBedit's site.

 On Jul 28, 2011, at 6:22 AM, dinkypumpkin wrote:

 http://www.barebones.com/support/bbedit/updates.html

 The links in that page are only for retrieving a copy of BBEdit 9.6.3
 for which you already have a license.

 Sorry to split hairs, but OP said download, not purchase.

 The page you link to states New licenses for versions older than the
current release are no longer available.


So? As you said, the OP wanted to download it. Presumably because he has a
license and wants to use that instead.

Maning that http://www.barebones.com/support/bbedit/updates.html will work
just fine, since it leads to

http://pine.barebones.com/updaters/BBEdit_9.6.3.dmg

TjL

-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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


QuickCursor aka Use BBEdit everywhere (was Re: What's the BBEdit Sales Pitch?)

2011-07-28 Thread TJ Luoma
 Can we use BBEdit to compose email in Mail.app?  :-)

You can with this, my favorite new utility since textexpander

http://www.hogbaysoftware.com/products/quickcursor

It is awesome. I hope y'all will take a look (and I'm not involved with it
at all except a customer.)

TjL

-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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


Tips and Tricks?

2011-07-27 Thread TJ Luoma
Hey folks

I've been using BBEdit for years but don't think I'm doing everything
I can with it.

I'm trying to learn more of what BBEdit can do, and I was wondering if
some of you might be willing to help.

If you were trying to impress someone who was new to the Mac with what
BBEdit can do and why you use it as your text editor, can you give me
some examples of the features you'd show off?

Here are 3 examples from my own usage:

* One of the reasons that I chose BBEdit was that I needed to be able
to connect to an (S)FTP server and edit files, and I wanted an editor
that could do that.

* One of the features that I really love is the Multiple File Search
where I can look for a certain search term in a wide range of files.
Today I used it to file all files which referenced a given folder
(which I had renamed).  So in Terminal, I used this:

 bbedit --new-window `fgrep -l OLDNAME *`

which opened all of the files which include OLDNAME in a new BBEdit
window. Then I used multi-file search to replace OLDNAME with NEWNAME,
and it even saved all of the files for me automatically so I didn't
have to save them all manually.

* One thing I didn't know about for a long time was that if you hold
down the Option key while looking at the File menu, some of the
options will change. (Which is why I didn't think BBEdit had a way to
Save All for a long time :-/

-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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


Re: force BBEdit to re-read Text Filters folder?

2011-07-22 Thread TJ Luoma
I added a file to the folder (in terminal) and BBEdit didn't see it
until I restarted it.

On Thursday, July 21, 2011, Rich Siegel sie...@barebones.com wrote:
 On Thursday, July 21, 2011, TJ Luoma luo...@gmail.com wrote:

 Is there a way to tell BBEdit to re-read the Text Filters folder, if I
 have added something there, or do I just have to restart BBEdit?

 Neither should be necessary; what specific problem are you seeing?

 R.
 --
 Rich Siegel                                 Bare Bones Software, Inc.
 sie...@barebones.com                      http://www.barebones.com/

 Someday I'll look back on all this and laugh... until they sedate me.

 --
 You received this message because you are subscribed to the
 BBEdit Talk discussion group on Google Groups.
 To post to this group, send email to bbedit@googlegroups.com
 To unsubscribe from this group, send email to
 bbedit+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/bbedit?hl=en
 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 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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


BBEdit not setting execute bit

2011-07-21 Thread TJ Luoma

The manual (pdf page 304) says

 Additionally, to execute scripts anywhere outside of BBEdit (e.g. in the 
 Terminal), the system requires that the script file have ‘execute’ 
 permissions set. Thus, when you first save any script file which contains a 
 shebang (#!) line, BBEdit will automatically set execute permissions for your 
 login account (a+x, as modified by the umask) on that file.


The problem is that doesn't seem to happen for me. #! scripts get
saved as the same as text files. (I'm not on a file vault.)

I created a file like this:

#!/bin/bash

echo 'hello world'

exit 0

and saved it as testtj.sh but then when I check the permissions:

% ls -l testtj.sh
-rw-r--r-- 1 luomat 41 Jul 21 02:23 testtj.sh

(My umask is '022')

bb10 on Lion on a MacBook Air

-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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


  1   2   >