Please add a "repeat last command" command and keybinding, as sometimes found in other other apps, e.g. Microsoft Office.
I want to press a shortcut, and for it to repeat whatever the last command was, so I don't have to find it again in the menu or the ctrl-shift-p box.
This is especially useful when doing a lot of editing.
One thing that I don't think is super clear from the description of this issue is that what I think should be added is the ability to re-run the last command, no matter where it originated from. I wouldn't want it to just "re-run the first command that shows up in the command palette" because that won't always be the last command you ran. For example, hitting "CMD+W" to close an editor doesn't show up in the command palette as the "last command", but that's what I'd _want_ to be the last command if this feature was implemented.
I'm closing this as this functionality is available - ctrl-shift-p already shows the last command, so just pressing enter performs this task.
@macintacos Please open another issue for that, it's quite different.
@lonix1 while I will end up creating another issue for what I described, why close this one? There _isn’t_ a command to re-do the first command that shows up when you hit “Ctrl+shift+p”, so I’d argue that this functionality is still not available in the way that you initially described. There’s no way to map a shortcut to execute the last command you ran (ignoring my requirements that I mentioned in my previous comment), is there?
ctrl-shit-p and enter - repeats the last command
But that's not really a standalone command to redo the last action, that just happens to be the way the command palette works.
I had thought that this issue was covering "there should be an explicit command in VSCode to execute the last command", one that presumably you could map at will so that it can be a completely different shortcut than pressing ctrl-shift-p and then hitting "enter" (which is one more key than I'd want to be honest).
I guess I'll open another issue that asks for that, but it's just going to look like a duplicate of this one.
ok
I agree with @macintacos, an explicit action with this behavior would be more convenient (to map it to a concrete shortcut at your will).
Is there any expectations or ideas on this?
Ctrl-shift-p + enter works if the command did not have arguments. Otherwise the argument selection needs to be repeated. Would be great to have a shortcut that just repeats the last command as previously executed.
Most helpful comment
But that's not really a standalone command to redo the last action, that just happens to be the way the command palette works.
I had thought that this issue was covering "there should be an explicit command in VSCode to execute the last command", one that presumably you could map at will so that it can be a completely different shortcut than pressing
ctrl-shift-pand then hitting "enter" (which is one more key than I'd want to be honest).I guess I'll open another issue that asks for that, but it's just going to look like a duplicate of this one.