Intellij重新格式化文件保存 [英] Intellij reformat on file save
问题描述
我建议
编辑:它似乎是最近版本的Intellij保存动作插件是由自动Intellij保存。这可能是相当恼人的,当它仍然编辑点击。
这个插件的github问题提供了一些可能的解决方案提示:
https://github.com/dubreuia/intellij -plugin-save-actions / issues / 63
实际上,我尝试将重新格式化为Ctrl + S,并且工作正常 - 现在自动完成保存。
I remember seeing in either IntelliJ or Eclipse the setting to reformat (cleanup) files whenever they are saved. How do I find it (didn't find it in the settings)
I suggest the save actions plugin. It also supports optimize imports and rearrange code.
Works well in combination with the eclipse formatter plugin.
Search and activate the plugin:
Configure it:
Edit: it seems like it the recent version of Intellij the save action plugin is triggered by the automatic Intellij save. This can be quite annoying when it hits while still editing.
This github issue of the plugin gives a hint to some possible solutions:
https://github.com/dubreuia/intellij-plugin-save-actions/issues/63
I actually tried to assign reformat to Ctrl+S and it worked fine - saving is done automatically now.
这篇关于Intellij重新格式化文件保存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!