Linux 在 gedit 中显示控制字符的选项

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17162851/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 23:14:44  来源:igfitidea点击:

Option to display control characters in gedit

linuxgedit

提问by Santhosh Pai

I'm a newbie to Linux. Is there a way to see the control characters in gedit. I went to options->preferences and all I got is option to see the line numbers of the text file. Is there any plugin that needs to be installed to see the same? I'm on Ubuntu 12.04 LTS and the gedit version is 3.4.1.

我是 Linux 的新手。有没有办法在gedit中查看控制字符。我去了选项->首选项,我得到的只是查看文本文件行号的选项。是否需要安装任何插件才能看到相同的内容?我在 Ubuntu 12.04 LTS 上,gedit 版本是 3.4.1。

采纳答案by Alex

There is a gedit-pluginspackage available for Ubuntu. Install that and take a look at the Draw Spacessection in the gedit preferences. You can configure it to show spaces, tabs, line feeds etc.

有一个可用于 Ubuntu的gedit-plugins包。安装它并查看gedit 首选项中的Draw Spaces部分。您可以将其配置为显示空格、制表符、换行符等。

You can use this command in a terminal: sudo apt-get install gedit-plugins

您可以在终端中使用此命令: sudo apt-get install gedit-plugins

回答by alfC

As said in the other answer you need to install the Draw-Spaces plugin in gedit. Once there, I must say, the plugin options are confusing because the word space is used with two different meanings, as separation character (including tab) or as a proper space.

正如另一个答案中所说,您需要在 gedit 中安装 Draw-Spaces 插件。在那里,我必须说,插件选项令人困惑,因为空格一词具有两种不同的含义,作为分隔符(包括制表符)或作为适当的空格。

For most applications you need these options. This specific combinations, will show leading and trailing proper spaces and not show tabs. (This way you can, for example, tell if indentation was not done with tabs).

对于大多数应用程序,您需要这些选项。这种特定的组合将显示前导和尾随适当的空格,而不显示制表符。(例如,您可以通过这种方式判断缩进是否未使用制表符完成)。

drawspaceswindow

绘图空间窗口