Skip to content

Instantly share code, notes, and snippets.

@jmlacroix
Created September 15, 2011 01:39
Show Gist options
  • Save jmlacroix/1218308 to your computer and use it in GitHub Desktop.
Save jmlacroix/1218308 to your computer and use it in GitHub Desktop.
Outputs VIM syntax highlight styles as CSS
#!/bin/bash
OUTFILE=$(mktemp -t syntax)
vim +'so $VIMRUNTIME/syntax/hitest.vim' \
+'let html_use_css=1' \
+'TOhtml' \
+'v/^\./d' \
+"wq! $OUTFILE" \
+'q!' &>/dev/null
cat $OUTFILE && rm $OUTFILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment