On 04/11/2017, at 17:38, Neil Faiman <[email protected] <mailto:[email protected]>> wrote: > What Iām looking for is some way to scroll the window so that the current > line (the line containing the selection) is located at some specific position > relative to the BBEdit window. Is there a way to get there?
Hey Neil, Have a look at my scripts in this post: https://groups.google.com/d/msg/bbedit/Dd2R9H2ty9Q/hzluHUrOvEcJ <https://groups.google.com/d/msg/bbedit/Dd2R9H2ty9Q/hzluHUrOvEcJ> These are imperfect, but they'll give you some idea of what's possible. BBEdit does not give AppleScript much information about the position of text in the editing panel. So this kind of scripting is rather awkward. On my own system I use the reposition to middle script bare. For the top and bottom reposition scripts I use Keyboard Maestro and AppleScript in concert. Essentially I save the selection if any and then have KM page-up or page-down as appropriate to the task ā type Ctrl-A to position the cursor at the beginning of the line and bring the line to the top or bottom ā and then restore the selection with another AppleScript. This works and is sufficiently fast that I don't notice the kludginess of the process. -- 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 "[email protected]" 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/bbedit.
