问题
I have set my readline mode to be vi in my ~/.inputrc
set editing-mode vi
I came to know that when you are in command mode, you can press v to open up current line in the editor defined in $EDITOR
variable.
This works for me. But when I change the content in my editor, I am not sure how to get those changes back to my command line. How to do that?
回答1:
After you make your changes just save and quit. The command will be executed after you quit. If you want to look at the command after you have executed it you can just push up.
If EDITER=vim
or EDITOR=vi
use :wq
to save and quit
来源:https://stackoverflow.com/questions/16995399/opening-editor-while-the-edit-mode-is-vi-in-readline