A powerful Obsidian plugin for lightning-fast text replacement with customizable word pairs
EZ Replace transforms the way you work with text in Obsidian. Define your own text replacement pairs and replace them instantly with a single hotkey. Perfect for inserting special characters, mathematical symbols, or any frequently used text snippets.
- Save Time: Replace
->with→in a single keystroke - Stay Focused: No need to search for special characters or break your flow
- Fully Customizable: Create unlimited replacement pairs tailored to your needs
- Smart Matching: Case-sensitive and whole-word matching options
- Portable: Export and import your settings across different vaults
|
|
|
|
-
Download the latest release files:
main.jsmanifest.jsonstyles.css
-
Create the plugin folder:
<your-vault>/.obsidian/plugins/ez-replace/ -
Copy the downloaded files into this folder
-
Restart Obsidian or reload with
Ctrl+R(Windows/Linux) orCmd+R(Mac) -
Go to Settings → Community Plugins and enable EZ Replace
# Clone the repository
git clone https://github.com/AR0NICA/ez-replace.git
cd ez-replace
# Install dependencies
npm install
# Build the plugin
npm run build
# Copy files to your vault
cp main.js manifest.json styles.css <your-vault>/.obsidian/plugins/ez-replace/-
Open Settings
- Navigate to
Settings → EZ Replace - Or use Command Palette:
EZ Replace: Open settings
- Navigate to
-
Configure Your Hotkey
- In the settings, find "Hotkey Configuration" section
- Click "Configure Hotkey" button
- Set your preferred keyboard shortcut (e.g.,
Ctrl+Shift+R)
-
Try the Default Pairs
- Select
->in your note - Press your configured hotkey
- Watch it transform to
→
- Select
-
Create Your First Custom Pair
- Click "Add pair" button
- Enter source text (e.g.,
alpha) - Enter target text (e.g.,
α) - Start using it immediately!
Adding a New Pair
- Go to
Settings → EZ Replace - Click the "Add pair" button
- Fill in the fields:
- Source: The text you want to replace (e.g.,
->) - Target: The text to replace it with (e.g.,
→)
- Source: The text you want to replace (e.g.,
- The pair is saved automatically
Reordering Pairs
- Use ↑ and ↓ buttons to move pairs up or down
- Place frequently used pairs at the top for faster matching
- Changes are saved automatically
Advanced Options
Click the ⚙️ (gear icon) on any pair to access:
- Description: Add a note about what this pair does
- Case Sensitive:
ON: "Hello" and "hello" are differentOFF: Matches regardless of case
- Whole Word Match:
ON: "cat" won't match in "caterpillar"OFF: Matches anywhere in text
Note: EZ Replace does not set a default hotkey. You must configure one before using the plugin.
Method 1: From Plugin Settings
- Open
Settings → EZ Replace - Look for "Hotkey Configuration" at the top
- Click "Configure Hotkey"
- Set your preferred key combination (e.g.,
Ctrl+Shift+R)
Method 2: From Obsidian Hotkeys
- Open
Settings → Hotkeys - Search for
EZ Replace - Find "Replace selected text"
- Click to modify the hotkey
Exporting Your Settings
- Go to
Settings → EZ Replace - Find "Backup & Restore" section
- Click "Export to JSON"
- A file named
ez-replace-backup-YYYYMMDD-HHMM.jsonwill be downloaded
Use Cases:
- Backup before major changes
- Share configurations with others
- Sync across multiple vaults
Importing Settings
- Click "Import from JSON"
- Select your backup file
- Choose import mode:
- Replace: Remove all current pairs and use imported ones
- Merge: Keep current pairs and add imported ones
- Confirm your choice
The plugin includes these ready-to-use pairs:
| Source | Target | Description |
|---|---|---|
-> |
→ |
Right arrow |
<- |
← |
Left arrow |
=> |
⇒ |
Double right arrow |
!= |
≠ |
Not equal |
Import example-pairs.json for 10 additional useful pairs:
View example pairs
| Source | Target | Description |
|---|---|---|
>= |
≥ |
Greater than or equal |
<= |
≤ |
Less than or equal |
alpha |
α |
Greek letter alpha |
beta |
β |
Greek letter beta |
infinity |
∞ |
Infinity symbol |
(c) |
© |
Copyright symbol |
When you export settings, the file structure is:
[
{
"id": "unique-identifier",
"source": "->",
"target": "→",
"enabled": true,
"description": "Right arrow",
"caseSensitive": true,
"wholeWord": false
}
]Manual Editing Tips:
- Create bulk pairs by copying the structure
- Use a JSON validator to check syntax
- Create category-specific files (e.g.,
math-symbols.json,greek-letters.json)
The plugin registers these commands in the Command Palette (Ctrl+P):
| Command | Default Hotkey | Description |
|---|---|---|
Replace selected text |
Ctrl+Shift+R |
Replace the selected text with matching pair |
Open settings |
None | Quickly open plugin settings |
# Install dependencies
npm install
# Development mode (watch for changes)
npm run dev
# Production build
npm run buildez-replace/
├── src/
│ ├── main.ts # Plugin entry point
│ ├── settingsTab.ts # Settings UI
│ ├── settings.ts # Default settings
│ └── types.ts # Type definitions
├── styles.css # Plugin styles
├── manifest.json # Plugin metadata
├── example-pairs.json # Example configurations
└── README.md # Documentation
Replacement not working
- Check if the pair is enabled (toggle should be ON)
- Verify exact text match (check case sensitivity)
- Ensure text is selected before pressing hotkey
- Check if another plugin is using the same hotkey
Import failed
- Verify JSON file format is correct
- Check that each pair has
sourceandtargetfields - Try a fresh export to ensure valid format
Hotkey not working
- Check for conflicts in
Settings → Hotkeys - Try setting a different key combination
- Restart Obsidian after changing hotkeys
Initial Release
- Text replacement with customizable hotkey
- Replacement pairs management (Add, Edit, Delete, Reorder)
- Enable/disable individual pairs
- Advanced options (Case-sensitive, Whole word matching, Description)
- JSON Export/Import (Replace & Merge modes)
- Hotkey configuration UI with quick access to settings
- Clean implementation following Obsidian best practices
- No default hotkey - user must configure their preferred shortcut
Contributions are welcome! Please feel free to:
- Report bugs or suggest features via GitHub Issues
- Submit pull requests for improvements
- Share your replacement pair collections
- Translate documentation to other languages
MIT License - feel free to use and modify as needed.
If you find this plugin helpful, consider:
- Starring the repository on GitHub
- Sharing it with other Obsidian users
- Contributing to the project
Made with ❤️ for the Obsidian community