On Oct 22, 2014, at 04:41, Doug Lerner <[email protected]> wrote:
> 3. Getting back to the (sigh) Find functionality I miss, in the new non-modal
> Find dialog it drives me crazy that I can't easily "search from the top."
______________________________________________________________________
Hey Doug,
We hashed much of this stuff out ad nauseam when BBEdit 10 was released, and
you might pick up some useful pointers by searching for those conversations.
I preferred the old modal find dialog too, but I understand the devs are
dealing with a whole new set of APIs with various strengths and weaknesses and
not taking their coffee-fugue out on me personally.
We're in luck though, because it's quite often possible to get BBEdit to work
your way with a little AppleScript.
The appended script will search-from-top with regex and case-INsensitive. It
saves the last used search-string independently from the find-dialog.
--
Best Regards,
Chris
-------------------------------------------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2014/10/22 20:45
# dMod: 2014/10/22 20:57
# Appl: BBEdit
# Task: Search with RegEx & Starting-at-Top
# Tags: @Applescript, @Script, @Search, @Find, @Starting-at-Top
-------------------------------------------------------------------------------------------
set bbFndStrFile to (path to home folder as text) & ".bbfndstr"
try
set bbSvdFndStr to read file bbFndStrFile
on error
set bbSvdFndStr to ""
end try
set bbFndStr to text returned of (display dialog "Enter RegEx Find String:"
default answer bbSvdFndStr)
# Save search-string
if bbFndStr ≠ bbSvdFndStr then do shell script "echo " & quoted form of
(bbFndStr & "\\c") & ¬
" > " & quoted form of (POSIX path of bbFndStrFile)
tell application "BBEdit"
tell text of text window 1
find bbFndStr options {search mode:grep, case sensitive:false, starting at
top:true} with selecting match
end tell
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
"[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].