Tips for using vim over a slow connection?

2019-01-22 19:39发布

I'm using vim over a slow connection and it is a little painful. Is there anything I can do in vim to alleviate the pain?

标签: vim ssh vi
15条回答
一夜七次
2楼-- · 2019-01-22 20:29

One can dull the pain a wee by using shortcuts to move up and down the file and along the lines, but as I have experienced often, doing anything on a slow connection is very painful. I find that when it is possible I can save a lot of time and frustration by scp'ing the file over to my workstation, editing it there peacefully, and loading it back.

查看更多
爱情/是我丢掉的垃圾
3楼-- · 2019-01-22 20:30

My recommendation is to turn off syntax highlighting in vim. Particularly for large files, this makes vim respond much faster for me. (:syntax off)

Edit: This might also help, from the vim documentation:

http://www.vim.org/htmldoc/term.html#slow-fast-terminal (it looks like the suggestions posted already have some of the things from this doc)

查看更多
Bombasti
4楼-- · 2019-01-22 20:36

Use mosh: http://www.linuxscrew.com/2012/04/11/why-mosh-is-better-than-ssh/?replytocom=804158#respond

apt-get install mosh
yum install mosh
(or whatever appropriate command for your system)

And then just use "mosh" instead of "ssh".

It was designed for slow connections, and from a quick test over my slow 3G connection, to a server, it seems to support it quite well.

NB When connecting to a non-standard port, be sure to update /etc/ssh/ssh_config

查看更多
登录 后发表回答