在IntelliJ Idea中仅显示尾随空格 [英] Show only trailing whitespace in IntelliJ Idea

查看:435
本文介绍了在IntelliJ Idea中仅显示尾随空格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我最近从Eclipse转到IntelliJ IDEA(终极版),我对空白感到挑剔。

So I've recently moved from Eclipse to IntelliJ IDEA (Ultimate Edition) and I'm feeling fussy about whitespace.

目前我已经设置了IntelliJ IDEA向我展示空白,看起来像这样:

At the moment I've set IntelliJ IDEA to show me whitespace, and it looks like this:

Eclipse将显示相同的代码块,如下所示:

Eclipse would show the same code block like this:

无论如何我可以让IntelliJ IDEA只显示尾随空格,就像Eclipse一样吗?

Is there anyway I can make IntelliJ IDEA only show trailing whitespace, just like Eclipse can?

推荐答案

最新的IntelliJ IDEA版本支持仅显示尾随空格:

Most recent IntelliJ IDEA versions do support showing only trailing whitespaces:

2013年的原始答案:

Original answer from 2013:

IDEA没有此功能,但您可以启用一个选项,可以自动删除所有行上的尾随空格并忘记此问题。

IDEA has no this feature, but you can enable an option to strip trailing whitespace on all lines automatically and forget about this problem.

这篇关于在IntelliJ Idea中仅显示尾随空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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