Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vim remote editing: ftpplugin or remote vim over ssh

Tags:

linux

vim

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?)

like image 915
Hebun Avatar asked Jul 30 '26 00:07

Hebun


1 Answers

  • 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.

like image 198
Kent Avatar answered Aug 01 '26 07:08

Kent



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!