48

I am unable to see what I type in the Gedit editor using dark theme.

Gedit problem showcase

This is due to the default setting of highlighting the current line.

Gedit highlight current line setting

2
  • 1
    This is a known bug for 20.04. You can draw more attention to this bug by checking the relevant option on the top of the bug report to let the developers know that it also affects you. Apr 24, 2020 at 9:33
  • My experience is that this only persistantly happens (and color theme change in preferences has not effect) is when using gedit in sudo or su. That's my question. That's what I'm wondering. I'm guessing it's been added as a percaution that you may be overwriting something core - but I would much like to turn it off. and no, Gksu does not work. Any ideas?
    – ShefSam
    Aug 21, 2022 at 15:03

3 Answers 3

36

Here's my workaround.

Go to the Preferences menu on Gedit and change the Color Scheme on Fonts & Colors tab:

Color Scheme on Preferences menu

Check if the text is now comfortably readable even with the presence of the highlighted content on the selected line.

Readable highlighted text

1
  • 2
    Wow, thank you. The default 'dark mode' preference is unusable, in my opinion - I ended up selecting Solarized dark, but there's another dark mode for geddit that's perfectly usable. In my opinion the fix would be to remove the unusable theme.
    – Rentsy
    Nov 26, 2021 at 18:48
14

As you can see in the images, by default the Higlight current line feature is enabled in Gedit editor on Ubuntu 20.04 LTS (Focal).

Due to that, you can't see what you type in the current line properly, since the font color and highlight color are almost the same.

You can disable Highlight current line in the preferences of Gedit or change the color of the text in Font & Colors settings.

1
  • 3
    Works. Would be fine if by default changing the theme Ubuntu make that automaticly.
    – ambigus9
    May 20, 2020 at 13:23
11

You have two options:

  1. Open the theme file /usr/share/gtksourceview-4/styles/tango.xml with root access and around the line 50 there should be something like this :
   <color name="aluminium1"                  value="#eeeeec"/>

Change the color to something less harsh like #99999c.

  1. Use another theme.The default theme when the global appearance is set to dark is tango but you can also use Classic or Oblivion depending on your mood and your preferences.None of them have the problem of unreadable text when a line is highlighted.Just go to Preferences -> Font and colors and change that.

Also you can take a look at this theme repository to find more themes if you want.

1
  • 3
    Instead of changing the color, consider changing the <style name="current-line" ...> to something other than "aluminium1". Sep 7, 2021 at 19:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .