Fence Edit

There are, I suppose, reasons that an Emacs user might need or prefer to use Mardown rather than Org mode. A popular reason is that some blogging platforms want their input in Markdown and writing directly in it rather than Org mode, saves the extra exporting step. One very nice feature of Org is the ability to write code snippets in a separate buffer that has the mode of the language you’re writing in.

This is an example of the org-edit-special functionality, which is actually more powerful than just conveniently editing code; take a look at its documentation to see what else it can do. Aaron Bieber, whom I’ve written about before, has brought this functionality to Markdown with his Fence Edit package. Actually, it’s a little more general than merely being a code editing facility for Markdown: you can specify—with regular expressions—the beginning and end of a code snippet and Edit Fence will bring up an appropriate editing buffer for you. Take a look at the README file for the details.

This is really nice. At first it doesn’t seem like much but once you start using org-edit-special you don’t want to go back. Bieber’s package brings the same functionality to Markdown and other situations where it’s convenient to edit a code block in a larger document.

UPDATE [2017-08-12 Sat 19:50]: Fixed link to Fence Edit.

This entry was posted in General and tagged . Bookmark the permalink.