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.
3 Answers
There is a gedit-plugins package available for Ubuntu. Install that and take a look at the Draw Spaces section in the gedit preferences. You can configure it to show spaces, tabs, line feeds etc.
You can use this command in a terminal: sudo apt-get install gedit-plugins

- 11,492
- 14
- 59
- 94
-
1i do not have the plugin installed in the gedit. How to install the same – Santhosh Pai Jun 18 '13 at 07:35
-
1That has fixed the problem .Thanks a lot for the help. – Santhosh Pai Jun 18 '13 at 07:50
-
4FYI: this is also available in RHEL/CentOS 6 and 7's base repo to display whitespace chars like tabs, spaces, new lines, and non-breaking spaces. e.g. to install: sudo yum install gedit-plugins – Neon Feb 17 '15 at 20:34
-
@Neon I installed gedit-plugins for gedit 3.8.3 on CentOS 7. But I don't see any option to change the settings...any pointer is appreciate. – Hei Mar 01 '15 at 04:55
-
7-From the Edit Menu selected Preferences. -In the gedit Preference dialog, select the Plugins tab. -Select / check "Draw Spaces". Additionally, you can also configure that whitespaces to display by clicking on the Preferences button after selecting Draw Spaces (e.g. to Draw spaces, Draw tabs, Draw new lines, Draw non-breaking spaces, Draw leading spaces, Draw spaces in text, Draw trailing spaces) – Neon Mar 03 '15 at 17:29
-
5This plugin shows CRLF and LF line endings with same mark. Which makes it lot less useful. – Mikhail Batcer Jul 31 '17 at 18:36
-
3@MikhailBatcer Indeed. If I need to see the line endings, it's because I need to make sure they are consistent and in the proper format. Not being able to distinguish between the different options makes this plugin useless for this purpose. – MBraedley Aug 30 '17 at 19:28
-
1@MBraedley It's a bit offtopic, but if you need a solution - Notepad++ installed in Wine does this just fine for me. – Mikhail Batcer Aug 31 '17 at 18:06
-
@MikhailBatcer Not sure I'd be allowed to install WINE on the work laptop. – MBraedley Aug 31 '17 at 18:35
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.
For most applications you need these options. These specific combinations will show leading and trailing proper spaces but not show tabs. This way you can, for example, tell if indentation was not done with tabs.

- 14,261
- 4
- 67
- 118
After upgrading to Ubuntu 22.04 the plugin stopped working for me. It was still visible and configurable in the gEdit menu as shown in the answer of alfC but the characters did not show in the actual text anymore even though the plugin was selected.
To fix this I used dconf-editor
to switch on the key
/org/gnome/gedit/plugins/drawspaces/show-white-space
which was switched off. See the following screenshot:

- 1,640
- 14
- 24