Mar 092010
 

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

1
2
3
4
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:

1
2
3
4
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:

1
2
3
4
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

1
2
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

VN:F [1.9.17_1161]
Rating: 9.5/10 (2 votes cast)
gedit Markdown plugin, 9.5 out of 10 based on 2 ratings

Related Posts:

  6 Responses to “gedit Markdown plugin”

  1. Thank you very much. It really helps.

    VA:F [1.9.17_1161]
    Rating: 0 (from 0 votes)
  2. Hi,

    I just want to let you know that I published gedit-markdown version 2. In addition to a complete rewrite of syntax highlighting and snippets, as well as file extension association for .markdown, .md and .mdtxt, there’s a switch from GtkHTML to WebKit. So it’s no longer necessary to install python-gtkhtml2.

    More details on the gedit-markdown’s web page.

    Regards.

    VA:F [1.9.17_1161]
    Rating: 0 (from 0 votes)
    • Hi Jean-Philippe! It’s an honour to hear from you on my blog! I’ll look into the new version soon and update the blog post.


      update 2011-06-26: Finally, I came to test the new version. This blog post would have become to messy with the new instructions so I wrote a new one found here.

      VN:F [1.9.17_1161]
      Rating: 0 (from 0 votes)
  3. Hi Philipp,

    Since then, a few versions were released (the last is 3.2). What’s new:

    • Support for Markdown Extra.

    • An optional color scheme (Edit > Preferences > Font & Colors > Color Scheme) can be used to have highlighting more similar to an HTML rendering (e.g., strong emphases and headers are in bold and black font).

    • About MIME type, gedit-markdown no longer adds its own Markdown MIME type file because Markdown support was added directly into the shared MIME database shared-mime-info, and for purposes of compliance with the specification, extensions supported are .markdown, .md and .mkd (so the extension .mdtxt is no longer supported).

    • Markdown Preview can be put in the side panel or the bottom panel.

    • The shortcut to refresh the preview is editable in a configuration file.

    • An external tool Export to HTML was added. By using it, the code of the currently opened Markdown file will be converted in HTML, and the result will be put in a new HTML document.

    • Bug fix: with older versions, installing gedit-markdown (for example a new version) when it was already installed (so without uninstall it) resulted in Markdown Preview not working.

    Regards,

    Jean-Philippe

    VA:F [1.9.17_1161]
    Rating: 0 (from 0 votes)
    • Hi Jean-Philippe, thanks for your update! I tried the new version and it’s great!

      As indicated above, the information for the new version moved to a new blog post.

      VN:F [1.9.17_1161]
      Rating: 0 (from 0 votes)
  4. [...] Jun 26 2011 This is the continuation of the topic gedit Markdown plugin and the comment by Jean-Philippe Fleury, the author of the [...]

 Leave a Reply

(required)

(required)


− 2 = three

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>