3 ms·
As a Vim user, I've always been drawn toward using vi keybindings in bash. However, as a Mac user, all of the Cocoa text widgets more or less support emacs key
by erikcw 14y ago
As a Vim user, I've always been drawn toward using vi keybindings in bash.
However, as a Mac user, all of the Cocoa text widgets more or less support emacs keybindings, so having a working knowledge of basic emacs movement commands has been very useful.
The emacs bash/readline keybindings also have a really neat trick that the vi bindings don't -- keyboard macros!
Ctrl-( to start recording, Ctrl-) to stop, and Ctrl-x to execute.
- nickkthequick 14y agoHow is Ctrl- different from using "q" in vi?
- babarock 14y agoIt's a matter of muscle memory. I used Vim exclusively for several years, and used vi-mode on my shells. Now that I've switched to emacs, my fingers are more comfortable using Ctrl-<key> for commands.
- erikcw 14y agoAt least for me, macros don't work in Bash vi-mode. Perhaps it is only implemented in emacs-mode? Or maybe it is the readline version I have in OSX.