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.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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