Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am used to writing text in markdown, and I love notepad++ for its light weight behavior. I am looking for a hint as how can I write markdown text in notepad++, which simulates using a markdown editor behavior.

What are the plugins which can be handy to use the markdown feature?. How to install this feature?

share|improve this question
5  
I don't understand. You can write Markdown in any text editor. –  Oliver Salzburg Apr 22 '13 at 16:52
    
Your question isn't clear. –  Sepahrad Salour Apr 22 '13 at 16:53
    
It sounds like you want to edit rich text using markdown syntax; Notepad++ is of course just a plain text editor, but which supports syntax highlighting. If you really need offline editing capability, you might want to instead look at a desktop editor that supports it, like this open source one –  Geoff Apr 22 '13 at 17:16
    
Perhaps the 'question' at hand is to find a plug-in to do something like the netbeans markdown plugin; this supplies some syntax highlighting and also has a preview mode. The preview mode can be configured to save the HTML version, which I find quite handy for readme files. –  will Mar 31 at 22:54

5 Answers 5

There's a project called Markdown Syntax Highlighting for Notepad++ on GitHub.

This project adds custom language highlighting for Markdown:

enter image description here

There's a version available for both the standard color scheme and the dark (ZenBurn) theme. After installation, you'll find a new option in the Language dropdown.

enter image description here

share|improve this answer
3  
How can I view the preview? –  srk Apr 22 '13 at 17:03
7  
@srk: I don't think you can. If you want a proper Markdown editing experience, I would recommend looking at MarkdownPad. Otherwise, you may have to construct a macro maybe to render the document and open it in a browser. But that would be a horrible workflow I guess :\ –  Oliver Salzburg Apr 22 '13 at 17:06
    
How about this? –  srk Apr 22 '13 at 17:06
    
@srk: It's syntax highlighting just as the one I suggested. At least from what I can tell. –  Oliver Salzburg Apr 22 '13 at 17:08
1  
It's pretty bad syntax highlighting, eg # inside a link highlights to the end of the line like a comment. The project hasn't been touched in 2 years. There are a number of forks, but it is hard to tell which is better. –  NateS Oct 5 '14 at 12:40

If you want to automatically preview Markdown in Notepad++ you can use HTML Preview plugin (ver 1.3 and higher) in combination with markdown tool. In HTML preview plugin you can define filter (program that will be executed on source file automatically before previewing it file). You can define filter using menu option, or manually if you put Filter.ini file in the folder plugins\Config\PreviewHTML. An example of Filter.ini file is enclosed in the Preview plugin archive file available from PreviewHTML web page.

This is example of Filter.ini file that uses python markdown implementation:

; Content of Filter.ini file
[Markdown]
Extension=.md
Language=Markdown
Command=python -m markdown "%1"
share|improve this answer
    
This answer would be better with a few things made clearer. (1) With which menu item one can define a filter? (2) Do you mean the program should take tab X in NPP as input and send output to tab Y in NPP as HTML, which can then be previewed with HTML Preview? Could you specify what exactly is markdown in your command line? I'm trying to get this working with markdown2, but no success yet. –  RolfBly Feb 17 at 13:52
    
It is a little tricky to make this working:1. install python with "pip" (msi installer for python version 3.4.3 does this) 2.install markdown :"pip install markdown" 3. install the version >v1.3 of PreviewHTML, this is important because the plugin manager only provides the v1.2: get it manually from git repo fossil.2of4.net/npp_preview/info/fb02a79e74ace3be 4.create the filter from the menu "plugin/Preview HTML/Edit Filter Definitions" - here paste the Script. And then it works! –  pdem Apr 16 at 12:27

For Syntax highlighting i would go for the solution of "Oliver Salzburg"

here i found a link to an nice trick if you want to preview Markdown in Notepad++ Link to "Trick"

The Gist: There is a NPP extension called NPP_EXEC, which executes scripts. Combine it with the perl (python, node, ...) markdown script to generate HTML output into a tab

It is not very verbose, but i hope this still helps others, that want the same. (Like me:))

Update this is a version, that could be used (it with a node.js implementation of md2html), for people that dont like to wade through documentation:

NPP_SAVE
SET OUTFILE = C:\temp\md2html.html
cmd /c md2html "$(FULL_CURRENT_PATH)" > $(OUTFILE)
NPP_RUN chrome $(OUTFILE)
share|improve this answer
    
Please insert the gist or contents of the link. Links break and fade away which means that that part of your answer becomes meaningless to future visitors. –  Tog Oct 8 '13 at 8:53
    
@Tog Thanks for the Tip. Will do. :) –  winner_joiner Oct 8 '13 at 11:07
    
This answer assumes the reader is either familiar enough with NPP_EXEC or willing to wade through its documentation to find out what exactly the script should be and how to get the output of a markdown-to-html converter in a new tab of Notepad++. –  RolfBly Feb 15 at 21:40
    
@RolfBly i hope my Update helps you. this is how i use it, there are surely better or nicer ways. :) –  winner_joiner Feb 16 at 10:47
1  
NPP_RUN $(OUTFILE) ie without chrome, also works. Launches your default browser with c:\temp\md2html. –  RolfBly Feb 18 at 14:13

The "Edditoria" GitHub repo has a number of bugs (eg, # inside a link is broken) and hasn't been updated in years. After trying out the most active forks, this one is much better.

share|improve this answer

Just a few tweaks to @winner_joiner's answer above. I now have two NPP_EXEC scripts, each under a keyboard shortcut.

One creates an HTML version of the markdown file, with the same filename in the same directory, launches it in the default browser and shuts the console window. You then alt-tab over to the browser to admire the results.

NPP_SAVE
SET OUTFILE = "$(CURRENT_DIRECTORY)\$(NAME_PART).html"
cmd /C \Python34\python.exe -m markdown2 "$(FULL_CURRENT_PATH)" > $(OUTFILE)
NPP_RUN $(OUTFILE)
NPP_CONSOLE 0

The other does the same, except does not launch it in the browser (NPP_RUN $(OUTFILE) isn't there). I find this handy when I've already run the first script once: just alt-tab over to the browser and hit F5 to refresh it, rather than opening a new tab with the most recent edits.

You can save each script with it's own name, stick it in the Macro menu with NPP_EXEC's Advanced Options, and then assign a keyboard shortcut to it via Settings -> Shortcut Mapper.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.