When you do this from vi, the window will split into two and one will show the corresponding html code generated (Ok, I hope its understood that this needs to be done when syntax highlighting is enabled). The new file generated will have the name
source $VIMRUNTIME/syntax/2html.vim
My blog on Linux and programming. Covers Linux, VoIP, C, mysql, php and everything else that I come across while tinkering with my Linux boxes.
Saturday, March 28, 2009
2html.vim
Ever wanted to post your c code on your web page just as colorful as it looks in your vi editor? Well, I used to do this very often in the past. But then one fine day my (free) web hosting provider vanished and I lost all that. Then I stopped it for a long time. Recently I wanted to post some C codes that way, but could not remember how to do that. It took me 15-20 minutes of google search to get that command. Well its simple:
. Save this new html file and you are ready to publish your code in its colorful glory.
Labels:
html,
syntax highlighting,
VI,
VIM,
VIMRUNTIME
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment