Find and Replace in selection?

chris's Avatar

chris

04 Feb, 2015 01:11 AM

Is there a way to limit a find and replace operation to a selection of text?

  1. Support Staff 1 Posted by Fletcher on 04 Feb, 2015 01:17 PM

    Fletcher's Avatar

    No.

    What I would do is cut the section of interest into a new document, do the find/replace, and then paste it back into the original document.

    Fletcher

    --
    Fletcher T. Penney
    Manager, Founder
    MultiMarkdown Software, LLC
    [email blocked]

  2. 2 Posted by chris on 04 Feb, 2015 03:10 PM

    chris's Avatar

    Yes, that is the awkward workaround I use. Please consider this a feature
    request/suggestion then.

    Thanks!

    c

  3. Support Staff 3 Posted by Fletcher on 04 Feb, 2015 10:34 PM

    Fletcher's Avatar

    Out of curiosity, what other apps do what you're asking for?

    It seems like the difficulty to code it and come up with a GUI (since it would probably involve breaking Apple's find/replace) might outweigh how often it's used.

    F-

    --
    Fletcher T. Penney
    Manager, Founder
    MultiMarkdown Software, LLC
    [email blocked]

  4. 4 Posted by chris on 05 Feb, 2015 12:21 AM

    chris's Avatar

    Well, on OS X: MacVim (an outlier for sure :), Microsoft Word (if you have
    a selection highlighted and do a find/replace, it replaces in the selection
    and then asks if you want to replace in the rest of the document), Text
    Wrangler, BBEdit...not sure about Markdown editors because I found MMDC
    early on and had no reason to explore others!

    It seems like almost all the editors on Windows do this, but I suspect
    that's some difference in the common libraries or
    whatever on which they are based.

    It's certainly not a showstopper, obviously, but I do find myself wishing
    for it far more often than, say, the option to use currently selected text
    as the search, though that potentially saves a different cut and paste
    operation that I perform more or less automatically.

    But I certainly see your point if it would require coming up with your own
    GUI/etc. Might not be worth it!

  5. Support Staff 5 Posted by Fletcher on 05 Feb, 2015 12:48 AM

    Fletcher's Avatar

    Let me think about it. I believe (but could be wrong) that there isn't a way to accomplish this with Apple's built-in find/replace mechanism, which would mean rewriting all of it from scratch.

    The apps you mention are either ports from other OS's, or general purpose/programmer's text editors. Both groups (of necessity) tend to write everything from the ground up in order to support the features one would expect (e.g. Macros, plugins, etc.)

    I'll keep this in mind, but can't make any promises.

    F-

    --
    Fletcher T. Penney
    Manager, Founder
    MultiMarkdown Software, LLC
    [email blocked]

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac