Skip to content

Instantly share code, notes, and snippets.

@tommymcdonald
Created February 10, 2015 07:03
Show Gist options
  • Save tommymcdonald/76cab50cad1cdff7ad4a to your computer and use it in GitHub Desktop.
Save tommymcdonald/76cab50cad1cdff7ad4a to your computer and use it in GitHub Desktop.
Vim toHTML one-liner
## converts files to html and
## opens them in browser.
## add to .bashrc or .zshrc & source the file
# usage: vimhtml yourfilename
vimhtml(){
ext=".html"
vim -f +"syn on" +"TOhtml" +"wq" +"q" $1
open $1$ext
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment