Skip to content

Instantly share code, notes, and snippets.

# Makefile
#
# Converts Markdown to other formats (HTML, PDF, DOCX, RTF, ODT, EPUB) using Pandoc
# <http://johnmacfarlane.net/pandoc/>
#
# Run "make" (or "make all") to convert to all other formats
#
# Run "make clean" to delete converted files
# Convert all files in this directory that have a .md suffix
#!/bin/sh
executable=$1
cd "$executable"
echo "set makeprg=make\ -C\ ../build" > .vimrc
echo "nnoremap <F4> :make!<cr>" >> .vimrc
echo "nnoremap <F5> :!cd ../build/${executable};./${executable}<cr>" >> .vimrc