Hebun
Hebun

Reputation: 41

vim remote editing: ftpplugin or remote vim over ssh

I'm new to vim. And am little confused about editing remote files. It has built-in ftp plugin and also is installed on remote server. Which way should I go with ? I have noticed that with ftpplugin saving and exploring is slower but editing and navigating is obviously faster. But I dont know which way is better in total.

(If answer is to use local vim then should I mount remote folder or use ftpplugin?)

Upvotes: 3

Views: 999

Answers (3)

Kent
Kent

Reputation: 195079

  • If I would just change a single file, and then I am done with my work. I would go: vim scp://... (with ssh key authentication)

  • If I need to change many files, and then do some other stuff on that server. e.g. file operation(cp, mv...) or some server management (apache/jboss/.. start, restart...) I would ssh into the server.

  • If I need to do some programming on a remote server directly (rarely happened), I would ssh in to the server as well.

  • If a mount is anyway there on your local machine, then why not just use it?

P.S. maybe irrelevant to your question, but I would mention that if you ssh into remote server and work, screen/tmux would help you a lot!

Good luck.

Upvotes: 1

orolo
orolo

Reputation: 3951

I ended up mounting my external servers and then using vim locally. Yes, there is a slight lag when saving but really, not that slow. Also, having all of my bindings, plugins and themes available really made the choice obvious.

Upvotes: 0

Neil Forrester
Neil Forrester

Reputation: 5241

I'd say it's personal preference. Vim over ssh has always worked fine for me, though it would probably not be a good idea over a high latency connection, such as a satellite link, or crappy wi-fi.

Upvotes: 0

Related Questions