Highlighted Text Not Visible in Gedit in Dark Mode? Here's What You Can Do

While using the dark mode system theme, the highlighted line in Gedit makes text almost invisible. Here's how to enjoy both dark mode and Gedit together.
Warp Terminal

I love using dark mode in Ubuntu. It’s soothing on the eyes and makes the system look aesthetically more pleasing, in my opinion.

One minor annoyance I noticed is with gedit text editor and if you use it with the dark mode in your system, you might have encountered it too.

By default, gedit highlights the line where your cursor is. That’s a useful feature but it becomes a pain if you are using dark mode in your Linux system. Why? Because the highlighted text is not readable anymore. Have a look at it yourself:

Gedit Dark Mode Problem
Text on the highlighted line is hardly visible

If you select the text, it becomes readable but it’s not really a pleasant reading or editing experience.

Gedit Dark Mode Issue
Selecting the text makes it better but that’s not a convenient thing to do for all lines

The good thing is that you don’t have to live with it. I’ll show a couple of steps you can take to enjoy dark mode system and gedit together.

Making gedit reader-friendly in dark mode

You basically have two options:

  1. Disable highlight the current line but then you’ll have to figure out which line you are at.
  2. Change the default color settings but then the colors of the editor will be slightly different, and it won’t switch to light mode automatically if you change the system theme.

It’s a workaround and compromise that you’ll have to make until the gedit or GNOME developers fix the issue.

Option 1: Disable highlighting current line

When you have gedit opened, click on the hamburger menu and select Preferences.

Gedit Preferences
Go to Preferences

In the View tab, you should see the “Highlight current line” option under Highlighting section. Uncheck this. The effects are visible immediately.

Disable Highlight Line Gedit
Disable highlighting current line

Highlighting current line is a usable feature and if you want to continue using it, opt for the second option.

Option 2: Change the editor color theme

In the Preferences window, go to Font & Colors tab and change the color scheme to Oblivion, Solarized Dark or Cobalt.

Change Color Scheme Gedit
Change the color scheme

As I mentioned earlier, the drawback is that when you switch the system theme to a light theme, the editor theme isn’t switched automatically to the light theme.

Install and Use Additional Gedit Color Themes
Don’t like the default looks for the Gedit text editor? You can surely try to change the color themes. Here’s how to do that.

A bug that should be fixed by devs

There are several text editors available for Linux but for quick reading or editing a text file, I prefer using gedit. It’s a minor annoyance but an annoyance nonetheless. The developers should fix it in future version of this awesome text editor so that we don’t have to resort to these worarounds.

How about you? Do you use dark mode on your system or light mode? Had you noticed this trouble with gedit? Did you take any steps to fix it? Feel free to share your experience.

About the author
Abhishek Prakash

Abhishek Prakash

Created It's FOSS 11 years ago to share my Linux adventures. Have a Master's degree in Engineering and years of IT industry experience. Huge fan of Agatha Christie detective mysteries 🕵️‍♂️

Become a Better Linux User

With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world

It's FOSS

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.