Re: Applescript to replace selected text only using grep pattern

2018-10-14 Thread Kevin Bolduan
Rich,

Success, thanks. Guess I needed a screwdriver, not a hammer ;-). BTW, I've 
been using BBEdit since v 4.5 in 1998, though the free "It doesn't suck!" 
t-shirt is long gone :-(. Not sure how I managed to go this long without 
knowing about Clippings; I'll be using these for quite a few other things, 
too!

thanks,
-Kevin

On Sunday, October 14, 2018 at 7:39:32 AM UTC-7, Kevin Bolduan wrote:
>
> I'd like to have a keyboard shortcut that allows me to highlight a 
> selection and have it be replaced using a grep pattern that uses the 
> selection. I'm writing some CSS and I need to convert various font-size 
> declarations as follows:
>
> 2rem ->  calc(2rem * .625)
>
> I can't do a global search-and-replace and would like a quick and easy way 
> to type "2rem" (or any other value), select it, press the keyboard 
> shortcut, and have it change to calc(2rem * .625).
>
> I cobbled together the following AppleScript:
>
> *tell* *application* "BBEdit"
>
> *set* selectedText *to* contents *of* selection
>
> *replace* selectedText using "calc(" & selectedText & " * .625)" searching 
> in *text* 1 *of* *front* *text document* options {search mode:*grep*, 
> starting 
> at top:*true*}
>
> *end* *tell*
>
> but it has a few flaws. The first is that according to the Applescript 
> dictionary for BBEdit, "replace" is actually Replace All, which I don't 
> want; I only want it to replace what I've selected.
>
> replace v : performs a Replace All
>
> And second, the Search Options seem to leave out the "Selected text only" 
> option that lives in the Find/Replace dialog box; they have everything else:
>
> SeSearch Options n : Options for “find” and “replace” commands
>
> properties
>
> search mode (literal/‌grep) : the type of search (literal search if 
> omitted)
>
> starting at top (boolean) : start from the top of the document? (false if 
> omitted)
>
> wrap around (boolean) : should the search wrap from the end of the 
> document? (false if omitted)
>
> backwards (boolean) : should the search proceed backwards? (false if 
> omitted)
>
> case sensitive (boolean) : should the search be case-sensitive? (false if 
> omitted)
>
> match words (boolean) : should the search only find whole words? (false 
> if omitted)
>
> extend selection (boolean) : should the selection range include the 
> original selection start through the end of the match? (false if omitted)
>
> Any suggestions on how to limit the scope of the script to JUST the 
> selection, would be appreciated!
>

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


Applescript to replace selected text only using grep pattern

2018-10-14 Thread Kevin Bolduan
I'd like to have a keyboard shortcut that allows me to highlight a 
selection and have it be replaced using a grep pattern that uses the 
selection. I'm writing some CSS and I need to convert various font-size 
declarations as follows:

2rem ->  calc(2rem * .625)

I can't do a global search-and-replace and would like a quick and easy way 
to type "2rem" (or any other value), select it, press the keyboard 
shortcut, and have it change to calc(2rem * .625).

I cobbled together the following AppleScript:

*tell* *application* "BBEdit"

*set* selectedText *to* contents *of* selection

*replace* selectedText using "calc(" & selectedText & " * .625)" searching 
in *text* 1 *of* *front* *text document* options {search mode:*grep*, starting 
at top:*true*}

*end* *tell*

but it has a few flaws. The first is that according to the Applescript 
dictionary for BBEdit, "replace" is actually Replace All, which I don't 
want; I only want it to replace what I've selected.

replace v : performs a Replace All

And second, the Search Options seem to leave out the "Selected text only" 
option that lives in the Find/Replace dialog box; they have everything else:

SeSearch Options n : Options for “find” and “replace” commands

properties

search mode (literal/‌grep) : the type of search (literal search if omitted)

starting at top (boolean) : start from the top of the document? (false if 
omitted)

wrap around (boolean) : should the search wrap from the end of the 
document? (false if omitted)

backwards (boolean) : should the search proceed backwards? (false if 
omitted)

case sensitive (boolean) : should the search be case-sensitive? (false if 
omitted)

match words (boolean) : should the search only find whole words? (false if 
omitted)

extend selection (boolean) : should the selection range include the 
original selection start through the end of the match? (false if omitted)

Any suggestions on how to limit the scope of the script to JUST the 
selection, would be appreciated!

-- 
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 post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: BBEdit and Interarchy

2018-07-12 Thread Kevin Bolduan
Nori,

I haven't experienced the issue you noted below - my issue was exactly the 
same as the original poster. Files opened directly into BBEdit from 
Interarchy appear to save as expected, but are never actually written to 
the server. And this only started with High Sierra on a MBP. The solution 
Rich noted about using BBEdit's built in SFTP connection works, but is much 
less robust than working with Interarchy and doesn't work all that well 
with lots of different files. 

I've sent a link of this thread to the creator of Interarchy and will 
follow up here if I get a response.

-KevinB

On Tuesday, July 10, 2018 at 7:39:22 AM UTC-7, Nori Muster wrote:
>
> Hi Kevin - my problem with Interarchy is sometimes when I upload more than 
> few files, the connection drops off. Then it just spins for a while and 
> tells me the files didn’t post.
> It’s almost like the server perceives my posting numerous files as some 
> sort of attack and locks me out.
> On the discussion where I was posting about that was another woman who was 
> trying to make changes to her files online and Interarchy would not save 
> the changes. However, luckily, somehow she had updated copies of the files 
> on her computer. I’m not sure how that all worked.
> Nori
>
>
>
>
> On Jul 9, 2018, at 10:13 PM, Kevin Bolduan  > wrote:
>
> Another thought: I wonder if this has something to do with APFS. The issue 
> is file related and as I said earlier, I'm not seeing it on my iMac (which 
> because it has a fusion drive is still on HFS+ even though it's running 
> "High Sierra") but am on my APFS, SSD Macbook Pro..
>
> @Rich - does that sound plausible?
>
> thanks,
> -KevinB
>
> On Thursday, March 15, 2018 at 1:51:08 PM UTC-7, Hyper Viper wrote:
>>
>> Hi, all,
>> in the last few days, after +20 years of satisfying use, I am 
>> experiencing a problem between BBEdit and Interarchy.
>> I am using the most recent versions of Mac OS (High Sierra), BBEdit 
>> (12.1.2) and Interarchy (10.0.7 sic!).
>> If I try to edit a file with command+j and then try to save, Interarchy 
>> doesn't save. 
>> The problem seems related to Interarchy, I am here to ask if someone alse 
>> has experienced the same situation
>> and found a solution.
>> Thank you in advance.
>>
>>
> -- 
> This is the BBEdit Talk public discussion group. If you have a 
> feature request or would like to report a problem, please email
> "sup...@barebones.com " rather than posting to the group.
> Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
> --- 
> You received this message because you are subscribed to a topic in the 
> Google Groups "BBEdit Talk" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/bbedit/F0uV2c-oJvk/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> bbedit+un...@googlegroups.com .
> To post to this group, send email to bbe...@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/bbedit.
>
>
> steamboats rock the world
> http://steamboats.com
> http://surrealist.org
>
>

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


