Vim Tips Wiki
Register
No edit summary
 
(Remove html character entities)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{review}}
 
{{review}}
  +
{{TipImported
{{Tip
 
 
|id=232
 
|id=232
  +
|previous=231
|title=Search JDK help for keyword at cursor
 
  +
|next=234
|created=April 5, 2002 23:48
+
|created=April 5, 2002
 
|complexity=basic
 
|complexity=basic
 
|author=Sean Richards
 
|author=Sean Richards
 
|version=6.0
 
|version=6.0
 
|rating=69/28
 
|rating=69/28
  +
|category1=
|text=
 
  +
|category2=
If you are using the Win32 version of Vim you can use this tip to search the Jdk help for the keyword under the cursor.
 
 
}}
 
If you are using the Win32 version of Vim you can use this tip to search the Jdk help for the keyword under the cursor.
   
You need the winhlp32 version of the Jdk docs from this URL - http://www.confluent.fr/javadoc/indexe.html.
+
You need the winhlp32 version of the Jdk docs from this URL - http://www.confluent.fr/javadoc/indexe.html.
   
It is a 16mb D/L and approx 85mb unzipped!
+
It is a 16mb D/L and approx 85mb unzipped!
   
 
I added a command to the popup menu
   
 
:amenu PopUp.JavaHelp :!start winhlp32 -k <cword> F:\jdk\winhelp\JDK13.HLP <CR
   
 
And also made a keymapping
I added a command to the popup menu
 
 
:amenu PopUp.JavaHelp :!start winhlp32 -k &lt;cword&gt; F:\jdk\winhelp\JDK13.HLP &lt;CR
 
 
 
 
And also made a keymapping
 
 
map J :!start winhlp32 -k &lt;cword&gt; F:\jdk\winhelp\JDK13.HLP &lt;CR&gt;
 
 
 
 
Trivial yes, but I find it quite useful.
 
}}
 
   
 
map J :!start winhlp32 -k <cword> F:\jdk\winhelp\JDK13.HLP <CR>
== Comments ==
 
Not a bad idea. Here is one for ColdFusion programmers on Windows:
 
   
 
==Comments==
map K :!"C:\Program Files\Internet Explorer\iexplore.exe" [http://servername/cfdocs/searchmain.cfm?searchstring=<cword><CR> http://servername/cfdocs/searchmain.cfm?searchstring=&lt;cword&gt;&lt;CR&gt;];
 
 
Here is one for ColdFusion programmers on Windows:
   
 
map K :!"C:\Program Files\Internet Explorer\iexplore.exe" [http://servername/cfdocs/searchmain.cfm?searchstring=<cword><CR> http://servername/cfdocs/searchmain.cfm?searchstring=<cword><CR>];
where "servername" is the name of a server that has the ColdFusion documentation installed.
 
   
 
where "servername" is the name of a server that has the ColdFusion documentation installed.
By the way, I mapped it to K because K is Vim's default "help on keyword under cursor" function, which (traditionally) calls up the Unix 'man' program. Vim on Windows doesn't use man, though, so it makes sense to map that to something specific to the language I use most. (If you work with multiple languages, why not add language-specific K mappings for each to filetype.vim? You could get the right help program for whichever language you were working with.)
 
   
 
By the way, I mapped it to K because K is Vim's default "help on keyword under cursor" function, which (traditionally) calls up the Unix 'man' program. Vim on Windows doesn't use man, though, so it makes sense to map that to something specific to the language I use most. (If you work with multiple languages, why not add language-specific K mappings for each to filetype.vim? You could get the right help program for whichever language you were working with.)
In a standard Vim install, J is used in command-mode to join together two lines of text. I find it very useful -- it allows me to bring the next line up without moving my cursor around.
 
   
 
In a standard Vim install, J is used in command-mode to join together two lines of text. I find it very useful -- it allows me to bring the next line up without moving my cursor around.
   
jmcpherson--AT--softhome.net
 
, April 9, 2002 9:29
 
 
----
 
----
<!-- parsed by vimtips.py in 0.553424 seconds-->
 

Latest revision as of 05:25, 29 September 2008

Tip 232 Printable Monobook Previous Next

created April 5, 2002 · complexity basic · author Sean Richards · version 6.0


If you are using the Win32 version of Vim you can use this tip to search the Jdk help for the keyword under the cursor.

You need the winhlp32 version of the Jdk docs from this URL - http://www.confluent.fr/javadoc/indexe.html.

It is a 16mb D/L and approx 85mb unzipped!

I added a command to the popup menu

:amenu PopUp.JavaHelp :!start winhlp32 -k <cword> F:\jdk\winhelp\JDK13.HLP <CR

And also made a keymapping

map J :!start winhlp32 -k <cword> F:\jdk\winhelp\JDK13.HLP <CR>

Comments[]

Here is one for ColdFusion programmers on Windows:

map K :!"C:\Program Files\Internet Explorer\iexplore.exe" <cword><CR> http://servername/cfdocs/searchmain.cfm?searchstring=<cword><CR>;

where "servername" is the name of a server that has the ColdFusion documentation installed.

By the way, I mapped it to K because K is Vim's default "help on keyword under cursor" function, which (traditionally) calls up the Unix 'man' program. Vim on Windows doesn't use man, though, so it makes sense to map that to something specific to the language I use most. (If you work with multiple languages, why not add language-specific K mappings for each to filetype.vim? You could get the right help program for whichever language you were working with.)

In a standard Vim install, J is used in command-mode to join together two lines of text. I find it very useful -- it allows me to bring the next line up without moving my cursor around.