Sublime Forum

How to hide commands in Command Palette

#1

Hi all! I have a small gripe which I haven’t been able to find a quick answer to yet, so I hope this community might be of help!

When I type some letters of common commands into the command palette (‘gits’ for example, when I’m trying to get to Git Status in one of my git integrations), the palette often highlights one of the Set Syntax commands. To date I have never wanted to change syntax; presumably this is useful to some but for me it is pure pain, as accidentally confirming causes my whole file to lose its original syntax setting, and then I have to remember what the initial value of that ought to be. Sounds small, I know, but it’s been a real headache!

Is there a way to hide or disable certain commands in the palette search? I’d love to turn all the Set Syntax commands off (after all, there’s a way to switch them in the GUI now by clicking the filetype at bottom right).

Thanks!

0 Likes

#2

Basically the items presented in Command Palette are collected from all Default.sublime-commands files of all packages.

Whether commands are visible or not depends on their implementing commands’ is_visiible and is_enabled methods returning True.

Set Syntax: … commands are built into core ST and can’t be disabled or hidden, afaik.

0 Likes

#3

also ST memorizes the input <-> selected mapping afaik.

0 Likes