I’ve been using vim in place of notepad++ and fraise with greater frequency lately. It’s quite a hassle to maintain vim settings on two different platforms in a consistent enough way that the settings are identical. Yesterday I decided to fix that.
I run a local subversion server at home for versioning my free-time projects and other documents. I store my working copies of the repository in a folder inside my Dropbox. What I decided to do was run a WinMerge diff/merge with my OS X .vimrc and my Windows _vimrc files. Everything that was common to both files, I merged right, then saved to a new text file called ‘vimrc_common’. So afterwards, I was left with 3 relatively similar files, .vimrc, _vimrc, and vimrc_common.
After checking in the changes, it was a simple task to remove the script that was now in common from the two original files, leaving only the platform specific stuff. I added a line to each of the original files that sources the common file at its path on the respective OS, and voila, no more vimrc duplication!