echofunc.vim


Ⅰ. 插件描述

Display c/c++ function declaration in vim command/status line.

Ⅱ. 基本信息

创建日期:  2006-12-21
使用用户:  89
Github星:  31
插件作者:  Ming Bai

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'mbbill/echofunc-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

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

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'mbbill/echofunc-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'mbbill/echofunc-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/mbbill/echofunc

Ⅳ. 文档说明

### Link to vim.org

Install

  1. Method 1: download the entire 'after' directory and put in your plugin directory.
  2. Method 2: Use pathogen or vundle to clone this repo.

    1. add the following line in your vimrc to let pathogen recognize the 'after' folder.

    call pathogen#incubate("after")

How to use

  1. echofunc.vim get function information from tags file. So first of all you need to create tags for your code.
    Use the following command to generate tags with language and signature fields:

$ctags -R --fields=+lS .

  1. echofunc.vim maps ( in insert mode in order to automatically display function info after left bracket is pressed. So please make sure the left bracket ( is not mapped by other plugins. You may check it using :imap (.
  2. The function info is displayed in message line by default. Since the message line may be flushed by other trivial messages, a better way is to show function info in status line by appendding %{EchoFuncGetStatusLine()} into your statusline option.
  3. Another feature of echofunc.vim is to privide a balloon tip when the mouse cursor hovers a function name, macro name, etc. This feature is enabled when +balloon_eval is compiled in.

Screenshot


添加新评论