如何在iTerm2 Vim上退出备用屏幕滚动? [英] How to exit alternate screen scrolling on iTerm2 Vim?

查看:382
本文介绍了如何在iTerm2 Vim上退出备用屏幕滚动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,对不起,如果标题不准确.在Mac iTerm2上使用Vim时,我处于一种奇怪的情况.更准确地说,当我松开两根手指时,它会向下滚动3行.

First, sorry if the title isn't precise. I'm in a weird situation, while using Vim on Mac iTerm2. More precisely, when I release two finger click it scrolls down 3 lines.

https://bugs. debian.org/cgi-bin/bugreport.cgi?bug=683942 及其称为备用屏幕滚动".

Sort of same thing is mentioned at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=683942 and its referred as "alternate screen scrolling".

在这种情况下我该怎么办?好吧,我在一个远程ssh会话中,只是关闭了Macbook,将其放在书包中,然后去吃了午饭.当我回来时,我经历了这个奇怪的事情.

How do I came in this situation? Well, I was in a remote ssh session and just just closed macbook, put it on bag and went to lunch. When I came back I experienced this strange thing.

我可以关闭滚动历史记录"功能吗?在iTerm2中.

它仅在iTerm2上发生,而不在终端上发生.

It only happens on iTerm2, not on Terminal.

那么我如何退出备用屏幕?

So how do I go out of alternate screen?

推荐答案

类型

tput rmcup

(假设vim使用终端描述切换到备用屏幕),或者

(which assumes that vim used the terminal description to switch to the alternate screen), or

printf '\033[?1049l'

做出更少的假设.

进一步阅读:为什么在运行vi时屏幕无法清除?

这篇关于如何在iTerm2 Vim上退出备用屏幕滚动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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