sponsor Vim development Vim logo Vim Book Ad

winhelp : A script for easy lookup in Windows .chm and .hlp help files.

 script karma  Rating 15/10, Downloaded by 2010  Comments, bugs, improvements  Vim wiki

created by
Peter Puck
 
script type
utility
 
description
This script lets you setup a collection of help files in Windows .hlp and
.chm format and search for the word under the cursor in them. The current
files and state is stored in the scricpt file for further sessions. Use the
new winhelp dropdown menu to add or remove files.
Check out tip #506
http://www.vim.org/tips/tip.php?tip_id=506
and tip #232
http://www.vim.org/tips/tip.php?tip_id=232

The default keymappings for normal mode are:
Ctrl+Shift+F1 - pops up a menu with the help files and search the selected
file for the word under the cursor.
Ctrl+F1 - search the current help file for the word. Use the winhelp menu
for setting the current help file.

BUGS/Features
-If the path to a.chm file has any spaces does not keyhh or hh works
properly. I think this is a known issue with Windows HTML help. Bob solved
it by linking directories and I think that is the only way.
-If you do an ALT+TAB to get away from a .chm file may you see an temporary
extra copy in the taskbar. Note that the icons for .chm is the ones
normally used for .hlp files.
-It will probably take some time before you get used to how keyhh works.
In my experience does it work very well but sometimes do you have to look twice to see it. :)  
-The popup menu can be incorrect after removing a file from  the collection. After a restart is it OK.
 
install details
The script must be in the $VIM/vimfiles/plugin/ directory.
For the .hlp files is the script using Windows winhelp program. You can test with a "winhelp helpfile.hlp" from the command line. If no luck can you try to replace winhelp with winhlp32 in the script but I belive this is the same.
For the .chm files is keyhh from this page used
http://www.keyworks.net/keyhh.htm
It worked for me but I dont know if you need the HTML workshop installed?
My suggestion is to visit MSDN in case of problems. Here is a direct
link to the HTML help downloads from MSDN
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhelp/html/hwMicrosoftHTMLHelpDownloads.asp

MSDN is also the main source for .chm files. The Platform SDK has a complete set of .chm files for Windows. Borland has some .hlp files here
http://info.borland.com/techpubs/bcppbuilder/v5/updates/ent.html
there the most interesting are
B5MS.ZIP - Win32 API documentation old but useful with stuff like
OpenGL1.1, a similar file can be downloaded from the lcc compiler page
B5SCL.ZIP - Standard C++ library help with STL
B5RTL.ZIP - C lib reference

Java users should take a look at tip #232 mentioned above.
 

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
winhelp.vim 2.0 2003-09-05 6.0 Peter Puck Fixed so that help files can be in a path with spaces, thanks to Bob Davis for the bug report. It still does not work properly for .chm files in such paths but the bug is not in the script.
Fixed some other bugs and updated the documentation.
winhelp.vim 1.0 2003-08-28 6.0 Peter Puck Initial upload
ip used for rating: 3.238.5.144

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