I want to make some changes on my project with vim through a ssh-connection to Divio-Cloud. How can I deploy my .vimrc to be used by the Vim on Divio-Cloud. Till now it just uses a bare-bonded version without code-highlighting etc.
Asked
Active
Viewed 56 times
1 Answers
0
If you use SSH to connect to Divio-Cloud, and open Vim there, you can use SCP
to copy your local ~/.vimrc
to the remote host, and then restart Vim there. (With an active SSH connection, and the appropriate ControlMaster
and ControlPath
configuration in ~/.ssh/config
, the connection will even be shared and you won't be prompted for a password for the remote copy.)
You can also use other (SSH-based) synchronization methods, like rsync
or unison
to keep your configuration up-to-date and in sync.
Alternatively, you could use Vim on your local system, and open the remote files in it, via the :help netrw
plugin that ships with Vim: :edit scp://hostname/path/to/file
.

Ingo Karkat
- 167,457
- 16
- 250
- 324
-
Thank you for the tipp. But it doesn't work. I copied my .vimrc to Divio-Cloud but it will not be recogniced. Maybe it's because of the Docker architecture. – didierCH Nov 20 '18 at 12:56
-
1Vim expects the config under `~/.vimrc`. Have you copied it there? If yes, `:edit $MYVIMRC` should open it. Else, check `:scriptnames` output for what actually is sourced, and follow `:help initialization` to troubleshoot further. – Ingo Karkat Nov 20 '18 at 13:19
-
There may be an issue with permissions as well. Check the permissions on the copied .vimrc on the new system. – Conner Nov 20 '18 at 18:33