在gnu屏幕上使用vim或更少的病毒时,退出vim或更少的病毒会留下持久的烙印 [英] When using vim or less in gnu screen, quitting vim or less leaves a lingering imprint

查看:79
本文介绍了在gnu屏幕上使用vim或更少的病毒时,退出vim或更少的病毒会留下持久的烙印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在新的Ubuntu系统上,我启动了一个屏幕会话,并在vim中编辑文件或用更少的时间查看文件.我退出后,屏幕不会自动重绘,而只是向上滚动以在我刚刚在vim或更低版本中查看的所有内容下显示一个命令行.

On my new Ubuntu system, I start a screen session and edit a file in vim or view it in less. After I quit, the screen doesn't redraw itself, but simply scrolls up to show a command line under all the stuff I was just viewing in vim or less.

如何更改此设置,以便退出vim可以使我回到调用vim之前的状态?

How can I change this so that quitting vim will return me to the screen the way it was before I invoked vim?

推荐答案

屏幕的altscreen(备用屏幕)功能默认情况下处于关闭状态.

screen's altscreen (alternate screen) feature is turned off by default.

将此添加到您的.screenrc:

altscreen on

请参阅: http://www.gnu.org/software/screen/manual/screen.html#Redisplay

这篇关于在gnu屏幕上使用vim或更少的病毒时,退出vim或更少的病毒会留下持久的烙印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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