Migrate code styles to Intellij Idea 11 on a Mac

If you are migrating between Idea versions, you may want to migrate your code styles as well.

Let’s assume you want to migrate a code style called foo-codestyle.xml. In Idea 9.x versions this is present at ~/.IntelliJIdea90/config/codestyles/foo-codestyle.xml

Now, open up Idea 11, and go to Settings->Code Style, click on Manage and create a code style named foo-codestyle. Now close Idea, and copy the earlier file to overwrite ~/Preferences/IntelliJIdea11/codestyles/foo_style.xml. Notice the underscore (_) in the new file name, instead of a hyphen (-).

Restart Idea and you should see the orginal code style settings under foo-codestyle.