Question: For typed in commands invoked via M-x I am having difficulty understanding how Emacs allows recalling and rerunning the commands. The command-history works quite differently from Vim. It puts the commands in a buffer rather than the "minibuffer".
Is there a way to get something similar to Vim's approach (i.e., previously typed commands can be scrolled through simply using the arrow up-down keys)?
Emacs and Vim User Interface Vim uses editing modes - most commonly the command mode and insert mode. Vim aims to minimize the number of keystrokes that a user has to press, because vi, upon which Vim is based, was designed to be used over slow terminals.
Emacs is a class of feature-rich text editors, usually characterized by their extensibility. Emacs has over 1,000 editing commands. It also allows the user to combine these commands into macros to automate work.
Vim uses editing modes - most commonly the command mode and insert mode. Vim aims to minimize the number of keystrokes that a user has to press, because vi, upon which Vim is based, was designed to be used over slow terminals.
The name "Vim" is an acronym for "Vi IMproved" because Vim was created as an extended version of the vi editor, with many additional features designed to be helpful Vim uses editing modes - most commonly the command mode and insert mode.
C-x ESC ESC
, C-x M-ESC
, or C-x M-:
puts your history in the minibuffer, after which you can scroll back and forth as you like with the arrow keys.
M-x list-command-history
puts the whole history in a buffer from which you can execute commands.
C-x z
repeats the last command.
Look at EMACS manual (info) section 8.5 Minibuffer History.
M-p and M-n are the canonical history navigation keys in GNU software. Emacs is no exception; this works nearly everywhere where you can type something.
In the case of extended commands ("M-x commands"), hit M-x, then navigate freely throughout the history. You can also do a reverse history isearch with C-r, as in bash.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With