You searched for entries containing the word "javadoc".
Matching entries are ordered according to their relevance and not the date they were posted.
You searched for entries containing the word "javadoc".
Matching entries are ordered according to their relevance and not the date they were posted.
I've just been writing a bunch of documentation for some of the behind-the-scenes classes in wwWebflow using Javadoc. Javadoc is pretty neat and I very much like seeing my own classes through the lens of those familiar looking pages. I particularly like the fact that because Javadoc reads the code and automatically documents the public interfaces, all the what is already provided and I only have to provide the why.
au BufRead * set keywordprg=/Users/ben/Documents/bin/google.php
au BufRead *.java set keywordprg=/Users/ben/Documents/bin/google.php\ java\ site:sun.com
Autocommands are a powerful tool in Vim. By assigning autocommands to the BufRead action, I can specify commands to run whenever I move to a buffer. The next argument is a pattern to match on the file name. So here I'm saying, when you transfer to a buffer, set the keyword program to my Googling script. Then if the file is a java file, set the keywordprg to the Google script with some extra arguments which make the search more likely to return Javadoc for the thing I'm Googling.
Result: a custom editing mode for Java which knows more about the document that the standard environment. As I edit more and more files I'll be adding a lot of autocommands for each filetype using much of Vim's functionality, like macros for tags for an HTML mode. Because the menus in Vim are editable from scripts, I can add custom menus for each filetype as well.
It sounds like I should actually be doing this stuff with ftplugins as of version 6 though...
Last updated at 0:35, Monday December 1st, 2008. All times are shown in 24-hour clock format and are GMT.
Rate my journal on bloghop.com: