2

I'm using Pluma on Ubuntu MATE 16.04 LTS and I see that it does not support syntax highlighting for Markdown lightweight markup language.

But I know that Ubuntu 18.04 LTS (and newer versions) have this highlighting pre-installed.

How can I add Markdown syntax highligting to Pluma in Ubuntu 16.04 LTS?

N0rbert
  • 103,263

1 Answers1

2

It is possible, but with one thing to be considered: all current Ubuntu versions already have markdown.lang file in the repositories as a part of libgtksourceview-3.0-common package, but in Ubuntu 16.04 Pluma uses libgtksourceview2.0-0 as a dependency.

So here we need to install the libgtksourceview-3.0-common package with

sudo apt-get install libgtksourceview-3.0-common

and then copy markdown.lang file manually to current user configuration folder:

mkdir -p ~/.local/share/gtksourceview-2.0/language-specs/
cd ~/.local/share/gtksourceview-2.0/language-specs/
cp /usr/share/gtksourceview-3.0/language-specs/markdown.lang .

then restart Pluma and enjoy:

Markdown is highlighted in Pluma 1.12.2


Notes:

  1. and any other lang-file may be installed with similar way. The full list is the following: actionscript, ansforth94, automake, bennugd, bluespec, cobol, cpphdr, csv, gdb-log, genie, go, idl-exelis, imagej, jade, j, json, julia, lex, llvm, markdown, matlab, mediawiki, meson, modelica, mxml, netrexx, objj, opencl, pig, protobuf, puppet, python3, rst, rust, scala, scilab, sml, sweave, systemverilog, thrift, yaml.
  2. this approach gives free bonus - the Meld merge diff tool will use the same lang-files to highlight syntax.
N0rbert
  • 103,263