Ⅰ. 插件描述
Make cscope support load DB automatically and build by vim command.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'charz/multi-cscope-db'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'charz/multi-cscope-db'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'charz/multi-cscope-db'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/charz/multi-cscope-db
Ⅳ. 文档说明
Multiple Cscope DB
Purpose
This project is a vim plug-in for Cscope. It can help you to load project's cscope DB automatically if it existed. if no DB is no exist, you can build it in Vim command line(normal mode).
Setup
Install cscope and ctags
$ sudo apt-get install cscope ctags- Install vundle plug-in to manage plug-in or you can manuel install by install.sh
$ sh install.sh Type 'CSBuild' in normal mode of vim
Build new DB, change folder to root of source.
`:CSBuild`Rebuild exist DB, just open any file in folder
`:CSBuild`
- Wait a moment that depend on source code size and file number.
Usage
Work with Linux kernel
$ wget wget https://www.kernel.org/pub/linux/kernel/v3.x/testing/linux-3.14-rc7.tar.xz $ tar Jxf linux-3.14-rc7.tar.xz $ cd linux-3.14-rc7/ $ vim README` **in normal mode of vim** :cs show no cscope connections` :CSBuild Update DB: /home/charz/Work/linux-3.14-rc7/cscope.out` :cs show # pid database name prepend path 0 6813 /home/charz/Work/linux-3.14-rc7/cscope.out <none>`