Markdown in Notepad++ with Perl/Cygwin

Notepad++ is my primary text editor in Windows and I also have Perl installed in Cygwin.
To Markdown files under Notepad++ with NppExec plugin, I use following scripts:

A bash shell script to call Markdown.pl:
[sourcecode language=”bash”]
#!/bin/bash
#c:\cygwin\bin\bash.exe -l "/cygdrive/c/cygwin/home/$USER/Markdown.sh" "$(FULL_CURRENT_PATH)" $(CURRENT_DIRECTORY) $(NAME_PART)
current_path=cygpath -u $1
current_dir=cygpath -u $2
out_file=$current_dir/$3.html
echo "Markdowning file: "$current_path
~/Markdown_1.0.1/Markdown.pl "$current_path" > "$out_file"
echo "Result file: "$out_file[/sourcecode]

The NppExec script:
[sourcecode]
c:\cygwin\bin\bash.exe -l "/cygdrive/c/cygwin/home/$(SYS.USERNAME)/Markdown.sh" "$(FULL_CURRENT_PATH)" "$(CURRENT_DIRECTORY)" "$(NAME_PART)"
NPP_OPEN $(CURRENT_DIRECTORY)\$(NAME_PART).html
[/sourcecode]

The HTML will be opened in Notepad++. I didn’t try to find a way to open it in browser directly yet.

Reference post: “Markdown in Notepad++