简体   繁体   中英

How to import code style scheme on Intellij from outside the IDE

If I want to add a global scheme to my Java code style I need to go to:

  1. Settings -> Code Style -> Java
  2. I click into the engine Icon -> Import Scheme
  3. And I select some XML with the code style that I want to use

My idea is to automate this process, by creating some playbook where I install intellij and programmatically add the formatter to the fresh installation.

I found some stuff related to applying the format by running the command "idea format", but that's not what I want. I want to set the code style globally as I usually do by following the 3 step I've described previously.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM