How To Get VIM to Create HTML from PERL

Published Date Author: , Posted October 14th, 2009 at 11:51:06pm

:let html_use_css = 1
:let html_no_pre = 1
:let html_use_encoding = “utf-8”

Use the “:TOhtml” user command. It is defined in a standard plugin.
“:TOhtml” also works with a range and in a Visual area: >
:10,40TOhtml
After you save the resulting file, you can view it with any HTML viewer, such
as Netscape. The colors should be exactly the same as you see them in Vim.

ALTERNATE
This is not a syntax file itself, but a script that converts the current
window into HTML. Vim opens a new window in which it builds the HTML file.
You are not supposed to set the ‘filetype’ or ‘syntax’ option to “2html”!
Source the script to convert the current file:
:runtime! syntax/2html.vim
Warning: This is slow!

No comments as yet.

Leave Your Comment  Leave a comment

All fields marked with "*" are required.