Vim not behaving properly in server

帅比萌擦擦* 提交于 2019-12-11 18:42:33

问题


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.

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

What's the reason for this?


回答1:


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



来源:https://stackoverflow.com/questions/54055316/vim-not-behaving-properly-in-server

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!