publish

publish is a Vim plugin that allows you to publish syntax highlighted buffers automatically.
Download

publish Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Peter Odding
  • Publisher web site:
  • http://www.vim.org/scripts/script.php?script_id=2252

publish Tags


publish Description

publish is a Vim plugin that allows you to publish syntax highlighted buffers automatically. publish is a Vim plugin that allows you to publish syntax highlighted buffers automatically.Developer commentsVim has been my favorite and only editor for several years now.I've customized and written several syntax highlighting modes and everything is set up the way I like it. When I stumbled unto the :TOhtml command I realized Vim could be used to publish source-code on my website. This plugin makes it as easy as :update.Usage:When you've defined the global variables 'publish_pattern' and 'publish_directory' this plugin will automatically publish your buffers whenyou save them. The value of 'publish_pattern' is used as a pattern to search for within the first ten lines of the buffer. If it matches a line, the capture of the first subpattern will be appended to the filepath defined by 'publish_directory' to get the filepath to which the buffer should be published. When the directory 'publish_directory' does not exist you'll be prompted whether you want to temporarily disable automatic publishing. You can do this manually as well by defining 'publish_automatic' to 0. Several globals can be used to change the way your buffers are published, they are the keys documented for the Publish() function prefixed with 'publish_'. Scripting:If you don't like the autocommand but want to publish Vim buffers from your own scripts you can use the function Publish(path ).Several key/value pairs are supported in the 'options' dictionary:colors: Colorscheme to use for publishing the buffer;title: Unencoded content of the < title > element;header: HTML to insert just before the end of < head >;linkify: Replace e-mail addresses with obfuscated hyper links.Note that this plugin overwrites existing files.Requirements:· VimINSTALLATION:Copy the script to your plugin directory, e.g. ~/.vim/plugin/ on UNIX


publish Related Software