chelper.vim


Ⅰ. 插件描述

Vim plugin that shows the current C function name in the status line

Ⅱ. 基本信息

创建日期:  2014-02-11
使用用户:  5
Github星:  5
插件作者:  Marius Gedminas

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

Overview

Vim plugin to show the name of the current C function in the status line.

.. image:: http://i.imgur.com/CQBYb8C.png
:alt: screenshot

Inspired by Michal Vitecek's pythonhelper.vim__.

__ http://www.vim.org/scripts/script.php?script_id=435

Needs Vim 7.x built with Python support.

Deprecation

This plugin was superseded by `taghelper.vim
https://github.com/mgedmin/taghelper.vim`_, which supports more languages.

Installation

I recommend a plugin manager like vim-plug_::

Plug 'mgedmin/chelper.vim'

.. _vim-plug: https://github.com/junegunn/vim-plug

Manual installation:

  • copy plugin/chelper.vim to ~/.vim/plugin/.
  • copy pythonx/chelper.py to ~/.vim/pythonx/.

Configuration

Add %{CTagInStatusLine()} to your 'statusline', e.g. ::

set statusline=%<%f %h%m%r %1%{CTagInStatusLine()}%%=%-14.(%l,%c%V%) %P

Debugging

:call ShowCTags() will print all the C functions detected in a source

  1. If you find that some C code is parsed incorrectly (my parser is
  2. simple!), please file a bug on GitHub.

Copyright

chelper.vim was written by Marius Gedminas <marius@gedmin.as>.
Licence: MIT.

添加新评论