Difference between revisions of "Markdown"

From WikEmacs
Jump to: navigation, search
m (added major-mode infobox)
(solutions for live preview of markdown)
 
(One intermediate revision by one other user not shown)
Line 9: Line 9:
  
 
This package is not currently part of the Emacs distribution.  
 
This package is not currently part of the Emacs distribution.  
 +
 +
= See also =
 +
 +
== Live preview as you type ==
 +
 +
There are a few possibilities.
 +
 +
=== Impatient-mode ===
 +
 +
See [https://github.com/skeeto/impatient-mode impatient-mode] (in MELPA). It only depends on emacs packages. This package is designed for html though, but it is possible to make it render markdown. Evaluate this somewhere so you have the function:
 +
 +
  defun markdown-html (buffer)
 +
  (princ (with-current-buffer buffer
 +
          (format "<!DOCTYPE html><html><title>Impatient Markdown</title><xmp theme=\"united\" style=\"display:none;\"> %s  </xmp><script src=\"http://strapdownjs.com/v/0.2/strapdown.js\"></script></html>" (buffer-substring-no-properties (point-min) (point-max))))
 +
        (current-buffer)))
 +
 +
Then '''M-x imp-set-user-filter''' in your markdown buffer, and supply markdown-html when it asks for the function. Live updating markdown!
 +
 +
=== Livedown-mode ===
 +
 +
[https://github.com/shime/emacs-livedown livedown] is specific to markdown but it requires nodejs packages (to be easily installed with npm).
  
 
= External Links =
 
= External Links =
Line 14: Line 35:
 
* [http://jblevins.org/projects/markdown-mode/ Markdown Mode Project]
 
* [http://jblevins.org/projects/markdown-mode/ Markdown Mode Project]
 
* [http://jblevins.org/git/markdown-mode.git Source (git)]
 
* [http://jblevins.org/git/markdown-mode.git Source (git)]
 +
* [http://melpa.milkbox.net/#/markdown-toc Markdown-toc (Melpa)], a simple TOC generator for a markdown file
  
 
[[Category:Markup languages]][[Category:Document authoring]]
 
[[Category:Markup languages]][[Category:Document authoring]]

Latest revision as of 07:57, 5 January 2015

Markdown
Library markdown-mode
Command markdown-mode
Builtin no


Markdown Mode provides a major mode for editing Markdown-formatted text files.

This package is not currently part of the Emacs distribution.

See also[edit]

Live preview as you type[edit]

There are a few possibilities.

Impatient-mode[edit]

See impatient-mode (in MELPA). It only depends on emacs packages. This package is designed for html though, but it is possible to make it render markdown. Evaluate this somewhere so you have the function:

  defun markdown-html (buffer)
  (princ (with-current-buffer buffer
          (format "<!DOCTYPE html><html><title>Impatient Markdown</title><xmp theme=\"united\" style=\"display:none;\"> %s  </xmp><script src=\"http://strapdownjs.com/v/0.2/strapdown.js\"></script></html>" (buffer-substring-no-properties (point-min) (point-max))))
        (current-buffer)))

Then M-x imp-set-user-filter in your markdown buffer, and supply markdown-html when it asks for the function. Live updating markdown!

Livedown-mode[edit]

livedown is specific to markdown but it requires nodejs packages (to be easily installed with npm).

External Links[edit]