Ward Clark
2008-04-27 18:02:57 UTC
I've used the ability to save Find & Replace patterns to simplify some
repetitive tasks (e.g., update Finder paths in Automator scripts when
I moved referenced folders).
What I had not realized is these "Patterns" (so named in the Find &
Replace dialog) are actually "Grep patterns" (so named in BBEdit
Preferences > Text Search). My learning scenario:
1. Perform a simple text Find & Replace.
2. Use Patterns > Add to save the find and replace string pair for
later.
3. Later, re-use the saved pattern ... and get wild replacement
results.
Fortunately, I have the "Color Grep patterns" preference enabled and
noticed a colored "&" in the Replace string/pattern. Then I
discovered that retrieving my saved pattern automatically enables the
"Use Grep" option.
I briefly tried learning to turn off "Use Grep" when retrieving a
saved pattern. I soon realized it was safer to escape the Grep
special characters in my patterns. (Aside: This would be easier if
the pattern editing dialog used Grep color-coding.)
Wish: Use the Patterns feature to save simple text string that are
not interpreted as Grep patterns.
For example,
a. Save and restore the state of the "Use Grep" option along with the
Find and Replace strings/patterns.
b. Include the "Use Grep" option in the "Add/Replace Grep Pattern"
and "Create/Edit Grep Pattern" dialogs.
-- Ward
[I'm CC-ing this suggestion to <***@barebones.com>.]
repetitive tasks (e.g., update Finder paths in Automator scripts when
I moved referenced folders).
What I had not realized is these "Patterns" (so named in the Find &
Replace dialog) are actually "Grep patterns" (so named in BBEdit
Preferences > Text Search). My learning scenario:
1. Perform a simple text Find & Replace.
2. Use Patterns > Add to save the find and replace string pair for
later.
3. Later, re-use the saved pattern ... and get wild replacement
results.
Fortunately, I have the "Color Grep patterns" preference enabled and
noticed a colored "&" in the Replace string/pattern. Then I
discovered that retrieving my saved pattern automatically enables the
"Use Grep" option.
I briefly tried learning to turn off "Use Grep" when retrieving a
saved pattern. I soon realized it was safer to escape the Grep
special characters in my patterns. (Aside: This would be easier if
the pattern editing dialog used Grep color-coding.)
Wish: Use the Patterns feature to save simple text string that are
not interpreted as Grep patterns.
For example,
a. Save and restore the state of the "Use Grep" option along with the
Find and Replace strings/patterns.
b. Include the "Use Grep" option in the "Add/Replace Grep Pattern"
and "Create/Edit Grep Pattern" dialogs.
-- Ward
[I'm CC-ing this suggestion to <***@barebones.com>.]
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <***@barebones.com>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <bbedit-talk-***@barebones.com>
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <***@barebones.com>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <bbedit-talk-***@barebones.com>