英文:
How to import code style scheme on Intellij from outside the IDE
问题
如果我想要在我的Java代码风格中添加一个全局方案,我需要进行以下操作:
- 设置 -> 代码风格 -> Java
- 我点击引擎图标 -> 导入方案
- 然后我选择一些包含我想要使用的代码风格的XML文件
我的想法是通过创建一个自动化流程来实现这个过程,我会安装IntelliJ并以编程方式将代码格式设置添加到全新安装中。
我找到了一些相关的内容,可以通过运行命令“idea format”来应用格式,但那不是我想要的。我想要像通常那样通过遵循我之前描述的3个步骤来全局设置代码风格。
英文:
If I want to add a global scheme to my Java code style I need to go to:
- Settings -> Code Style -> Java
- I click into the engine Icon -> Import Scheme
- 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.
答案1
得分: 2
在Ubuntu下寻找IDE全局设置会导向 ~/.IntelliJIdea2019.3/config/
文件夹。
其中包含各种IDE文件,其中 codestyles
和 jba_config/codestyles
(根据 高级配置 - 帮助 | IntelliJ IDEA,如果您使用 IDE设置同步,则会存在后者)。
然后,您应该能够直接从文件系统中替换 Default.xml
配置。
英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论