Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Automator Service which allows you to easily find/replace all occurrences of selected text via Python

Steps to setup:

  1. Download the file " universal_find_replace.zip" and unzip it (you can do unzip universal_find_replace.zip in the Terminal or right-click and decompress from the GUI.
  2. Click the Universal Find + Replace. and install it
  3. Set a keyboard shortcut to invoke it, or use the Services dropdown by right-clicking after selecting some text (see image below for the preference pane).

NOTE: Safari 14 broke the functionality to "Output replaces selected text"; therefore this script uses a workaround of copying the output to the clipboard. As of today, you'll then need to paste this back in on Safari 14; it will automatically replace the text in other apps. See this link for more info.

@codycodes
Copy link
Author

codycodes commented Sep 24, 2020

Setting a keyboard shortcut:

universal_find_replace_keyboard_shortcut

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment