publish.vim : Publish hyperlinked, highlighted source code using Vim, 2html.vim and rsync
script karma |
Rating 17/5,
Downloaded by 5678 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Peter Odding |
|
script type |
utility |
|
description |
This plug-in uses the 2html.vim script included with Vim's runtime files to publish a collection of syntax highlighted files as HTML documents and then replaces identifiers such as function and variable names in the HTML output with hyper links (based on available tags as generated by Exuberant Ctags). The result is a directory (tree) of syntax highlighted, interlinked HTML documents. I've published the plug-in's source code as a demonstration at http://peterodding.com/code/vim/profile/plugin/publish.vim. For more information about the plug-in please refer to its homepage or the project page on GitHub:
• http://peterodding.com/code/vim/publish/
• http://github.com/xolox/vim-publish
If you have questions, bug reports, suggestions, etc. the author can be contacted at [email protected]. If you like this plug-in please vote for it below! |
|
install details |
Unzip the most recent ZIP archive file (see below) inside your Vim profile directory (usually this is "~/.vim" on UNIX and "%USERPROFILE%\vimfiles" on Windows), restart Vim and execute the command ":helptags ~/.vim/doc" (use ":helptags ~\vimfiles\doc" instead on Windows).
As an example we'll publish the plug-in using itself. First create a tags file that contains entries for the files you want to publish using a shell command such as:
ctags -Rf ~/.publish_tags ~/.vim/
If this doesn't work because "ctags" isn't installed you can download it from the Exuberant Ctags homepage http://ctags.sourceforge.net/ or if you're running Debian/Ubuntu you can install it by executing the following shell command:
sudo apt-get install exuberant-ctags
The plug-in needs an up-to-date tags file so that it can create hyper links between the published files. Now start Vim and write a script that registers the tags file you just created and calls the function Publish() as follows:
set tags=~/.publish_tags
let sources = '/home/peter/.vim'
let target = 'sftp://peterodding.com/code/vim/profile'
call Publish(sources, target, [
\ 'autoload/xolox/escape.vim',
\ 'autoload/xolox/path.vim',
\ 'autoload/publish.vim',
\ 'plugin/publish.vim',
\ ])
Change the "sources" and "target" variables to reflect your situation, save the script as "~/publish_test.vim" and execute it in Vim by typing ":source ~/publish_test.vim" (without the quotes) and pressing Enter↵. If everything goes well Vim will be busy for a moment and after that you will find a bunch of syntax highlighted, interlinked HTML documents in the target directory! |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 142.132.191.50
|