Pros and cons for each vimrc cross-platform solution?

Viewed 3064

When dealing with .vimrc configuration files in Linux and Windows (two systems I've been using so far) and trying to keep configurations cross-platform, I've found mainly two solutions:

  1. Create a new folder for vim files in /home/user, so both systems have the same vim dirname (instead of default .vim in linux and vimfiles in Windows), and use set runtimepath to get this new folder;

    set runtimepath=~/vim_local,$VIMRUNTIME source ~/vim_local/vimrc

    Source

  2. Create a bunch of os conditions (like has("32")) in .vimrc when needed, based on platform or capabilities, but keeping the original unix names and creating symlinks in Windows home folder to the original files (vimfiles to .vim somewhere, maybe a .vim dir in Windows home, or even a dropbox folder). (I haven't tested this approach in older Windows versions like XP).

Which solution do you prefer, and why? What are the disadvantages from each solution? Which other solutions do you have? (You can post your own .vimrc here as well to discuss.)

If you use some source control in your .vimrc configuration files, do you version your plugin files as well (so when "deploying" your config across computers, you only do a checkout/clone from your repository)? A lot of people are using pathogen and keeping each plugin inside it's own folder (usually a git repo from github). Does it make sense to version control a plugin that is already a repository from elsewhere?

2 Answers
Related