Vim在服务器中无法正常运行 [英] Vim not behaving properly in server

查看:79
本文介绍了Vim在服务器中无法正常运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在Redhat服务器中打开文件时,当我上下移动鼠标或进入插入模式并进行编辑时,vim会显示类似的内容里面的内容也变得混乱了.

When I open the files in my redhat server vim is displaying something like this when I move the mouse down/up or when I go to insert mode and edit Also the contents inside gets jumbled up.

我还观察到,只有当我使用我的Expect脚本SSH到服务器时,它才会发生.

I also observed that it happens only when I ssh to server using my expect script.

这是什么原因?

推荐答案

我相信这是由于您在 interact 之后调整了终端窗口的大小而引起的.根据期望书,您可以在 spawn :

I believe it's caused by you resizing the terminal window after interact. According to the Expect book, you can add the following code after spawn:

trap {
  set rows [stty rows]
  set cols [stty columns]
  stty rows $rows columns $cols < $spawn_out(slave,name)
} WINCH


这篇关于Vim在服务器中无法正常运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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