4 ms·
For the record, you can do this with C-x C-e without vi keybindings
by bnegreve 7y ago
For the record, you can do this with C-x C-e without vi keybindings
- pknopf 7y agoThe more I read these comments/suggestions, the more I realize I'm bash'ing like a child. I seriously need to embrace my shell a little more.
- rmetzler 7y agoSame for me. I knew the bash has emacs bindings and I know just enough to go to beginning, end, delete a word, etc. but I never knew you can start emacs with a shortcut like this. How do you even exit emacs properly?
- bnegreve 7y agoC-x C-s to save, C-x C-c to quit. But you can also control which editor is going to be used to edit your command line by setting the EDITOR environment variable. It also works for git, and other commands that need to spawn editors.
- m463 7y agoI never knew that existed. My first thought was "emacs editing characters already work on the command line." Then I thought, maybe there are commands you want to be really really sure of before submitting them? Then I realized I very frequently use very long commands with loops and pipes that might benefit, like: for i in *.py; do mv $i AA_$i; done or a little of both: find . -type f |while read f; do if cmp -s "$f" ../new/"$f"; then rm -f "$f"; fi ;done (thanks!)