microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.86k stars 29.51k forks source link

Support customisable alias for commands in command palette #50836

Open swhib opened 6 years ago

swhib commented 6 years ago

Is there a way to define an alias for a command so that the command can be called under multiple different names (original name and the alias)?

This is useful in different cases:

I think I'm not the only one who likes such a feature: When I used emacs I checked quite a few popular user configurations that users keep on github. A lot of these contain aliases by using the command (defalias ...) - including popular/influential ones like spacemacs, abo-abo's oremacs, the config of the emacs maintainer ...

This has been asked on Reddit and stackoverflow without any useful answer.

aghArdeshir commented 5 years ago

Nice idea 😀 It would be great for changing New Folder to mkdir and New File to touch 👍

vscodebot[bot] commented 4 years ago
This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our [documentation](https://aka.ms/vscode-issue-lifecycle). Happy Coding!
vscodebot[bot] commented 4 years ago
:slightly_smiling_face: This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our [documentation](https://aka.ms/vscode-issue-lifecycle). Happy Coding!
ArturoDent commented 3 years ago

I made an extension command alias which allows you to set up aliases for commands and have those aliases show up in the Command Palette. For example, this setting:

 "command aliases": {
    "explorer.newFile": "touch",
    "explorer.newFolder": "mkdir"
  },

would produce a touch and a mkdir listing in the command palette. You can even have more than one alias for the same command.

For these settings changes to propagate to the command palette I believe it is necessary for a reload as the readme explains.

jahands commented 1 month ago

I would love this!! I use aliases a lot with Raycast. It's annoying having to type out commonly used commands (that I don't really want shortcuts for.)