2htmlj


Ⅰ. 插件描述

Slightly modified 2html.vim script for use with javadoc

Ⅱ. 基本信息

创建日期:  2004-05-31
使用用户:  1
Github星:  1
插件作者:  Charles Shooshan

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin '/2htmlj'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle '/2htmlj'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug '/2htmlj'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/vim-scripts/2htmlj

Ⅳ. 文档说明

I have modified the great 2html.vim script contained in the distribution for use with javadoc documents. My changes may be of use to others as well.

Specific purpose: when creating Java API Documents with the -linksource option, the documents include copies of source code but (glaring omission) the html source pages are not syntax-highlighted.

My changes to the 2html.vim script allow the resulting html documents to be exchanged with those in the src-html folder thus creating syntax-highlighted html pages in the API documentation.

The key addition is the "id" attribute at the beginning of each code line so that every line of code can be reached like this: Hello.html#line.15.

What was: <span class="lnr"> 11</span>
is now: <span id="line.11" class="lnr"> 11</span>

I also added the options of short_name and short_title so that Hello.java becomes Hello.html not Hello.java.html and that the html document title is the name of the source file.

Please see my comments in the script.

Note: I tried hard not to break anything in the existing script. I would appreciate any feedback. Thanks.

添加新评论