intellij idea for mac 的scala编程风格设置
idea for mac 在默认方式下,scala的编程风格极度随意,关于类是导入位置很随意,以后管理极度不便,如下图,如何才能恢复到大家习惯的模式呢(即import *** 放在文件顶部)? 尝试多遍终于成功了。 找到工程路径 ----> .idea/codeStyles/codeStyleConfig.xml文件 <component name="ProjectCodeStyleConfiguration"> <state> <option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" /> </state> </component> 改成下面内容 <component name="ProjectCodeStyleConfiguration"> <state> <option name="USE_PER_PROJECT_SETTINGS" value="true" /> </state> </component>
保存xml文件即可,让我们再试试
回到了我们熟悉的正常模式。