Answer the question
In order to leave comments, you need to log in
How do you remotely edit files on servers?
Salute comrades!
Recently, I became a happy user of the VIM editor, and faced some misunderstanding, on my part, of the principles of remote work.
My .vimrc, of course, is not very large, since I just started my journey, but the prospect of replicating it to all the north, and for all users, does not suit me at all. Moreover, there are situations when access to the server is given one-time, for a one-time edit. Searching the net for information about vim remote edit, I did not find anything other than scp and sshfs. But what if the remote user (and the local one too) needs sudo?
In general, I ask for your help in this matter.
Answer the question
In order to leave comments, you need to log in
Well, for editing, in my opinion, standard vim is enough, without any customization. But if you need to develop on the server (!), then this is 1) very bad, 2) you can transfer the settings 3) this is definitely not a one-time job.
Well, in addition, if something is to be dragged from server to server, especially configs, then it is better to use git or mercurial for this. Better yet, ansible!
vim scp://[email protected]//root/.bashrc
emacs /[email protected]:/root/.bashrc
In both editors, you can open a directory, and then, as in a normal local directory, open a new tab with the desired file.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question