I know the question was asked 3 years ago, but this is one of the first entry we found when we look at "gnuplot + gedit" on google, so I figured it would be nice to give an answer.

Gedit uses gtksourceview <https://wiki.gnome.org/Projects/GtkSourceView> to highlight codes. The file it uses is just an XML file that can be created or downloaded if it exists. You'll find a number of language definitions on the Gnome wiki <https://wiki.gnome.org/Projects/GtkSourceView/LanguageDefinitions>, including one for gnuplot.

Now, to install the gnuplot style sheet, download the XML file first: gnuplot.lang <https://wiki.gnome.org/Projects/GtkSourceView/LanguageDefinitions?action=AttachFile&do=get&target=gnuplot.lang>

Second, copy it into the directory that holds style sheets for all the supported languages:

|sudo cp gnuplot.lang /usr/share/gtksourceview-3.0/language-specs/
sudo chmod 644 /usr/share/gtksourceview-3.0/language-specs/gnuplot.lang
|

Now restart gedit and you should be able to choose gnuplot highlighting.

Reply via email to