I'm at home on a few unixy systems, FreeBSD/amd64, Linux/amd64 and Solaris/Sparc. I would like my
~/.vim directory as portable as possible, ideally in such a way I can keep them identical (say, rsync them after modifying my reference installation).
How portable is a vim configuration with installed plugins?
I can think of a few possible issues getting in the way of full portability (defined as copy all files from your reference and everything just works). Assume major and minor versions of vim are the same.
- Do plugins install files outside of
- Endianness: amd64 is LE, while SparcV9 is BE
- Absolute paths recorded at installation time
- Availability of and
PATHto third party tools (python 3, ...)
- termcap vs. terminfo
- Anything else I have missed
Before I just do it, is copying everything a dumb idea waiting to fail?
Anything else I should watch out for? I'm happy to have some code in my
.vimrc conditional on the OS or host I'm on.
Note: I know
.vimrc is pretty portable. That's no what I'm asking. I am specifically interested in the portability of the whole
.vim directory, where plugins are installed and configured.
ln -s path/to/repo/repo_vimrc ~/.vimrc. See here and here for examples.
.vimdirectory is a very common practice and there are several approaches so I think this question is too vague.
.vimdirectory, simply clone it but don't include the plugins (instead use
:PlugInstallof the equivalent for your plugin manager when you clone your dotfiles). You can also add some tests with
:h filereadable()and this kind of helpers commands to customize your vimrc according to the machine you are setting it up on.
.vimis apparently not a good idea.
.vimrc, but I am interested in the portability of what's in the
.vimtree (also in the question title). This is why I asked a new question. It appears this is not yet addressed in any of the other questions.