Re: Select word

2013-07-03 Thread Oliver Taylor
On Jul 3, 2013, at 6:36, Rick Yentzer  wrote:

> What I'm looking for is a way to select a word and then select more words 
> until I get the selection I want.
> 
> I'll use this as an example:
> "grunt-contrib-nodeunit"
> 
> If my cursor is in the middle of the word "contrib" then I can double click 
> to select it, or I can use John Gruber's Select Word script.
> If my cursor is in the middle of "contrib" and I want to select the text 
> between the double quotes, what is the best solution?

See here: http://olivertaylor.net/bbedit_movement/

The select word script in that package assumes hyphenated words should be 
selected when you want to "select word".

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

2013-07-03 Thread Rick Yentzer
Palm to forehead!  Thanks.
Rick

On Wednesday, July 3, 2013 3:41:54 PM UTC-4, Roland Küffner wrote:
>
>
> Am 03.07.2013 um 21:05 schrieb Rick Yentzer >: 
>
> > Addition: Is there a script to select text between opening and closing 
> tags? 
>
> no script needed. See "Balance" in the "View" Menu and "Balance Tags" in 
> the "Markup Menu" 
>
> -Roland

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

2013-07-03 Thread Roland Küffner

Am 03.07.2013 um 21:05 schrieb Rick Yentzer :
> Addition: Is there a script to select text between opening and closing tags?

no script needed. See "Balance" in the "View" Menu and "Balance Tags" in the 
"Markup Menu"

-Roland

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

2013-07-03 Thread Rick Yentzer
Marshall, I'm looking for non mouse word selection.

David, that is how I do it now, I was just hoping there was a faster way. I 
can't remember now but it seemed that in one editor I was able to expand my 
word selection by repeating a keyboard shortcut. That is what I had in mind.

Roland and San, both of these scripts work in selecting text between quotes.

Addition: Is there a script to select text between opening and closing tags?

Thanks for your help.

Rick


On Wednesday, July 3, 2013 9:36:15 AM UTC-4, Rick Yentzer wrote:
>
> After searching the manual and this forum I was unable to find the 
> solution I'm looking for so here goes.
>
> I do most of my coding work on my macbook pro. So I don't have the 
> extended keyboard and I'm trying to save my tennis elbow by not having to 
> move my hands much.
>
> What I'm looking for is a way to select a word and then select more words 
> until I get the selection I want.
>
> I'll use this as an example:
> *"grunt-contrib-nodeunit"
> *
>
> If my cursor is in the middle of the word "contrib" then I can double 
> click to select it, or I can use John Gruber's Select Word script.
> If my cursor is in the middle of "contrib" and I want to select the text 
> between the double quotes, what is the best solution?
>
> RIght now it appears I have two options; I can either double-click to 
> select "contrib" or use the track pad (too slow!) to select the text 
> between the double quotes, or I can use the "select word script". The 
> latter doesn't have a way to extend the selection.
>
> What do others do?
>
> Thanks,
> Rick
>
>

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

2013-07-03 Thread Ron Fleckner

On 03/07/2013, at 11:36 PM, Rick Yentzer  wrote:

> After searching the manual and this forum I was unable to find the solution 
> I'm looking for so here goes.
> 
> I do most of my coding work on my macbook pro. So I don't have the extended 
> keyboard and I'm trying to save my tennis elbow by not having to move my 
> hands much.
> 
> What I'm looking for is a way to select a word and then select more words 
> until I get the selection I want.
> 
> I'll use this as an example:
> "grunt-contrib-nodeunit"
> 
> If my cursor is in the middle of the word "contrib" then I can double click 
> to select it, or I can use John Gruber's Select Word script.
> If my cursor is in the middle of "contrib" and I want to select the text 
> between the double quotes, what is the best solution?
> 
> RIght now it appears I have two options; I can either double-click to select 
> "contrib" or use the track pad (too slow!) to select the text between the 
> double quotes, or I can use the "select word script". The latter doesn't have 
> a way to extend the selection.
> 
> What do others do?
> 
> Thanks,
> Rick
> 

The way I'd do it if the cursor was within 'contrib': Option-left arrow to 
beginning of 'grunt', then Option-Shift-right arrow to the end of 'nodeunit' to 
make the selection.

Option-arrow moves the cursor to the end or beginning of a word.  Adding Shift 
will also select.

Ron

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

2013-07-03 Thread Lawrence San
Here's an alternative form of a 'select a quoted passage' script. It was
posted in this list by someone back around May of 2011, I believe. It seems
to work, but I haven't tried the version you just posted so I have no
opinion as to which might be better. Sorry I don't know the name of the
script's author. Here it is:

