Hints for C Library Functions


Ⅰ. 插件描述

while typing a C function, a prototype is shown (man2 based)

Ⅱ. 基本信息

创建日期:  2007-03-14
使用用户:  1
Github星:  1
插件作者:  Charles Campbell

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin '/hints-for-c-library-functions-hard-things'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle '/hints-for-c-library-functions-hard-things'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug '/hints-for-c-library-functions-hard-things'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/vim-scripts/Hints-for-C-Library-Functions

Ⅳ. 文档说明

This script may be manually sourced or, if placed in .vim/ftplugin/c, will be automatically sourced whenever a C file is edited (which is where vimball will put it).  The prototypes within it are based on gcc's /usr/share/man/man2 directory.

This plugin is truly simple to use: after one has typed a function name, a protype "hint" will be shown.

ex.    select(

       will result in

          int select(int nfds, fd_set readfds, fd_set writefds, fd_set exceptfds, struct timeval utimeout)

       being echo'd at the bottom of the display.

You'll probably want your cmdheight option set to at least two (ie.  set ch=2).

(see vimscript#1826 for man-3 based function hints)
(see http://www.drchip.org/astronaut/vim/index.html#HINTSMAN2 for the latest version)

添加新评论