Vim diffs to webpages
You can export vim's diff windows as html.
The resulting webpage shows all the diff windows as tables next to each other, making for easy sharing of your changes to people who don't have access to the codebase or the tools to do their own diffs (management, for example).
Just add some files to vim's diff windows with :diffthis
and then export them using :TOhtml
. This will place Diff.html
in the working directory. Subsequent exports will be named Diff1.html
etc.
:help TOhtml
for more options.
Written by James Rampton
Related protips
2 Responses
Can you provide me the exact commad?
over 1 year ago
·
From :help TOhtml
:10,40TOhtml " convert lines 10-40 to html
:'<,'>TOhtml " convert current/last visual selection
:TOhtml " convert entire buffer
This will open a new buffer with the result. You can then save that wherever you like.
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Html
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#