Aliases for Commands in Command Palette

I’d love to have the ability to create aliases for certain commands. Just like with note names, when you ctrl + O and type something with a certain note in mind, and it doesn’t come up, it’s a fantastic cue that you should add that to the aliases for that note. It works extremely well for me.

The Problem

I am finding that I have the same event occur when I want to run certain commands with ctrl + P. Particularly, I always get hung up on the “Periodic Notes: Open daily note” command, and I often try typing “today” instead.

Aliases are really great in many contexts. Another example is bookmark nicknames in a browser. Typing a specific, short phrase, can quickly get you to a specific bookmark.

Yes, I could bind a hotkey, and a hotkey would be slightly faster. But conceptually, aliases cement in my mind and my memory so much easier, especially when there are too many options to be bound to a limited amount of keys and abstract key combinations. Aliases are also just more flexible, and take a lot less commitment when you want to make part of your workflow a tad faster.

The current behavior and UI appearance with aliases in the file open dialog is perfect right now, and I think it should look exactly the same in the command palette.


:white_check_mark: :fire: :white_check_mark:


:frowning:
As you can see, the command still comes up as the second result, only by chance thanks to fuzzy searching. I want to be able to type “today” and hit enter, and always know that it does the command I want it to do.

The solution

Adding this feature would also mean needing a menu to view and set aliases. I think this would naturally belong quite well in the “Command palette” section in the settings dialog.

The bare minimum features:

  • See a list of currently set aliases
  • Change an alias name or command
  • Delete an alias
  • Add new aliases

When adding a new alias, I’d like to be able to select a command with the same fuzzy search selection style of the command palette. I don’t really think there’s need for anything more fancy than that to create a really useful new feature.

This would be a nice feature to have! I rather liked RemNote’s approach to it.

[deleted part of post, ignore]

A hacky workaround could be achieved with the Better Command Pallette plugin.
Create a macro with the name that you want the alias to have → Add the command that you want the alias to lead to, set delay to zero.
(It’s hacky because it’ll lead to cluttering of the command palette, and because the name will be on a equal level in search priority as the other command names, but should function well enough otherwise.)

Woah, that plugin (you deleted??) is actually something else I was thinking about separately! There’s a very similar plugin in Neovim called whichkey for keychord bindings (press one key followed by another key). When you press the “leader” key for a keychord, if you don’t press a follow up key within say 200ms, a little window will pop up showing you all the sub bindings for that leader key, with the key and a comment. It even works for nested “menus” as far as you want, and you can go back with backspace. But, if you have the chord memorized and you type it fast enough, the menu never shows up at all! But still SO useful for the stuff you don’t have memorized yet.

Many actions are bound under the space key, which is handy for vim users.

After pressing space


Then g

I’ve been thinking about replicating this behavior in Obsidian, and the plugin you linked seems to be quite close to that, so thanks for sharing!

I still want my aliases though. :stuck_out_tongue:

The Better Command Palette solution would definitely work! But not ideal for sure. And it doesn’t have the really nice combined entry for aliases like in the file switcher.

(sorry for getting slightly off-topic)

I deleted it because I realised it wasn’t quite about aliases. But I’m glad you found it useful. :slight_smile:

A small delay between pressing the “leader key” (which is a key combination in this case) and the window popping up, would definitely be an improvement. Or even an option to make the window not show up at all.

Do let me know if you modify it to make that happen!

Workaround:
use GitHub - AlexBieg/obsidian-better-command-palette: A better command palette for obsidian
and create a macro with the alias you want

I was looking around for something similar and found multiple plugins. I provide the list from here:

My problem with using either one of these is that they interfere with normal typing.
So if I set in e.g. Sequence Hotkeys ‘ctb’ for ‘command: toggle blockquotes’, I cannot write “can”, or “cusp” in normal typing mode because only “an” and “usp” will be entered as text.

I created my own plugin to get this functionality. Compared to some of the alternatives in zanodor’s link, it’s most similar to Key Sequence Shortcut but 1. commands with the same prefix key are grouped into a single item in the popup menu, and 2. the configuration file is easier to edit (IMO).

I would like to second this!

Allowing user to set an alias for certain commands could be really useful and could speed up the workflow.

Hi everyone, I have made a new plugin as a workaround of this issue, basically, it could:

  • Add one or more string as alias of a command.
  • Provide a command to execute other command by alias.

The experience is the same as using the original command palette after setting a hotkey for the “Execute by alias” command.

Below is the link to the plugin on github:

You’ve linked the same thing twice, but I found the other project. I like the style and appearance of yours better. I use Vim bindings in Obsidian and I do use a similar workflow in my Neovim environment (using AstroNvim config). I might try this out.

Nicely done, but having to use a separate command to open the alias entry window is a dealbreaker for me. I must have something that is directly integrated in the normal Command Pallet.

Use case or problem

I use the command palette as my primary interface in Obsidian, because I can’t realistically assign hotkeys to everything I run frequently. There aren’t enough comfortable key combinations, and a hotkey I use twice a week never sticks in memory. So instead I type out fragments of the command name, scan the result list, and confirm the right hit before pressing Enter. That’s several hundred milliseconds and a small attention tax on every invocation, repeated dozens of times a day. The names themselves are also long and often prefixed with the plugin name, so what I type rarely matches how I think about the command. I also run a plugin-free vault by choice, so palette ergonomics are entirely what Obsidian ships.

Proposed solution

Since commands can already be bound to custom hotkeys, and the palette already searches over command names, I’d like to be able to define a custom alias for any command, a short token that resolves deterministically to it:

  • Move current file to another folder → mv
  • Insert template → it
  • Open today’s daily note → td

Behavior I’d expect:

  • Alias matches rank above name matches, so typing an alias always puts that command first
  • The alias is shown on the command row in the palette, like note aliases in the quick switcher
  • Multiple aliases per command are allowed; duplicates are flagged

Aliases are managed in Settings → Command palette, choosing the target command with the same fuzzy picker the palette uses.
Crucially this should work in the normal command palette rather than in a separate “run by alias” entry point. The value comes from not having to decide in advance whether I’m searching or recalling.

Current workaround (optional)

None, deliberately. I run a plugin-free vault: every community plugin is a distraction surface and a stability/maintenance liability I’ve chosen not to take on, and I want my vault to keep working unchanged across versions and devices.
I’m aware of the plugin-side options (Better Command Palette macros, Aliasor, Advanced Command Palette). Two of them add a second entry point or a parallel palette rather than extending the built-in one, and the macro approach clutters the palette with duplicate entries that compete with the real command in search. But the deeper point is that aliasing is a text-matching tweak to a core UI surface — the kind of small ergonomic affordance that quick switcher note aliases already set the precedent for. It seems out of proportion to require a plugin, and its own update treadmill, to get it.
So my current workaround is simply typing more characters and visually confirming every hit.

Related feature requests (optional)

Command Palette Aliases - t/command-palette-aliases/46833
Command palette: Ability to type arguments to commands - t/command-palette-ability-to-type-arguments-to-commands/26477