在保存Intellij Idea(12)时删除末尾的空格 [英] Remove trailing whitespace on save in Intellij Idea (12)

查看:597
本文介绍了在保存Intellij Idea(12)时删除末尾的空格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在保存在IntelliJ Idea中时自动删除尾随空格?我知道有一些解决方法,f.e.使用git修改提交时的空白。
也许这个问题是这一个的重复,但我希望这可以在没有设置键盘快捷键和宏的情况下完成。

解决方案

不知道12,但有一个在13中设置:

设置 - >编辑器 - >在保存



上去掉尾随空格从IntelliJ 2017.2开始,它位于 $ b 设置 - >编辑器 - >一般 - >保存

中的尾部空格


Is it possible to remove trailing whitespace automatically on save in IntelliJ Idea? I know there are some workarounds, f.e. using git to trim the whitespace on commit. Maybe this question is a duplicate of this one, but i hope this can be done without setting up keyboard shortcuts and macros.

解决方案

Don't know about 12, but there's a following setting in 13 :

Settings -> Editor -> Strip trailing spaces on Save

As of IntelliJ 2017.2 it's under

Settings -> Editor -> General -> Strip trailing spaces on Save

这篇关于在保存Intellij Idea(12)时删除末尾的空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