问题描述
我经常在vi中工作,挂起vi,在cli上运行某些命令,然后fg回到vi以处理结果.例如,修复我运行cli命令时出现的错误.
I often work in vi, suspend vi, run something on the cli, and then fg back into vi to work on the results. For instance, fixing errors that showed up when I ran the cli command.
但是,当我fg vi时,vi会擦除"当前的终端缓冲区,而在回滚缓冲区中看不到终端输出的最后一屏".
However, when I fg vi, vi "wipes" the current terminal buffer and I can't see the "last screenful" of terminal output in the scrollback buffer.
vi(或屏幕,我使用屏幕)中是否有一些设置对我有帮助?
Is there some setting in vi (or screen, I use screen) which would help me here?
我已经搜索了很长时间的Google,没有任何答案.我还意识到,还有其他工作流程可以解决此问题,但它们并不是完美的(从vi内部运行意味着没有外壳程序完成等).
I have searched google for a long time with no answers. I also realize that there are other workflows that solve this problem, but they aren't perfect (run from inside vi means no shell completion, etc).
推荐答案
如果您使用的是screen
,那么一定要在一个窗口中进行编辑,然后在另一个窗口中进行编译,然后使用^A[n]
序列在终端输出和代码屏幕之间切换?
If you're using screen
, then surely it would make sense to do your editing in one window, and your compiles in the other, and then just use the ^A[n]
sequences to flip between your terminal output and code screens?
这篇关于您可以将vi“提前"进行吗?屏幕何时打开?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!