7
2
I have a vim open on code, and the code is highlighted. I would like to write this code to a file, including the color codes used to highlight the text. How can I achieve this ?
7
2
I have a vim open on code, and the code is highlighted. I would like to write this code to a file, including the color codes used to highlight the text. How can I achieve this ?
13
Vim's TOHtml
achieves this. It saves the active buffer with the syntax coloring as HTML. It might be included in your Vim installation, so try ahead issuing :TOhtml
.
3alias vimtohtml="vim -c 'set nonu' -c TOhtml -c wqa" - To directly convert without opening the file in vim: vimtohtml <filename> – Bharath K – 2016-10-25T20:11:01.670
3This is the most badass thing I've ever seen. +1 million – Stefano Borini – 2010-11-18T10:26:22.017
Really awesome.. +1 billion – Apple II – 2012-03-04T07:07:09.610