vim-unite-cscope


Ⅰ. 插件描述

Use cscope within vim

Ⅱ. 基本信息

创建日期:  2015-12-14
使用用户:  3
Github星:  4
插件作者:  Amitabh Das

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/vim-scripts/vim-unite-cscope

Ⅳ. 文档说明

# vim-unite-cscope

Uniting cscope with vim
This is a package similar to my other package (https://www.github.com/amitab/atom-cscope)

PS: I just learnt vim scripting recently and there may be mistakes/better way of doing things.
If you find any problems, please let me know.

What it does?

  • Find this C symbol: ✓
  • Find this global definition: ✓
  • Find functions called by this function: ✓
  • Find functions calling this function: ✓
  • Find this text string: ✓
  • Change this text string: ✗
  • Find this egrep pattern: ✓
  • Find this file: ✓
  • Find files #including this file: ✓
  • Find assignments to this symbol: ✓

Set it up?

This package depends on:

After you've installed the dependencies, you can install this package
with your favioure package manager.

Example:

  • With Vundle -
Plugin 'amitab/vim-unite-cscope'
  • With Pathogen
cd ~/.vim/bundle
git clone https://github.com/amitab/vim-unite-cscope
  • With Neobundle
NeoBundle 'amitab/vim-unite-cscope'

To generate cscope.out manually, in your project directory run:

find . -name "*.c" -o -name "*.cpp" -o -name "*.h" -o -name "*.hpp" > cscope.files
cscope -q -R -b -i cscope.files

And then the package will be able to use the cscope.out file to generate results.

Usage

  1. In command palette, run::Unite cscope/find_this_symbol
  2. Then a prompt appears asking for an input
  3. Input your query and press enter

Screenshots

Input your search term:
ScreenShot

Voila! Results:
ScreenShot

Further Improvements?

  1. Add 'Change this text string' functionality

添加新评论