How to apply a specific pattern to the whole document via Hotkeys (command palette) #48
-
|
Hi again, I've created a pattern named "Replace abc with def" and I want to apply that to a whole document via command palette (in particular via Hotkey). Current, I have to call "Apply Patterns: Apply pattern to whole document" and then select the pattern. However, my goal is to have a hotkey to run the pattern to the whole document. Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
In the bottom of the Settings, we have a the Commands Section. In the Commands section you can define one or more Patterns to a specific Command.
That's the path to trigger a pattern from a hotkey using Commands. I hope it helps 🙏 |
Beta Was this translation helpful? Give feedback.
@FelipeRearden, thank you for explaining!
@e-alizadeh, I'm sorry to hear you've been having trouble!
If your pattern is named "Replace abc with def", then (1) copying the text below to your clipboard, (2) going into the Apply Patterns settings, (3) Clicking "Import" under the Commands section at the bottom of the settings page, and (4) reloading / re-starting Obsidian should add a command to the Command Palette. In addition, the Pattern itself must have at least one Rule within it to show up in the Command Palette.
To confirm, does this work for you?
The text to copy: