Ⅰ. 插件描述
Print documents in echo area.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'shougo/echodoc'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'shougo/echodoc'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'shougo/echodoc'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/shougo/echodoc
Ⅳ. 文档说明
# echodoc.vim
Displays function signatures from completions in the command line.

Installation
Use a package manager and follow its instructions.
Note: echodoc requires v:completed_item feature. It is added in Vim 7.4.774.
Global options
| Flag | Default | Description |
|---|---|---|
g:echodoc#enable_at_startup | 0 | If the value of this variable is non-zero, echodoc is automatically enabled at startup. |
g:echodoc#type | "echo" | Where the documentation is displayed. Choose between: "echo", "signature", "virtual" or "floating" |
g:echodoc#events | ['CompleteDone'] | If the autocmd-events are fired, echodoc is enabled. |
g:g:echodoc#highlight_identifier | "Identifier" | The highlight of identifier. |
g:echodoc#highlight_arguments | "Special" | The highlight of current argument. |
g:echodoc#highlight_trailing | "Type" | The highlight of trailing. |
Type "echo" Usage
When using
let g:echodoc#type = "echo" " Default valueThe command line is used to display echodoc text. This means that you will
either need to set noshowmode or set cmdheight=2. Otherwise, the `--
INSERT -- mode text will overwrite echodoc`'s text.
When you accept a completion for a function with <c-y>, echodoc will
display the function signature in the command line and highlight the argument
position your cursor is in.
Examples
Option 1:
" To use echodoc, you must increase 'cmdheight' value.
set cmdheight=2
let g:echodoc_enable_at_startup = 1Option 2:
" Or, you could disable showmode alltogether.
set noshowmode
let g:echodoc_enable_at_startup = 1Option 3:
" Or, you could use neovim's virtual virtual text feature.
let g:echodoc#enable_at_startup = 1
let g:echodoc#type = 'virtual'Option 4:
" Or, you could use neovim's floating text feature.
let g:echodoc#enable_at_startup = 1
let g:echodoc#type = 'floating'
" To use a custom highlight for the float window,
" change Pmenu to your highlight group
highlight link EchoDocFloat PmenuOption 5:
" Or, you could use vim's popup window feature.
let g:echodoc#enable_at_startup = 1
let g:echodoc#type = 'popup'
" To use a custom highlight for the popup window,
" change Pmenu to your highlight group
highlight link EchoDocPopup Pmenu