Opening editor while the edit mode is vi in Readli

2019-09-17 04:39发布

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条回答
【Aperson】
2楼-- · 2019-09-17 04:45

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

查看更多
登录 后发表回答