03 August 2011

convert text to html in vim with :TOhtml

vim test
i

this is a tip

esc
:TOhtml


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>~/test.html.html</title>
<meta name="Generator" content="Vim/7.3">
<meta name="plugin-version" content="vim7.3v6">
<meta name="syntax" content="html">
<meta name="settings" content="use
css">
<style type="text/css">
<!--
pre { font-family: monospace; color: #eeeeee; background-color: #262626; }
body { font-family: monospace; color: #eeeeee; background-color: #262626; }
-->
</style>
</head>
<body>
<pre>
this is a test
</pre>
</body>
</html>

vim creates a new buffer named test.html. esc :w to write the buffer to file

No comments:

Post a Comment

Pages