A powerful Obsidian plugin for lightning-fast text replacement with customizable word pairs and auto-complete suggestions
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 - Auto-Complete: Get suggestions as you type with smart matching
- 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
Getting Started with Auto-Complete
- The suggester is enabled by default
- Start typing any source text (e.g., type
alforalpha) - Suggestions appear automatically after minimum characters (default: 2)
- Press Tab or Enter to accept a suggestion
- Continue typing normally to ignore suggestions
How it works:
- Suggester scans your enabled replacement pairs
- Shows matches based on your matching mode (prefix or fuzzy)
- Updates in real-time as you type
- No need to select text first!
Configuring Suggester Settings
Go to Settings → EZ Replace → Auto-complete suggester section:
Enable auto-complete
- Toggle on/off to enable or disable the suggester
Minimum characters (1-5)
- How many characters you need to type before suggestions appear
- Lower = more suggestions, Higher = more precise
Maximum suggestions (3-10)
- Limit how many suggestions to display at once
- Prevents overwhelming the popup
Matching mode
- Prefix matching: Matches from the start of source text
- Type
al→ matchesalpha,alt, but notmetal
- Type
- Fuzzy matching: Matches characters in order anywhere
- Type
al→ matchesalpha,animal,total - Scored by relevance (start matches rank higher)
- Type
Show descriptions
- Display description text in the suggestion popup
- Helps identify what each replacement does
Case sensitive matching
- Match source text with exact case
- When off,
ALandalare treated the same
Confirmation keys
- Tab and Enter (default): Both keys accept suggestions
- Tab only: Only Tab accepts, Enter creates new line
- Enter only: Only Enter accepts, Tab inserts tab space
Tips for Best Results
- Use descriptive source text - Short, memorable abbreviations work best
- Adjust minimum characters - Set to 1 for very short sources, 3+ for longer ones
- Try fuzzy matching - Great for finding pairs when you don't remember exact spelling
- Customize accept keys - Choose what works for your workflow
- Markdown editing: Tab+Enter both work well
- Code editing: Tab-only avoids accidental replacements on new lines
- Disable when not needed - Toggle off for pure manual replacement mode
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
Auto-Complete Suggester Release
- NEW: Auto-complete suggester - Get real-time suggestions as you type
- Prefix matching algorithm - Match from the start of source text
- Fuzzy matching algorithm - Match characters in order with intelligent scoring
- Customizable suggester settings - 7 configuration options:
- Enable/disable toggle
- Minimum characters (1-5)
- Maximum suggestions (3-10)
- Matching mode (prefix/fuzzy)
- Show descriptions toggle
- Case sensitive matching
- Confirmation keys (Tab/Enter/Both)
- Tab and Enter key support - Accept suggestions with your preferred key
- Smart suggestion rendering - Shows target, source, and optional description
- Real-time suggestion updates - Updates as you type with no lag
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