在Readline中以vi为编辑模式时打开编辑器 [英] Opening editor while the edit mode is vi in Readline

查看:92
本文介绍了在Readline中以vi为编辑模式时打开编辑器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在〜/ .inputrc

set editing-mode vi 

我知道当您处于命令模式时,您可以按 v $ EDITOR 变量中定义的编辑器中打开当前行。

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?

推荐答案

进行更改后,只需保存并退出即可。退出后将执行该命令。如果要在执行后查看该命令,可以向上推。

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.

如果 EDITER = vim EDITOR = vi 使用:wq 保存并退出

这篇关于在Readline中以vi为编辑模式时打开编辑器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