Is there a way to repeat the last command used or text typed?

I’ve seen one topic in feature requests, Repeat Last Command, but the two plugins mentioned don’t appear to do what I’m looking for, and the one personal tool no longer exists on GitHub.

While there is “Redo”, all that does is cycles back a command/edit that was removed by Undo.

What I’m looking for is a “Repeat” command, akin to that found in Office or LibreOffice, which can then be hooked to a hotkey for easy repetition of a formatting command to different selections that are not otherwise easily targetable by a more global find & replace. And I can’t seem to find that in either core or community plugins, at least not with the search terms I’m using.

For instance, I have a document that I have written out without any major formatting, but it has sections that have headers, but no heading format has been applied to them (or they are inconsistent).

I select the first header, apply Heading2 format to it, now I go and select the next header and simply hit a hotkey assigned to “repeat”, and it applies the last explicit command (in this case, Heading2) to the selection, and I select the next, and hit the hotkey, ad infinitum, until I use some other command

This allows me to focus on a singular editing function without having to either set a hotkey for every potential formatting function, or having to constantly move the mouse & select multiple commands to repeat one format multiple times.

Alternately, is there a way to multi-select text, akin to Ctrl-select multiple non-adjacent pieces of text, such that one command can then be used to apply a format to all of them?

See Multiple cursors - Obsidian Help and Editing shortcuts - Obsidian Help

For example on mac Cmd + Shift + Left selects the entire line to the left of cursor. You can also triple left click to select paragraphs. If you hold option while triple left clicking then it should add an extra cursor. You can left click with option to cancel individual cursors. Left click to cancel all multi cursors. You can also drag with option to introduce multi cursors.

Quick Switcher++ offers command mode which displays list of recently used commands.

Doh! It’s ALT on PC. I was looking for “Multiple Selections” not “Multiple Cursors”.

Thank you!

I’ll take a look at Quick Switcher++ to see if that Recents List can do what I want.