Looking for IDE global settings under Ubuntu led me to ~/.IntelliJIdea2019.3/config/ folder. It contains various IDE files, among which codestyles and jba_config/codestyles (according to Advanced configuration - Help | IntelliJ IDEA, the latter exists if you are using IDE settings sync).

You should then be able to simply replace the Default.xml configuration directly from within file system.

Answer from Vincent C. on Stack Overflow
🌐
JetBrains
jetbrains.com › help › idea › configuring-code-style.html
Code style schemes | IntelliJ IDEA Documentation
August 17, 2026 - Press Ctrl+Alt+S to open settings and then select Editor | Code Style. Click Show Scheme Actions and select Import Scheme. Then select the necessary format. In the dialog that opens, select the file with the settings and click Open.
🌐
GitHub
github.com › duraspace › codestyle › blob › master › ide-support › intellij.md
codestyle/ide-support/intellij.md at master · duraspace/codestyle
Select the duraspace-intellij-java-code-style.xml (under checkstyle/ide-support in the DuraSpace resources repo directory) ... Importing Checkstyle configuration, as supported through the Checkstyle plugin, provides a starting point for Code Style configuration
Author: duraspace
🌐
Medium
medium.com › swlh › configuring-google-style-guide-for-java-for-intellij-c727af4ef248
Configuring Google Style Guide for Java for IntelliJ | by Reed Odeneal | The Startup | Medium
November 16, 2020 - Next to the Scheme drop-down menu select the gear icon then Import Scheme > IntelliJ IDEA code style XML then select the intellij-java-google-style.xml file you downloaded from GitHub.
🌐
Xwiki
dev.xwiki.org › xwiki › bin › view › Community › CodeStyle › JavaCodeStyle
Java Code Style - XWiki
August 3, 2026 - You can enable "Automatically add ... you want to document. ... Download codestyle-idea.xml. Go to IntelliJ's File > Settings and to Editor > Code Style and select Import Scheme > IntelliJ IDEA Code Style XML as shown on...
🌐
JetBrains
jetbrains.com › help › idea › settings-code-style.html
Code Style | IntelliJ IDEA Documentation
August 17, 2026 - In this area, choose the code style scheme and change it as required. Code style scheme settings are automatically applied every time IntelliJ IDEA generates, refactors, or reformats your code.
Find elsewhere
Top answer
1 of 2
4

EDITED The file from Google uses an old (I suppose) key for filetype (java instead of Java). I have made the following changes and it works.

<ADDITIONAL_INDENT_OPTIONS fileType="JAVA">
  <option name="INDENT_SIZE" value="2" />
  <option name="CONTINUATION_INDENT_SIZE" value="4" />
  <option name="TAB_SIZE" value="8" />
  <option name="USE_TAB_CHARACTER" value="false" />
  <option name="SMART_TABS" value="false" />
  <option name="LABEL_INDENT_SIZE" value="0" />
  <option name="LABEL_INDENT_ABSOLUTE" value="false" />
  <option name="USE_RELATIVE_INDENTS" value="false" />
</ADDITIONAL_INDENT_OPTIONS>

