Background
I am trying to run Neovim in a Docker container.
One issue I am running into is that paths to files in the container are different than they are on the host file system.
Example:
If I want to edit /etc/passwd
with the Vim container passing in the path /etc/password
would edit the file in the container not the file on my host. Instead I would have to pass something like /host-shared-dir/etc/passwd
and run the container with docker run -v /:/host-shared-dir ...
.
Question
How can I remap all paths in Vim to treat another directory as the root.
Example:
If I pass the path /etc/passwd
to Vim, how can I get Vim to actually open the file /host-shared-dir/etc/passwd
?