sponsor Vim development Vim logo Vim Book Ad

java_apidoc.vim : Java API documentation viewer (JavaDoc)

 script karma  Rating 67/29, Downloaded by 4698  Comments, bugs, improvements  Vim wiki

created by
Paul Etchells
 
script type
ftplugin
 
description
When viewing/editing a Java source file, put the cursor on an 'import...' line, or on a class name such as 'String', and then press F2. A browser opens showing the API (generated JavaDoc HTML pages) for the imported package or class. The mechanism can be extended to include your own generated JavaDocs.
 
install details
Put this file in ~/.vim/ftplugin (or wherever Vim looks for plugins), then edit the code following the three lines marked in the script with CONFIGURATION to your taste.

CONFIGURATION - BROWSER
On a recent RedHat distribution, this should work (as will 'dillo', 'opera', 'ygti'), Windows users will probably want to set this to "explorer":
-----------------------------------------------------------------------------
au FileType java let browser="htmlview"
-----------------------------------------------------------------------------

CONFIGURATION - JAVA API PATH
Set the javadoc_path variable to a comma separated list of paths to  the tops of the Javadoc trees. Change these to match your api locations. Windows users: You should use double backslashes when specifying path names, e.g. C:\\jdk\\doc\\api
-----------------------------------------------------------------------------
let javadoc_path="/home/etch/www/dox/java/j2se1.4.2/api"
-----------------------------------------------------------------------------

CONFIGURATION - KEY ASSIGNMENT
This is where you, er, assign the key you want to use.
-----------------------------------------------------------------------------
nmap <F2> :call OpenJavadoc()<CR><CR>
-----------------------------------------------------------------------------
 

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
java_apidoc.vim 3.1.1 2004-06-18 6.0 Paul Etchells Version number in the comment was wrong - otherwise identical to the last version. Thanks to eagle-eyed Mike Arms for spotting that.
java_apidoc.vim 3.1 2004-06-16 6.0 Paul Etchells Improved Win32 compatability.  Thanks to W. H. Jou for the patch.
java_apidoc.vim 3.0 2004-03-28 6.0 Paul Etchells Now same script works on 'nix and win32.
java_apidoc.vim 1.2 2004-03-03 6.0 Paul Etchells Now features fast file indexing by using the allclasses-noframe.html or allclasses-frame.html generated during a javadoc pass - well worth having!
java_apidoc.vim 1.1 2003-12-16 6.0 Paul Etchells Skips 'class-use' folders by default, but these can be searched by setting let s:skip_class_use = 1 at the top of the script.
java_apidoc.vim 2.0 2002-11-13 6.0 kam onn siew 13-Nov-02 Wed 08:18:11 PM
modified to work in Windows environment
java_apidoc.vim 1.0.1 2002-07-29 6.0 Paul Etchells Some minor errors in the comments, viz: java_api_path should be javadoc_path
java_apidoc.vim 1.0 2002-07-29 6.0 Paul Etchells Initial upload
ip used for rating: 18.117.107.90

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