I have made a fork of the GitHub repository with the file corrected (https://github.com/nhenneaux/styleguide/blob/gh-pages/intellij-java-google-style.xml).


The easiest way is to import the style file into ~/.IntelliJIdea2016.2/config/codestyles. Then you have to restart Intellij and go in the style settings to select GoogleStyle.

2 of 2
0

It seems that the format used in the configuration file differes from what IntelliJ (at least the version I'm using) expects.

I changed my code setting, exported them and looked for differences.
The ident setting were in the output file like so:

<code_scheme name="MyTestStyle">
    ...
    <codeStyleSettings language="JAVA">
        <indentOptions>
          <option name="INDENT_SIZE" value="2" />
          <option name="CONTINUATION_INDENT_SIZE" value="4" />
          <option name="TAB_SIZE" value="8" />
        </indentOptions>
    </codeStyleSettings>
</code_scheme>

Importing this file worked as expected.

🌐
JetBrains
blog.jetbrains.com › home › intellij idea › intellij idea 13: importing code formatter settings from eclipse
IntelliJ IDEA 13: Importing Code Formatter Settings from Eclipse - The JetBrains Blog
January 31, 2014 - All you need is to export settings ... the Export All button.), and then open IntelliJ IDEA Settings → Code Style → Java, click Manage, and import that XML file by simply clicking Import....
🌐
JetBrains
jetbrains.com › help › idea › code-style-java.html
Code Style. Java | IntelliJ IDEA Documentation
July 2, 2026 - This table lists actions to be performed when imports are optimized. ... Code StyleCode Style.
🌐
CodingTechRoom
codingtechroom.com › question › import-code-style-settings-intellij-eclipse
How to Import Code Style Settings from IntelliJ IDEA to Eclipse - CodingTechRoom
In IntelliJ IDEA, export the code style settings using the 'Export' command in the preferences. Convert the exported settings to a suitable XML format if required. In Eclipse, go to the preferences menu and import the settings using the 'Import' option under 'Code Style'.
🌐
CodeGym
codegym.cc › java blog › random › intellij idea: coding style and code formatting
IntelliJ IDEA: Coding style and code formatting
December 19, 2023 - To make a "custom" scheme, use the button on the right to make a copy and give it a name, for example: CodeGym Then that we can import or export the settings: Another option is to import IDEA settings: A third option is the Settings Repository. To use the Settings Repository, see the IntelliJ IDEA Help documentation for more details at the following link: Settings Repository". Speaking of pushing a unified style on a team, I also can't help but mention the good support for styles from the Eclipse IDE.
Top answer
1 of 3
30

Go to Eclipse's Preferences → Java → Code Style → Formatter and export the settings to an XML file via the Export All button (or Edit and then Export in dialog that opens up). Then open IntelliJ IDEA Settings → Code Style → Java, click Manage, and import that XML file by simply clicking Import.

As of IntelliJ IDEA 13, there is no possibility to import .settings/.prefs files directly.


Edit: IntelliJ can import the following Eclipse properties:

  • General
    • Right margin, Formatter on/off tags
    • Indentation
    • Indent size
    • Usage of ‘Tab’ character
    • Usage of Tab only for leading indentation (Smart Tabs)
    • Indent ‘case’ branches from ‘switch’
    • Indent class members
    • Keep comment at first column
  • Spaces (Java)
    • Before/after comma (as set for Eclipse method declaration parameters)
    • After comma in type arguments
    • Within array initializer braces
    • Within brackets (in array reference)
    • Within parentheses of: annotation, ‘for’, ‘if’, ‘catch’ ’while’, ’switch’, method, empty method, parenthesized expression, method call, type cast, ‘synchronized’
    • Before parentheses of: ‘try’, ‘for’, ’while’, ‘switch’, method, ’if’, ‘catch’, method, method call, ‘synchronized’.
    • After type cast
    • Around unary, assignment operators (if it’s set for ‘before’ and ‘after’ in Eclipse).
    • Before opening brace of: array initializer, ‘switch’
    • Before ‘?’ in conditional expression
    • Space before/after ‘:’ in conditional expression
    • Space around binary operators (a single Eclipse setting is mapped to multiple IntelliJ IDEA’s settings)
  • Blank lines
    • Around fields and methods
    • Before/after package
    • Before/after imports
    • Before method body
    • Keep blank lines in code (number of empty lines to preserve)
  • Wrapping
    • New line before: closing brace in array initializer, ‘else’ in ‘if’ statement, ‘finally’ and ‘catch’ in ‘try’ statement, binary operator (if wrapped)
    • New line after: opening brace in array initializer Special ‘else if’ treatment (compact ‘else if’)
    • Keep simple blocks in one line
    • Keep control statements in one line
    • Alignment of: array initializer expressions, arguments in method declarations and calls, field declarations, extends list, assignments, binary expressions, ‘throws’ clause, resources in ‘try’.
    • Brace style for: code blocks, methods and classes
  • JavaDoc
    • Enable JavaDoc formatting
    • Blank lines in JavaDoc
2 of 3
13

In the latest (2020) IntelliJ IDEA, if you have the "Eclipse interoperability" plugin installed, it's as simple as:

Settings > Editor > Code Style > Java > ⚙️ > Import Scheme > Eclipse XML Profile

🌐
JetBrains
jetbrains.com › help › idea › code-style.html
Code style and formatting | IntelliJ IDEA Documentation
February 11, 2024 - IntelliJ IDEA offers two ways of defining code style rules.
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 115000733704-programmatically-set-code-style-import-perferences-
programmatically set code style import perferences? – IDEs Support (IntelliJ Platform) | JetBrains
December 6, 2017 - If I have to use a plugin to set the import preferences, is it possible to programmatically install a plugin? I'm trying to make it super simple for everyone to be on the same settings. ... You can share the project code style via version control. Project specific code style is stored in .idea directory. See https://intellij-support.jetbrains.com/hc/articles/206544839.
🌐
YouTube
youtube.com › watch
Getting Started with Java: IntelliJ Imports & Code Formatting - YouTube
In this lesson, we are going to talk about organizing your imports and formatting your code.CONNECT WITH ME: Website: https://www.danvega.devTwitter: https:/...
Published: January 3, 2019
🌐
GitHub
github.com › apache › apex-core › tree › master › misc › ide-templates › intellij
apex-core/misc/ide-templates/intellij at master · apache/apex-core
... On the main menu, choose File | Import Settings. In the Import File Location dialog box that opens select the .settings/apex-style.jar. The Select Components to Import dialog box that opens next will only have an entry for code style which ...
Author: apache