Re: BBEdit and Interarchy

2018-07-10 Thread Kevin Bolduan
Another thought: I wonder if this has something to do with APFS. The issue 
is file related and as I said earlier, I'm not seeing it on my iMac (which 
because it has a fusion drive is still on HFS+ even though it's running 
"High Sierra") but am on my APFS, SSD Macbook Pro..

@Rich - does that sound plausible?

thanks,
-KevinB

On Thursday, March 15, 2018 at 1:51:08 PM UTC-7, Hyper Viper wrote:
>
> Hi, all,
> in the last few days, after +20 years of satisfying use, I am experiencing 
> a problem between BBEdit and Interarchy.
> I am using the most recent versions of Mac OS (High Sierra), BBEdit 
> (12.1.2) and Interarchy (10.0.7 sic!).
> If I try to edit a file with command+j and then try to save, Interarchy 
> doesn't save. 
> The problem seems related to Interarchy, I am here to ask if someone alse 
> has experienced the same situation
> and found a solution.
> Thank you in advance.
>
>

-- 
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: BBEdit and Interarchy

2018-07-10 Thread Kevin Bolduan
HV,

Sorry I don't have a solution, but just found this when Googling around as 
I just ran into the exact same problem. I, too, am I on a newish MBP and 
all the version numbers match yours. Two clues: 1) I am NOT experiencing 
this in High Sierra on an iMac, just to MBP. 2) When I installed 
Interarchy, it gave me the "this app may not be fully compatible" message. 
I don't know for sure but I think this has something to do with 32 vs. 64 
bit stuff that High Sierra is phasing out. According to the Nolobe site, 
10.0.7 is supposed to work with High Sierra, but maybe this is a 
particularly deep bug because of that.

Did you ever find a way around this?

-KevinB

On Thursday, March 15, 2018 at 1:51:08 PM UTC-7, Hyper Viper wrote:
>
> Hi, all,
> in the last few days, after +20 years of satisfying use, I am experiencing 
> a problem between BBEdit and Interarchy.
> I am using the most recent versions of Mac OS (High Sierra), BBEdit 
> (12.1.2) and Interarchy (10.0.7 sic!).
> If I try to edit a file with command+j and then try to save, Interarchy 
> doesn't save. 
> The problem seems related to Interarchy, I am here to ask if someone alse 
> has experienced the same situation
> and found a solution.
> Thank you in advance.
>
>

