如何在NetBeans中显示/显示隐藏或不可见的字符? [英] How to show/reveal hidden or invisible characters in NetBeans?

查看:316
本文介绍了如何在NetBeans中显示/显示隐藏或不可见的字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何显示/显示NetBeans中的隐藏字符?在其他编辑器中,如果启用了此功能,则空格可能会显示为一个小的中心点,而制表符则会显示为向右箭头. (该功能对于查看文件是否使用制表符或空格进行缩进非常有用.)

How can you show/reveal hidden characters in NetBeans? In other editors, if this feature is turned on, a space might be shown as a small centered dot, and a tab as a right arrow. (This feature is useful to see if a file uses tabs or spaces for indentation, among other things.)

推荐答案

此功能已丢失很长时间了-功能请求于1999年11月创建,并最终于2010年8月实现(NetBeans 6.10).您可以在"视图→显示不可打印的字符"中启用/禁用它.

This feature was missing for a long time—a feature request was created on November 1999 and it was finally implemented on August 2010 (NetBeans 6.10). You can enable/disable it at "View → Show Non-printable Characters".

从NetBeans 7.0.1开始,不可打印"的定义似乎包括制表符和回车符,但不包括常规空格字符:

As of NetBeans 7.0.1, the definition for "non-printable" seems to include tabs and carriage returns but not regular white space char:

NetBeans 7.1.0最终显示空格.但是,现在有了一个新的错误,即连续的制表符(或制表符和空格的组合)折叠成一个制表符:

NetBeans 7.1.0 finally displays spaces. However, now it has a new bug where consecutive tabs (or tabs & spaces combinations) collapse into one tab:

NetBeans 7.4.0修复了此问题:

NetBeans 7.4.0 fixes this:

还有两个问题:

  1. 文件结尾用与换行符相同的符号,因此确定文件是否以EOL结尾并不明显.

  1. The end of file is represented with the same symbol as line feeds, thus making it non-obvious to determine whether the file ends with EOL.

隐藏的字符以与常规文本相同的颜色显示.

Hidden chars are displayed in the same colour as regular text.

到目前为止,这些问题尚未得到解决,但是可以通过进行缓解.编辑器空白第三方插件,

These issues have not been addressed so far but they can be sort of mitigated with the Editor Whitespace third-party plugin, which:

  • 隐藏EOL和EOF标记(无论如何都没有用).
  • 使用始终相同的颜色显示其他空白字符.

这篇关于如何在NetBeans中显示/显示隐藏或不可见的字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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