Opening editor while the edit mode is vi in Readline

假装没事ソ 提交于 2019-12-25 11:17:10

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!