-- 
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: Language files and colorizing words

2018-02-23 Thread Kevin Bolduan
I think I have the same question. Specifically, in CSS (editing a .css 
file), the declaration used to be colored but isn't anymore now that I've 
upgraded to v.12.

.classname {
  background: #00;
}

Right now, .classname is black and #00 is colored as expected, but 
"background" is also black and shouldn't be.

In the preferences there appears to only be a color choice for "Color 
Specification." 

What's weird, is that if I start typing, for example:

background

it is colored as I would expect (greenish), but as soon as I type the ":" 
(which is necessary) the word turns back to black. I'm using the BBEdit 
Light color scheme.

thanks,
-Kevin

On Saturday, February 10, 2018 at 3:10:37 PM UTC-8, Robert wrote:
>
> How do I make words the end in a colon colorized? 
>
> Example:
>
> emailAddress nullable: true, email: true, unique: true
>  ^  ^   ^
>  ^  ^   
> colorized
>  ^  colorized
>  ^
>  colorized
>
>
> Thanks,
>
> Bob
>

-- 
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: Language files and colorizing words

2018-02-23 Thread Kevin Bolduan
Not sure if/when my previous post will be approved, but it can be 
disregarded. This is fixed for me (in CSS) in 12.1.1 (I had the issue only 
in 12.1).

-Kevin

On Saturday, February 10, 2018 at 3:10:37 PM UTC-8, Robert wrote:
>
> How do I make words the end in a colon colorized? 
>
> Example:
>
> emailAddress nullable: true, email: true, unique: true
>  ^  ^   ^
>  ^  ^   
> colorized
>  ^  colorized
>  ^
>  colorized
>
>
> Thanks,
>
> Bob
>

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


SASS Compiler?

2016-05-17 Thread Kevin Bolduan
Does anyone know of a plug-in or similar for BBEdit that will automatically 
compiles SASS into CSS? I'm aware of third-party applications like CodeKit 
and could probably figure out something Terminal-based on a watched folder, 
but am looking for something directly within BBEdit that allowed me to have 
a .scss file open in BBEdit and then when I save, it automatically creates 
and saves the compiled CSS as well. I've seen that Coda has something for 
this (http://elbongurk.com/2013/11/how-to-use-sass-in-coda/), but after 20 
years of BBEdit, I'm not ready to switch...

thanks,
-Kevin

-- 
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: Growl notifications disappeared in 10.5.9

2014-03-11 Thread Kevin Bolduan
Rich,

Thanks - glad to know it wasn't just me. Is there an expectation that Growl 
support (even 1.2.2) will return in BBEdit 10.5.10 or 10.6? Or have you 
moved on to Notification Center fully?

thanks,
-Kevin

---

On Friday, March 7, 2014 11:09:26 AM UTC-8, Rich Siegel wrote:
>
> On Friday, March 7, 2014, Kevin Bolduan 
> > wrote: 
>
> >Just had the automatic update to BBEdit 10.5.9 and noticed that 
> >my Growl notifications disappeared for things like search and replace. 
>
> Growl support has been removed while we isolate some related 
> stability issues. Sorry for the inconvenience. 
>
> R. 
> -- 
> Rich Siegel Bare Bones Software, Inc. 
> >  <
> http://www.barebones.com/> 
>
> Someday I'll look back on all this and laugh... until they 
> sedate me. 
>
>

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


Growl notifications disappeared in 10.5.9

2014-03-07 Thread Kevin Bolduan
Greetings,

Just had the automatic update to BBEdit 10.5.9 and noticed that my Growl 
notifications disappeared for things like search and replace. Confirmed the 
BBEdit is active with Growl and Growl still works for other apps.

I'm using old stuff, so I'm guessing that's why, but can anyone verify 
support?

Mac OS X 10.6.8
BBEdit 10.5.9
Growl 1.2.2 (can't upgrade b/c of 10.6.8)

Thanks.

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


Editor window (and file drawer) width problems - too wide

2013-03-08 Thread Kevin Bolduan
In 10.5.2 I've noticed recently that when I open a second document (which 
causes the file drawer to appear) the editor window is often maximized 
automatically to fill my screen (or close). This makes the file drawer 
sidebar really wide and I always end up having to re-size it to make it 
narrower. It seems to me that previous versions of BBEdit always remembered 
the editor window size (including the file drawer) as I don't recall ever 
having to manually resize anything to make my window look/feel right. I 
looked in the preferences but didn't see anything that referred to the 
default size for the editor.

Is this just me? Is this a bug?

-Kevin

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

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.
For more options, visit https://groups.google.com/groups/opt_out.