Created
February 10, 2015 07:03
-
-
Save tommymcdonald/76cab50cad1cdff7ad4a to your computer and use it in GitHub Desktop.
Vim toHTML one-liner
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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