Skip to content

User configurable menus #9285

Open
Open

Description

We now allows extension writer to contribute menu items. The next logical step is to allow user to configure their menus - this is analog to the keybindings-story. One idea is to have a menus.json file which defines your menus:

{
  "editor/context": [
  {
    "command": "my command",
    "when": "editorHasSelection"
  },
  {
   // more..
  }
  ],
 "explorer/context": [
   // more ...
  ]
}

Activity

  1. added
    feature-request
    on Jul 14, 2016
  2. jrieken commented on Jul 28, 2016

    @jrieken
    ContributorAuthor
  3. ydcoming commented on Sep 8, 2016

    @ydcoming

    This extension adds two new context menus to the Explorer Viewlet:

    • Open New Workbench Here: Opens a new instance of VS Code scoped to the selected folder OR to the folder containing the selected file.
    • Reopen Workbench Here: Reopens VS Code scoped to the selected folder. This feature only works on folders, it has no effect when a file is selected.
      now i want to add two new context menus to the Open New Workbench Here how do i do
  4. ydcoming commented on Sep 8, 2016

    @ydcoming

    Johannes Rieken (@jrieken)
    This extension adds two new context menus to the Explorer Viewlet:

    Open New Workbench Here: Opens a new instance of VS Code scoped to the selected folder OR to the folder containing the selected file.
    Reopen Workbench Here: Reopens VS Code scoped to the selected folder. This feature only works on folders, it has no effect when a file is selected.
    now i want to add two new context menus to the Open New Workbench Here how do i do

  5. BillDenton commented on Jan 11, 2017

    @BillDenton

    I was just about to add a request to add this feature. It would be very useful to be able to extend the file tab menu, or add an additional menu bar. Any idea when this will be done? Thanks.

  6. manad777 commented on Apr 6, 2017

    @manad777

    This feature would be really good.

    Most plugin authors don't use the context menu at all. They expect you to memorize their keyboard shortcuts, or bring up the command palette, search for a command, navigate to it, and press Enter.

    It's way better if you put the power in the hands of the user and let them create their own context menu entries for when plugin devs come up short. That way, you don't need to remember anything, you right-click and select the command you want.

    This especially helps for infrequently used plugins where you can't remember the plugin name or the command name.

  7. JFDu commented on Apr 8, 2017

    @JFDu

    Great ...

  8. ronnyek commented on Aug 16, 2017

    @ronnyek

    I really don't understand how this isn't like priority 1 in vs code. There are like 5 other open requests that seem to suggest the same thing. Debug toolbar placement is just down right infuriating, and placing buttons/other action items down in the status bar is just.... not good.

  9. added
    menus
    on Jan 5, 2018
  10. Xanewok commented on Jul 19, 2018

    @Xanewok
    Contributor

    While trying to include the officially supported „Go to Implementation” in the context menu (in #54317) this came up as a way this should be solved instead.

    Johannes Rieken (@jrieken) Would you be willing to provide more mentoring instructions for the feature? I’d like to tackle this, but I mostly made miniscule PRs against vscode and I’m not that familiar with the codebase. Thanks!

  11. jrieken commented on Jul 19, 2018

    @jrieken
    ContributorAuthor

    Well, there are two kind of PRs. One is that "I kinda know how it should be done but I don't have the time to do it" and others are "I have no clue how to do it". User configurable menus is one of the latter and 'yes' I can coach a PR here but it requires planning on my side. It doesn't make sense for you to start on this while I am super booked with other things because I won't be able to provide useful advise then.

  12. TomasHubelbauer commented on Mar 7, 2019

    @TomasHubelbauer
    Contributor

    I'd like to suggest that Go To Implementation be returned to the context menu. The argument in #27403 (silenced) about it being useful only in a handful of places in a file is not true for C# projects which utilize dependency injection, which is very common for ASP .NET Core and similar.

    I am happy to learn that this option is available in the Go menu, but had it been in the context menu, I would have discovered it months ago. Instead I just assumed it was an OmniSharp limitation.

  13. 20 remaining items

  14. yiliang114 commented on Jan 17, 2023

    @yiliang114
    Contributor

    FYI and yes it isn't the full deal yet but since a few milestones you can hide menu items from toolbar. That helps to main a clean and custom look. See https://code.visualstudio.com/updates/v1_72#_hide-actions-from-tool-bars for the announcement.

    Screenshot 2022-12-09 at 16 08 55

    hi Johannes Rieken (@jrieken), In addition to the actions in the editor that can be hidden, the right-click menu on the file tree or other places can hide this matter. Is there any progress?

  15. starball5 commented on Oct 29, 2023

    @starball5

    #111163 and #106483 got closed as a duplicate of this, but #75930 isn't (instead closed as "out of scope"). Is removing context menu items in or out of scope for this feature request? If it's out of scope here, why is 111163 closed as a duplicate of this? If it's in-scope, why isn't 75930 closed as a duplicate of this?

    And if it's in-scope, how would this feature request support it? Would it be like keybindings.json, where you can prefix something with a "-" to say that that keybinding should be unbound?

    Also, how is the text shown for the item in the context menu configured? Or is it just taken from the command's display name?


    Related on Stack Overflow:

  16. CoronRing commented on May 22, 2025

    @CoronRing

    Really need more support for this functionality, even as simple as a regex option to hide certain configurations. Many extensions add to this menu with duplicated functionality in the command palette. My right-click menu requires serious scrolling to find some common-use functionality without a hotkey.

    I guess an extension-possible bypass of the issue is to define a submenu button as the first option, which contains a list of user-allowed commands, but I doubt its HCI design.

  17. Mystic8b commented on Aug 24, 2025

    @Mystic8b

    Issue created in 2016, oh boy...

  18. iamqiz commented on Aug 28, 2025

    @iamqiz

    2025-2016=9 years passed 😂

  19. fabian-st commented on Aug 30, 2025

    @fabian-st

    Would be really nice to have this

  20. NickScarpitti commented on Nov 6, 2025

    @NickScarpitti

    Glad to see this is already a request, wish it would happen sooner rather than later though.

  21. YikChingTsui commented on Jan 30, 2026

    @YikChingTsui

    Today I opened the context menu, but my mouse slipped and I clicked on "Close saved". Boom, 15 tabs all gone. That was the only time I ever used that entry, so it would be nice if I could hide it. We could also review potentially dangerous items on the context menu and add a bit of friction/confirmation to prevent accidental triggers

    (Ctrl+Shift+T did not restore all of them because some are passively opened since forever like the readme or a private notes file)

  22. Chudroy commented on Feb 23, 2026

    @Chudroy

    Happy 10th birthday to a very basic QoL issue!

  23. PawelWozniak commented on Apr 3, 2026

    @PawelWozniak

    Maybe just start with something simple. Allow hiding menu entries.

    My right-click menu is as long as the height of my monitor. I don't need 70% of those entries. Just allow to hide some. That would already be a huge win.

    Reorganization and submenus can come later.

  24. Klaster1 commented on Apr 3, 2026

    @Klaster1

    Second this. I recently cleaned up my Windows context menus and now these are actually easy and useful. VSCode has exactly the same issue where menus are commons filled with crap you can't control and don't need.

  25. MatheusFS-dev commented on Apr 18, 2026

    @MatheusFS-dev

    I support this. At minimum, users should be able to hide unwanted context menu entries to reduce clutter and prevent accidental clicks.

  26. DatBoi302 commented on May 6, 2026

    @DatBoi302

    Nicolás Garitagoitia (@Chudroy) Insane, can't believe this issue can be that old, and Shashi Kiran (@bshashikiran) obvious valid point feels glossed over.

    While these aren't official solutions, I've found this extensions claiming to allow you to customize your context menu, both adding and removing items from it. One said they used AI to make it, but regardless I'm sure someone can find some use with them, I've yet to test any of them.
    Extension 1
    Extension 2

    That's all I got, see you guys at the 20 year anniversary! 🥳🎉

  27. jasonfirkus commented on May 13, 2026

    @jasonfirkus

    how is this still not a thing 10 years later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    apifeature-requestmenus

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions