仅在 IntelliJ IDE 中的选定文本上显示空格?

问题描述 投票:0回答:2

就像 Sublime Text 中的那样。目前我只发现能够永久显示空白。

intellij-idea whitespace
2个回答
31
投票

自版本 2023.1 起,在

Preferences | Editor | General | Appearance
下的设置中有一个选项可以启用此功能。

Screen shot of the Show Whitespaces setting

对于旧版本,在功能请求中发布了一个获得所需效果的有趣技巧。

  1. Show whitespaces
     中启用 
    File | Settings | Editor | General | Appearance
  2. Text | Whitespaces
    前景色设置为与
    File | Settings | Editor | Colors & Fonts | General
  3. 中编辑器背景色相同

结果:默认情况下,空白是不可见的,但是当选择文本时,背景颜色将改变并且空白变得可见。


3
投票

在 IDEA 2023.1 中,

Settings | Editor | General | Appearance | Show whitespaces | Selection
中有一个选项。

© www.soinside.com 2019 - 2024. All rights reserved.