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:
If you select the text, it becomes readable but it’s not really a pleasant reading or editing experience.
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:
- Disable highlight the current line but then you’ll have to figure out which line you are at.
- 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.
In the View tab, you should see the “Highlight current line” option under Highlighting section. Uncheck this. The effects are visible immediately.
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.
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.
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.