sponsor Vim development Vim logo go to HTTPS page Vim Book Ad

cHeaderFinder : Finds header required by C functions.

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

created by
Leandro Penz
script type
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>


Rating scripts is only available on the HTTPS page

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:

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.
SourceForge.net Logo