5

I recently upgraded to 11.10 on my desktop, but afterward all the custom themes I added and the MediaWiki syntax highlighting were gone.

For the themes, I forget where I put the files, but the syntax highlighting was downloaded according to the author's instructions so it is still at ~/.local/share/gtksourceview-2.0/language-specs/

What gives? I tried removing the files/directory and starting over, tried moving the directory to ~/usr/share... instead, tried restarting, tried updating my packages. No luck.

4
  • I believe the upgrade process only preserves the contents of your home folder - any configuration data elsewhere would be overwritten or removed. Oct 15, 2011 at 3:43
  • Isn't ~/.local etc. in my Home folder? Anyway, adding the configuration again would negate that issue, and it didn't work.
    – Swalling
    Oct 15, 2011 at 4:14
  • Ah, I missed part of your question - sorry. You are correct. Oct 15, 2011 at 4:21
  • If im not mistaken Ubuntu 11.10 uses gtk+3 libraries (gEdit v3), and so folder locations are slightly different than gEdit v2
    – daniel
    Oct 15, 2011 at 19:38

2 Answers 2

3

The new location for the language specs is ~/.local/share/gtksourceview-3.0/language-specs/ (note the 3 instead of the 2). If you put your .lang files there, they should work like they did before.

I'm not sure about the gedit themes. Are they actually gtksourceview styles? They have made the same move.

There is also an old folder ~/.gnome2/gedit on my system, and also one in ~/.local/share/gedit. You could try moving files from the first of these folders to the latter and see if that solves your issue.

1
  • 1
    For those trying to add local language specs to Ubuntu ≥ 21.04, note that the personal folder should now be ~/.local/share/gtksourceview-4/language-specs — with no ‘.0’ on the end, unlike previous versions. The Fedora source rpm Gtksourceview3-langs-extra has some extra definitions omitted from Ubuntu, too.
    – scruss
    Jul 3, 2021 at 15:34
1

Good question! I struggled to find the answer for a while, and finally found that language specs were relocated to:

/usr/share/gtksourceview-2.0/language-specs/
/usr/share/gtksourceview-3.0/language-specs/

Searching for all .lang files on my system, I found that there is also a gtksourceview-3.0 directory which shares many language files that are only slightly different (diff'ing each pair, most feature very small changes to licenses, etc).

After adding my .lang file to both folders, I was able to use the syntax highlighting I so dearly desired!

You must log in to answer this question.

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