sponsor Vim development Vim logo Vim Book Ad

BodySnatcher : Generate CSS from HTML doc BODY attribs - updates Web docs quickly. Perl req'd.

 script karma  Rating 5/2, Downloaded by 979  Comments, bugs, improvements  Vim wiki

created by
Sören Andersen
 
script type
utility
 
description
if ! has('perl')
    move along, nothing to see here ;-)
endif

This plugin does a search of lines of a .html document and parses the statement of the <body> attributes. In modern times we prefer to use CSS to control presentational aspects of Web pages like text color, background, and link color.  When designing a site from scratch we'd plan that ahead of time. When updating a handful of pages that were not originally authored with CSS in mind, a script like this saves time by pulling out the expected HTML attributes and converting them to CSS declarations.

Update 13:07(TZ=EDT) - 28.Oct.2004 -
   My thanks to the dozen or so people who have downloaded version 1.3, and please update to
to version 1.4. Important bugs are fixed in this new release.

For more info and an md5 sum to check against, see this tool's home page at
http://intrepid.perlmonk.org/VIMtools/BSn/index.html
 
install details
Place the script somewhere in a "plugin/" directory in VIMRUNTIME, such as
       ~/.vim/plugin
... the plugin does a mapping    <mapleader>))
... change this if you wish.

NOTE: An external Perl module (not part of core Perl distribution) is required: Text::Balanced (see http://search.cpan.org/src/DCONWAY/  for latest version).
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
BodySnatcher.vim 1.4 2004-10-28 6.0 Sören Andersen Many bugs fixed.
   - Does the right thing when there is just a plain <body> tag
   - Also make no changes if the <body> tag contains a STYLE= attribute
   - Broken handling of body declaration that is spread over multiple lines is fixed
BodySnatcher.vim 1.3 2004-10-27 6.0 Sören Andersen Initial upload
ip used for rating: 3.22.181.209

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github