什么设置可以阻止“vi”退出后显示编辑窗口?
我试图寻找答案,但也许我的问题表述错误,我找不到答案。
所以,在我自己的Linux环境中,当我退出“vi”时,编辑窗口的内容保留在shell窗口中。我无法向上滚动查看输入“vi”之前输入的先前命令。我曾经在某些环境中(作为不同的用户),一旦退出“vi”,vi 命令就会显示为一个常规命令行,跟在我之前键入的所有命令之后。我试图寻找我喜欢的这种行为的背景,但我找不到。有人可以帮我吗?
I tried to search the answer, but maybe I'm phrasing the question wrong, I couldn't find it.
So, in my own Linux environment, when I exit "vi", the content of the editing window stays in the shell window. I cannot just scroll up to see the previous commands I typed before entering "vi". I've been in some environment (as a different user) where once I exit "vi", the vi command just shows as one regular command line following all the earlier commands I typed. I tried to look for the setting for that behavior, which I liked, but I couldn't. Can someone please help me?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
它本身不是一个
vi
设置;它位于您使用的 terminfo 条目中 ($TERM
)。检查您的其他用户为$TERM
设置的内容,并将其与您设置的内容进行比较。然后,更改您的 TERM 值,或修改您使用的终端条目。infocmp
反编译终端条目;tic
编译它们。如果您无法修改系统(或者在测试修改时),您可以创建自己的目录来保存该条目:等等。
It isn't a
vi
setting per se; it is in the terminfo entry you use ($TERM
). Check on what your other user has set for$TERM
, and compare that with what you have set. Then, either change your TERM value, or modify the terminal entry you do use.infocmp
decompiles terminal entries;tic
compiles them. You can create your own directory to hold the entry if you can't modify the system one (or while you are testing your modifications):Etc.
它位于更改设置/终端/功能/禁用切换到备用终端屏幕下。
It's under Change Settings/ Terminal/ Features/ Disable switching to alternate terminal screen.