On 2010-08-05, at 15:49, Tom wrote: > Is there any way to have the block of text that I have pasted into a > document be automatically selected so I can then use other commands on > that text immediately? > > For example, I usually Shift-left or right the block so the pasted > code has the right indentation to match the surrounding code. I find > it annoying to go from the keyboard using Command-V to the mouse to > reselect the block I just inserted to then go back to the keyboard and > use Command-[ or Command-]. This is even more annoying when the > inserted block of code is more than a page length. > > Any suggestions?
## tell application "BBEdit" set textLength to length of current clipboard tell text window 1 set startingPoint to characterOffset of selection paste current clipboard select (characters startingPoint thru (startingPoint + textLength - 1)) end tell end tell ## This works with the current clipboard. Doing the same while cycling throught the clipboard set is going to be more difficult. Paul -- 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 http://groups.google.com/group/bbedit?hl=en If you have a feature request or would like to report a problem, please email "supp...@barebones.com" rather than posting to the group.