I have to edit some files placed on some server I could reach via ssh. I would prefer to edit these files in customized vim
on my workstation (I have not rights to change vim
settings on remote server). Sometimes I would like to edit a file with sublime text
or other GUI editor. Of course, I can download these files, edit them locally and upload them back to server. Is there more elegant solution?
|
||||
|
You can do that via
Notice the two slashes This is handled by vim's netrw.vim standard plugin. Several other protocols are supported. |
|||||||||||||||||||||
|
You could do this by mounting the remote folder as a file-system using sshfs. To do this, first some pre-requisites:
Now, do the mounting process:
After this, just go into the mounted folder and use your own local customized vim. |
|||||||||||||||||||||
|
Depending on what you mean when you say you do not have the rights to edit the Vim settings, there may be a way of using Vim on the server in the way you want anyway. If you can't change your user
You can even then use an alias: |
|||
|
Depending on how many files and what kind of files you are expecting to edit, this is maybe not exactly what you want to do here, but I think it's worth mentioning. If you have to edit files in a remote server, but want to use everything you have in your own working station, then you may want to start thinking of using some kind of Revision Control system in your machines. That way, you can modify your local copies in your own machine using your software of choice, commit the changes, and then just update the local copies in the destination machine. Besides editing the files with whatever software you feel comfortable with, you have the added value of having a history of changes related to each file, which is always good. Here's a list of Revision Control Software, just in case. |
|||
|