Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vim scrolling slow on tmux over ssh

Tags:

vim

ssh

tmux

I have recently been trying out tmux on my server as a replacement for byobu (screen). When I started editing some code on vim, I found it very laggy when I held on to j and k to scroll up and down.

I thought it might be because there was something wrong with my connection but I tried editing the same file on vim without tmux and I found it much more responsive with almost no lag.

So, is there anything I can do to make vim on tmux not lag?

like image 918
nafis Avatar asked Apr 14 '12 09:04

nafis


1 Answers

It sounds like you are using tmux over ssh. If so, you may want to give mosh a try. It is built on top of ssh but with many advantages over ssh. One of them is:

Get rid of network lag.

SSH waits for the server's reply before showing you your own typing. That can make for a lousy user interface. Mosh is different: it gives an instant response to typing, deleting, and line editing. It does this adaptively and works even in full-screen programs like emacs and vim. On a bad connection, outstanding predictions are underlined so you won't be misled.

It worked much better than over ssh in my experience.

like image 186
K Z Avatar answered Oct 13 '22 10:10

K Z