Multi-Platform vimrc Using Dropbox   2 comments

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!



Posted December 9, 2010 by Rob Ciaccio in Software, Vim

Tagged with , , , , ,

2 responses to “Multi-Platform vimrc Using Dropbox

Subscribe to comments with RSS.

  1. I have one _vimrc stored in a private repository at GitHub, that I share between Windows, Mac, and Linux. Here’s a somewhat dated description of it:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: