Philipp's Computing Blog

Success is about speed and efficiency

gedit Markdown plugin

For an up-to-date version of the information about the gedit Markdown plugin go to the new blog post Markdown for the Gedit Text Editor on Ubuntu 11.04.

If you frequently have to create Markdown documents, you might want your text editor of choice to support you. M Fleury developed a nice plugin for Gedit to support Markdown. The plugin can help in two ways: It can apply coloured syntax markup and add a bottom pane showing you a rendered version of the markdown code you just entered using [Shift]+[Control]+[m].

Installation

cd ~/Downloads/
wget http://www.jpfleury.net/site/fichiers/gedit-markdown/gedit-markdown.zip
unzip gedit-markdown.zip
./gedit-markdown/gedit-markdown.sh installer

Ubuntu 10.04 and later are missing the package python-gtkhtml2 wich is a dependency of the preview pane.
Workaround: If you want to use the preview pane, try to install an earlier version of the package like this for amd64 installations:

wget http://de.archive.ubuntu.com/ubuntu/pool/universe/libg/libgtkhtml2/libgtkhtml2-0_2.11.1-2ubuntu3_amd64.deb
wget http://de.archive.ubuntu.com/ubuntu/pool/main/g/gnome-python-extras/python-gtkhtml2_2.25.3-3ubuntu1.9.10.1_amd64.deb
sudo dpkg -i libgtkhtml2-0_2.11.1-2ubuntu3_amd64.deb
sudo dpkg -i python-gtkhtml2_2.25.3-3ubuntu1.9.10.1_amd64.deb

or for i386 installations do:

wget http://de.archive.ubuntu.com/ubuntu/pool/universe/libg/libgtkhtml2/libgtkhtml2-0_2.11.1-2ubuntu3_i386.deb
wget http://de.archive.ubuntu.com/ubuntu/pool/main/g/gnome-python-extras/python-gtkhtml2_2.25.3-3ubuntu1.9.10.1_i386.deb
sudo dpkg -i libgtkhtml2-0_2.11.1-2ubuntu3_i386.deb
sudo dpkg -i python-gtkhtml2_2.25.3-3ubuntu1.9.10.1_i386.deb

uninstall

cd ~/Downloads/gedit-markdown
gedit-markdown.sh desinstaller

Usage

Now open Gedit.

  • Enable syntax highlighting using View → Highlight Mode → Markup → Markdown (automatically applied to files with the extension .mdtxt). Also activate the preview pane (the plugin) in gedit (Edit → Preferences → Plugins)!

screen shots

preview of the markdown interpretation - gedit markdown plugin

preview of the markdown interpretation - gedit markdown plugin

resources