先上效果图:
1.只要把鼠标停留在函数名上,就自动显示它原型;
2.在编辑时,输入函数和(后就在命令行提示函数原型,
3.详细用途请看它的说明
下载地址:
http://www.vim.org/scripts/script.php?script_id=1735
Usage: When you type '(' after a function name
in insert mode, the function declaration
will be displayed in the command line
automatically. Then you may use Alt+- and
Alt+= (configurable via EchoFuncKeyPrev
and EchoFuncKeyNext) to cycle between
function declarations (if exists).
Another feature is to provide a balloon tip
when the mouse cursor hovers a function name,
macro name, etc. This works with when
+balloon_eval is compiled in.
Because the message line often cleared by
some other plugins (e.g. ominicomplete), an
other choice is to show message in status line.
First, add %{EchoFuncGetStatusLine()} to
your 'statusline' option.
Second, add the following line to your vimrc
let g:EchoFuncShowOnStatus = 1
to avoid echoing function name in message line.
Options: g:EchoFuncLangsDict
Dictionary to map the Vim file types to
tags languages that should be used. You do
not need to touch it in most cases.
g:EchoFuncLangsUsed
File types to enable echofunc, in case you
do not want to use EchoFunc on all file
types supported. Example:
let g:EchoFuncLangsUsed = ["java","cpp"]
g:EchoFuncMaxBalloonDeclarations
Maximum lines to display in balloon declarations.
g:EchoFuncKeyNext
Key to echo the next function.
g:EchoFuncKeyPrev
Key to echo the previous function.
g:EchoFuncShowOnStatus
Show function name on status line. NOTE,
you should manually add %{EchoFuncGetStatusLine()}
to your 'statusline' option.
g:EchoFuncAutoStartBalloonDeclaration
Automatically start balloon declaration if not 0.
g:EchoFuncPathMappingEnabled
g:EchoFuncPathMapping
The new feature added by Zhao Cai provides ability
to shorten file path in some specific directory. e.g.
/home/username/veryveryvery/long/file/path/blabla
could be showed as
~/veryveryvery/long/file/path/blabla
If you want to disable this feature, add
let g:EchoFuncPathMappingEnabled = 0
to your vimrc. It's enabled by default.
To add more mappings in g:EchoFuncPathMapping, search
this script and you will know how to do it.
Thanks: edyfox
minux
Zhao Cai