macOS Text Replacements How-To
Source: Notion | Last edited: 2024-08-21 | ID: e4a4aec2-2d2...
This guide elaborates on how to efficiently use the Text Replacements feature in macOS. By following these instructions, you’ll be able to streamline your text input process, whether you’re signing an email or templatized prompting GPT-4.
Accessing Text Replacements Interface
Section titled “Accessing Text Replacements Interface”- Invoke Spotlight Search: Press
Cmd + Spaceto bring up the Spotlight Search field. - Search for Text Replacements: Type Text Replacements into the search field.
- Navigate to Interface: Select Text Replacements from the drop-down menu. This will direct you to a table-like interface featuring two columns: Replace and With.
Managing Text Replacement Pairs
Section titled “Managing Text Replacement Pairs”- Add a Pair: Locate the
+symbol at the lower left corner. Clicking it will create a new row for you to input a text replacement pair. - Delete a Pair: Use the
-symbol next to the+. Highlight the pair you wish to remove and click the-to delete it. - Multiple Selections: Hold down the
Shiftkey to highlight multiple adjacent pairs for either deletion or export.
Setting the ‘Replace’ Field
Section titled “Setting the ‘Replace’ Field”- Prefix with Dollar Sign: Use a
$as a prefix to your shortcut in the Replace field. This makes the key easily identifiable and avoids encoding issues across multiple language keyboard layouts, such as English and Chinese.
Handling Multi-Paragraph Text
Section titled “Handling Multi-Paragraph Text”- Preparation: If your replacement text spans multiple paragraphs, prepare the text in a text editor and insert empty lines between each paragraph.
- Cut and Paste: Paste this multi-paragraph text into the With field. Despite its single-line appearance, it can handle paragraph breaks.
Batch Import and Export
Section titled “Batch Import and Export”- Select All: Use
Cmd + Ato highlight all entries. - Export: Right-click or double-tap to bring up the context menu. Select Export and save the resulting Text Substitutions.plist file. Below is a sample file:
Note: The Import function is known to be unreliable. Instead, see Drag and Drop: Drag your edited Text Substitutions.plist file into the now-empty Text Replacements table.
Editing Plist File in VSCode
Section titled “Editing Plist File in VSCode”- Open File: Open the exported Text Substitutions.plist file in VSCode.
- Editing: Perform your batch text replacements.
- Save: Once editing is complete, save your changes in the file.
Final Import Step
Section titled “Final Import Step”- Clear Old Entries: Return to the Text Replacements interface, select all entries using
Cmd + A, and delete them using the sign. - Drag and Drop: Drag your edited Text Substitutions.plist file into the now-empty Text Replacements table. Your Text Replacements should now be updated and ready for use.
Here’s a simple Mermaid UML diagram to visualize the process:
graph TD; A[Invoke Spotlight] --> B[Search for Text Replacements] B --> C[Navigate to Interface] C --> D1[Add a Pair] C --> D2[Delete a Pair] C --> D3[Multiple Selection] D1 --> E[Set 'Replace' Field] D1 --> F[Handling Multi-Paragraph Text] D3 --> G[Batch Import and Export] G --> H[Editing Plist File in VSCode] H --> I[Final Import Step]