#!/bin/sh lnr="1" while getopts n opt ; do case "$opt" in n) lnr="0" ;; \-) break ;; esac done shift $(expr $OPTIND - 1) file=$(mktemp) if [ -z "$2" ] ; then title="No Title" else title="$2" fi cat > $file vim -nEs $file +"syntax on" \ +"set t_Co=256 ft=$1 tabstop=4 fileencodings=ucs-bom,utf-8,latin,windows-1252" \ +"colorscheme wombat256_thomasba" \ +"let html_no_progress=1" \ +"let html_use_css=1" \ +"let html_number_lines=$lnr" \ +"let html_use_xhtml=1" \ +"run! syntax/2html.vim" \ +"w! $file.html" \ +"qall!" &>/dev/null sed -i 's_/tmp/.*_'"$title"'_' $file.html sed -i '/^