Follow these simple steps to install the markdown mode for your emacs.
Extract the package and place it at
~./.emacs.d/or at default path (if you are aware of it) to place your modules. For Windows put them under
.emacsfile in your home folder
Add the following lines to the
.emacsfile. This helps to setup the markdown mode.
Here make a note that I’m using the extension
.mdto tell the plugin to treat all the files ending with
.mdas markdown files. If you want, you can use any extension you prefer.
If you have downloaded the multi-markdown installer, the scripts will be installed at
/usr/local/bin/multimarkdown. Or if you cant find where it is located, open your Terminal and type this command
$ which multimarkdown
You will get the path and note it somewhere.
Reload the settings by the command
M-x load-file ~/.emacs. This command will load the new settings.
Open a new markdown file
C-x C-f test.md. Tada. you will find the mode to be
So far so good, you now need to configure the plugin to use the appropraite markdown script to convert the markdown code to XHTML.
M-x customize-modeto open the customization settings for the Markdown Mode. You should be in the same mode when you type the command.
The first customization option is to put your version of markdown program. Since you have already noted the path, put the path into it.
- Second, the option
markdown-command-needs-filename, keep this ‘nil’, as your purpose of setting this mode is to feed the content from your editor to the markdown program.
- Save your settings by click on Set for Current Session, then Save for future session and then Exit
If you have done with all these settings, you are good to go. And if you are lazy to work with emacs or do all these settings, you can grab GUI live editors like MarkdownLive for mac or MarkdownPad for Windows. Or if you need more choice, here it is.