tell application "BBEdit"

-- search backwards for non-escaped quote character
find "[^](\"|')" searching in text 1 of text document 1 options
{search mode:grep, starting at top:false, wrap around:false,
backwards:true, case sensitive:false, match words:false, extend
selection:false} with selecting match

set quotePat to "[^]" & (grep substitution of "\\1")
select insertion point after selection
set theStart to characterOffset of selection

-- find first appearence of just found quote
find quotePat searching in text 1 of text document 1 options {search
mode:grep, starting at top:false, wrap around:false, backwards:false, case
sensitive:false, match words:false, extend selection:false} with selecting
match
select insertion point before selection
set theEnd to (characterOffset of selection)

-- select string without quotes
select characters theStart through theEnd of text 1 of text document 1

end tell

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

2013-07-03 Thread Roland Küffner

Am 03.07.2013 um 15:36 schrieb Rick Yentzer :
> What I'm looking for is a way to select a word and then select more words 
> until I get the selection I want.

> "grunt-contrib-nodeunit"
> 
> If my cursor is in the middle of "contrib" and I want to select the text 
> between the double quotes, what is the best solution?


With BBEdit's script recording feature and some childish apple script babbling 
I once was able to conjure a script that does exactly that: Select the text 
between two quotation marks. Beware that this script is pretty dumb and will 
trip over escaped quotations marks and alike. Perhaps someone on the list has a 
better version of this.
But this has been working for me for years and I use it all the time (with a 
keyboard shortcut, of course).

Regards,
Roland


The Script:

tell application "BBEdit"
find "(\"|')" searching in text 1 of text document 1 options {search 
mode:grep, starting at top:false, wrap around:false, backwards:true, case 
sensitive:false, match words:false, extend selection:false} with selecting match
set daString to (grep substitution of "\\1")
select insertion point after selection
set theStart to characterOffset of selection
find daString searching in text 1 of text document 1 options {search 
mode:grep, starting at top:false, wrap around:false, backwards:false, case 
sensitive:false, match words:false, extend selection:false} with selecting match
select insertion point before selection
set theEnd to (characterOffset of selection) - 1
select characters theStart through theEnd of text 1 of text document 1
end tell

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

2013-07-03 Thread David Dierauer

On Wed, 3 Jul 2013, Rick Yentzer wrote:

*snip*


I'll use this as an example:
*"grunt-contrib-nodeunit"
*

If my cursor is in the middle of the word "contrib" then I can double click
to select it, or I can use John Gruber's Select Word script.
If my cursor is in the middle of "contrib" and I want to select the text
between the double quotes, what is the best solution?



I would type option-right-arrow until I got past the end of "nodeunit", then 
shift-option-left-arrow until the selection was the way I wanted it. It may 
sound slow, but it's very fast once you've gotten used to the shortcuts. I 
almost never have to resort to the mouse to make a selection in BBEdit.


-David

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

2013-07-03 Thread Marshall Clow

On Jul 3, 2013, at 6:36 AM, Rick Yentzer  wrote:

> After searching the manual and this forum I was unable to find the solution 
> I'm looking for so here goes.
> 
> I do most of my coding work on my macbook pro. So I don't have the extended 
> keyboard and I'm trying to save my tennis elbow by not having to move my 
> hands much.
> 
> What I'm looking for is a way to select a word and then select more words 
> until I get the selection I want.

Double-click, hold and drag will select by words.

click, release, click again, and don't release the "mouse button". Now move the 
mouse, and see the selection grow by words.

-- Marshall


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




Select word

2013-07-03 Thread Rick Yentzer
After searching the manual and this forum I was unable to find the solution 
I'm looking for so here goes.

I do most of my coding work on my macbook pro. So I don't have the extended 
keyboard and I'm trying to save my tennis elbow by not having to move my 
hands much.

What I'm looking for is a way to select a word and then select more words 
until I get the selection I want.

I'll use this as an example:
*"grunt-contrib-nodeunit"
*

If my cursor is in the middle of the word "contrib" then I can double click 
to select it, or I can use John Gruber's Select Word script.
If my cursor is in the middle of "contrib" and I want to select the text 
between the double quotes, what is the best solution?

RIght now it appears I have two options; I can either double-click to 
select "contrib" or use the track pad (too slow!) to select the text 
between the double quotes, or I can use the "select word script". The 
latter doesn't have a way to extend the selection.

What do others do?

Thanks,
Rick

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