Synchronize WebStorm Settings Across Multiple Machines Using Google Drive

When I started Node development I went on a hunt for the perfect IDE. After some deliberation I settled on WebStorm by JetBrains. I really wanted to get a cloud-based IDE working such as Cloud9, but unfortunately they just aren't up to snuff quite yet; I keep checking back but I think it'll be a couple more years before they rival their desktop counterparts in any meaningful way. So for now I have chosen WebStorm and I feel pretty good about it. What I don't feel very good about is having to synchronize my WebStorm settings across multiple machines.

Obviously this wouldn't be a problem in a cloud-based IDE, but for a desktop IDE it's far more painful than I at first realized. Few things are more frustrating to me during development than opening my laptop only to find that I had forgotten to export some IDE settings changes when I was last using it on my desktop. There has to be a way to synchronize those settings in the background. I tried several things.

First I found that WebStorm had a plugin designed to synchronize certain settings with JetBrains servers. This would have been great but it was buggy and resulted in odd behavior for me. I also wanted to solve the problem on a more generic scale because I have had similar problems with other programs such as synchronizing Minecraft worlds or World of Warcraft mods. So the plugin being buggy wasn't all bad because I preferred to solve this problem at the operating system level anyway.

That's when I had a brilliant idea. I remembered that you could pick which folders to synchronize in Google Drive. I installed Google Drive locally and opened up the settings so I could add all these program's settings folders to be synchronized. Unfortunately, Google Drive only lets you pick which folders to synchronize from your Google Drive account.

You can't choose various folders on your local machine. You get one single Google Drive folder in your home directory and that's it. The next logical step was to try out some of Google Drive's competitors such as Dropbox or Microsoft's SkyDrive. To my dismay both of those services operated the same way as Google Drive, only synchronizing with a single local folder.

Note: Around that same time a new competitor came onto the seen called Cubby by LogMeIn. I haven't actually tried it, but I've heard you can pick and choose local folders to be synchronized. You are welcome to check out this option and see if it does what you need before continuing this tutorial.

Finally I discovered a little trick. There is a program called Link Shell Extension that simulates symlinks on Windows. As of this writing this extension works with every version of Windows from XP to 8. The page for this app couldn't be uglier or more difficult to navigate so here are a couple quick links to the downloads. You will need to install a prerequisite package first, then install the actual shell extension.

Prerequisite Package (Visual C++ 2005 Redistributable)

Link Shell Extension

Once you've installed the extension you will need to restart your computer for the changes to take effect in Windows Explorer. After restarting your machine it's a simple two-step process to synchronize your WebStorm settings with Google Drive.

  1. Navigate to the directory where WebStorms saves it's settings. By default in Windows this is located in:

    "<User home>\.WebStorm6\"
    

    The directory with all your WebStorm settings is called "config". Right-click the config folder and select "cut" from the context menu. Now navigate to your Google Drive folder in a new explorer window. Paste the config folder in your Google Drive folder where you would like to keep it.

  2. Now right-click the config folder that you pasted and select "Pick Link Source" from the context menu.

    Go back to the other explorer window where we cut the config folder from. Right-click in any empty space in that folder and navigate to "Drop As..." > "Junction".

    Junctions are to directories what symlinks are to files. Any modification to the tree structure in a junction will modify the real tree structure (which now lives in Google Drive's directory).

That's it! You should be all set to try it out. After configuring the Link Shell Extension on multiple computers go ahead and change some settings in WebStorm; you should see the Google Drive icon in the system tray start spinning after you save your settings. That is your indication that it's working, but just to be sure go to another machine you've setup and see if your settings carried over. Easy as pie!

PS - I did the same thing for Minecraft and WoW. If you're curious what folders to create junctions for then here they are (Windows 7/8 64-bit):

  • Minecraft worlds: "%APPDATA%\.minecraft\saves\"

  • World of Warcraft mods and their settings: "C:\Progam Files (x86)\World of Warcraft\WTF"