I wrote a script a while back based on discussions here that do this, 
though I'm not sure about the behavior you mention about lists. That part 
wasn't clear to me, though I might have an idea. The script goes to the 
first non-whitespace character on first execution. If done a second time 
(or you're already at the first non-white) then it will go to the true 
first position.

http://www.angelwatt.com/words/2010/07/31/bbedit-textwrangler-home-key-behavior/

-Kendall

On Sunday, June 3, 2012 2:46:55 PM UTC-4, Oliver Taylor wrote:
>
> I'm trying to write an applescript that emulates vim's "go to first 
> non-whitespace character on the line".
>
> I'm also building it to be smart about skipping lists (since most of my 
> writing is prose).
>
> The problem is that it seems like the find operation triggers before the 
> keystroke. Is there a simple way to tell BBEdit to do one at a time and 
> wait for the previous to finish before triggering the next?
>
> *tell* *application* "BBEdit"
>
> *tell* *application* "System Events"
>
> *keystroke* "a" using control down
>
> *end* *tell*
>
> *try*
>
> *find* "([^ \\t\\*\\-\\•\\d\\.])" searching in *text* *of* *front* *text 
> window* 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
>
> *end* *try*
>
> *end* *tell*
>
> *
> *
>
> Thanks!
>

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