我正在使用vim-plug来管理我的vim(版本7)插件依赖项,并试图利用每个these cscope key mappings的this tutorial。
这是我必须通过将其复制并粘贴到~/.vim/plugged/
目录而在插件系统之外安装的东西吗?
我从http://cscope.sourceforge.net/cscope_maps.vim创建了一个镜子,并在我的仓库(https://github.com/dr-kino/cscope-maps)上提供了它。
首先,您需要安装cscope。之后,您需要在.vimrc上添加以下行:
" Cscope Key Map
call plug#begin('~/.vim/plugged')
Plug 'dr-kino/cscope-maps'
call plug#end()
打开vim并运行:PlugInstall
现在你可以使用键绑定ctrl \ s,ctrl \ f,ctrl \ g等。
不要忘记在根项目文件夹中生成CSCOPE数据库,否则这将无效。
示例(http://cscope.sourceforge.net/cscope_vim_tutorial.html):
find /my/project/dir -name '*.c' -o -name '*.h' > /foo/cscope.files
cd /foo
cscope -b
CSCOPE_DB=/foo/cscope.out; export CSCOPE_DB
BR