sponsor Vim development Vim logo Vim Book Ad

cHeaderFinder : Finds header required by C functions.

 script karma  Rating 3/5, Downloaded by 1564  Comments, bugs, improvements  Vim wiki

created by
Leandro Penz
 
script type
utility
 
description
This script can find the header or list of headers requires by a particular C function. It uses man pages, chapters 2 and 3. If not found there, it uses the tags file in combination with the a.vim plugin.
All that without spoiling the jumplist!!!

Under suggested settings:
\f: gets all the headers required by the function under the cursor and puts them in the default register, so you can go to the top of the C source and 'p' them.
\a: goes to the header of the function under the cursor. It's usually where it *should* be documented.
 
install details
This script requires a.vim (http://www.vim.org/scripts/script.php?script_id=31).

Just put the cHeaderFinder.vim in the plugin directory. Help is autoinstalled at the first run.

It does not bind any key by default. The recommended binds should be pasted in ~/.vimrc:
nnoremap <leader>f :call CHeaderFinder_HeadersFromFuncUnderCursor()<CR>
nnoremap <leader>a :call CHeaderFinder_GotoHeaderFromFuncUnderCursor()<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
cHeaderUtils.vim 1.3 2007-06-13 6.0 Leandro Penz New function that uses tags to perform '[i' much faster.
nnoremap <leader>[i :call CHeaderUtils_PrototypeFromFuncUnderCursor()<CR>
cHeaderFinder.vim 1.2 2005-10-15 6.0 Leandro Penz Initial upload
ip used for rating: 216.73.216.130

Questions about Vim should go to the maillist. Help Uganda.     Vim at Github