Emacs equivalent of the Vim command history (for entering Meta-x commands)

Question: To enter commands called through Mx, I find it difficult to understand how Emacs allows you to revoke and restart commands. Team history doesn’t work like Wim’s. It puts the commands in the buffer, and not in the "minibuffer".

Is there a way to get something similar to the Vim approach (i.e., previously entered commands can be scrolled using the up arrow keys)?

+6
command-line comparison vim emacs history
source share
4 answers

Cx ESC ESC , Cx M-ESC or Cx M-: puts your story in the minibuffer, then you can scroll back and forth as needed using the arrow keys.

Mx list-command-history puts the entire history into a buffer from which you can execute commands.

Cx z repeats the last command.

See the EMACS manual section (information) 8.5 Minibuffer History.

+14
source share

Mp and Mn are canonical history navigation keys in GNU software. Emacs is no exception; it works almost wherever you can print something.

In the case of advanced commands ("Mx Commands"), press Mx, then move freely throughout the story. You can also do a reverse history search with Cr, as in bash.

+4
source share

Call

 customize-group minibuffer 

It will show you the History Length option (the default is 30). If you want to keep history in emacs sessions, see

 customize-group savehist 

You can use the normal up / down arrow keys to navigate the story.

+1
source share

If you want to keep a history of commands (and many other parameters) between emacs sessions, you can use the desktop package included with the emacs distribution

-one
source share

All Articles