Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install cscope_maps with vim-plug?

I'm using vim-plug to manage my vim (version 7) plugin dependencies and trying to leverage these cscope key mappings per this tutorial.

Is this something I have to install outside of the plugin system by just copying and pasting it to the ~/.vim/plugged/ directory?

like image 543
tarabyte Avatar asked Sep 20 '25 01:09

tarabyte


1 Answers

I created a mirror from http://cscope.sourceforge.net/cscope_maps.vim and made it available on my repo (https://github.com/dr-kino/cscope-maps).

First, you need to install cscope. After, you need to put the follow lines on your .vimrc:

" Cscope Key Map
call plug#begin('~/.vim/plugged')
Plug 'dr-kino/cscope-maps'
call plug#end()

Open vim and run :PlugInstall

Now you are able to use the key bindings ctrl\ s, ctrl\ f, ctrl\ g, etc.

Do not forget to generate CSCOPE data base in your root project folder, otherwise this will not work.

Example (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

like image 86
Doctor Kino Avatar answered Sep 23 '25 10:09

Doctor Kino