How to import .XML code style into IntelliJ Idea 15

后端 未结 2 1418
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-19 09:48

I want to use a specific code style in my editor defined in an XML file, which looks something like this:


2条回答
  •  我在风中等你
    2021-02-19 10:40

    For users coming here for the same issue but recent IntelliJ version (like 20), it is a bit different now. Once you've exported your formatter in XML, then follow these steps:

    1. Go to Preferences
    2. Select Editor
    3. Sele Code Style
    4. Select the language of your choice (eg Java)
    5. Go to Scheme at the top, click on the setting button by the side
    6. Select the option to import scheme, choose your formatter type and select the xml file. Then save and apply.

    If you see error "IntelliJ IDEA code style XML import failed with error message: null", check to ensure your XML file has the file definition at the top.

    NOTE: This is for MacBook. I believe the difference won't be much in other platforms.

提交回复
热议问题