It just made me thick to edit large files in Xcode that I completly switched to BBEdit now.
The one thing I missed most was to quickly find the selected text in the Apple headers. So I have written an apple script for this which uses Spotlight and BBEdit’s multi search I like to share with you :
AppleScript
-
set MacOSSDK to "/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/"
-
tell application "BBEdit"
-
set fdoc to name of front text document
-
set searchString to (selection of text of front text document) as text
-
end tell
-
set command to "mdfind "kMDItemTextContent == ‘" & searchString & "’" -onlyin " & MacOSSDK
-
set mdResult to every paragraph of (do shell script command)
-
if (not mdResult = "") then
-
set fileList to {}
-
set fileListRef to a reference to fileList
-
repeat with posixFile in mdResult
-
copy POSIX file posixFile to the end of fileListRef
-
end repeat
-
tell application "BBEdit"
-
set search_opts to {starting at top:true, case sensitive:true, match words:true}
-
set searchResult to find (searchString as text) searching in fileList options search_opts
-
activate
-
end tell
-
end if