On Sat, Nov 5, 2011 at 09:09, Oliver Taylor <[email protected]> wrote:
> In most OS X apps option-delete deletes the previous word plus any
> whitespace after it. BBEdit does not do this (for whatever reason). I want
> to create a very simple Applescript that does this. Here's what I've got so
> far:
>
> tell application "BBEdit"
>
> tell text of front text window to find "(\S+)?([ \t]+)?" options {search
> mode:grep, backwards:true} with selecting match
>
> end tell
>
> This, obviously, finds what I want to delete, but does not delete it.

I added

set selection to ""

before the end tell.

In the sentence:

Here's my test sentence.

If I put the cursor *after* the space after the word 'test' the script
deletes both 'test' and the space after it, so the sentence now reads:

Here's my sentence.

Cheers,

Miraz

-- 
MacTip: How to give folders and files unique icons -
http://mactips.info/2011/11/how-to-give-folders-and-files-unique-icons

KnowIT: Who do you think you're talking to? -
http://knowit.co.nz/2011/10/who-do-you-think-youre-talking-to

-- 
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

Reply via email to