Sublime Forum

Is there a command palette history?

#1

Hi people,

I wonder if there exist a command palette history and a command to re-run the last command executed from the command palette. I know there is the command history available in the API, but that’s for all commands. I mean, something similar, except just for the command palette alone.

I like the command palette a lot, just that I feel it’s tedious to re‑type words all the time while in a time range I’m often reusing the two or three same commands. A quick‑panel with just the three or four (no more) last commands selected in the command palette, that’s something like that I’m thinking about (and additionally, a straight way to re‑run the last one).

0 Likes

#2

In a session (e.g. .sublime-workspace or the auto-session in the Data directory), you may find that pretty much all previously entered queries into the command palette are saved. It’s like an ordered dictionary, a list of two-tuples that saves your selection for each query you did.

I do not know how often sessions get updated however.

Furthermore, on ST3 at least the palette always opens with the last run command already selected, including the last query.

0 Likes

#3

Indeed. Just that a shortcut for this, miss me (something like Ctrl+Letter).

I will have a look at the workspace data.

0 Likes

#4

Sorry for reviving the 10-years old thread, but recently I wondered the same. The sublime-workspace file contains a “command_palette” node with a “selected_items” nodes under it, which actually contains the history of commands selected in the Command Palette.
My question is: how can I access the items from this history of commands? I tried different combinations such as Alt+/Ctrl+/Shift+Left, Alt+/Ctrl+/Shift+Up, but none has worked.
Mu guess is the following: as the command history is saved, there should be a way of accessing this history from the Command Palette, right?
Here is the reason: I found myself to repeatedly type the same commands in the Command Palette again and again, so it would be really useful to access the previously used commands by means of some shortcut.

0 Likes