Closed jonahx closed 8 years ago
Does https://github.com/eapache/starscope/blob/master/doc/USER_GUIDE.md#editor-and-workflow-integration answer your question? Vim's cscope integration is quite good already.
If you want to build proper, native integration you will need to write a vim plugin. http://mattmargolis.net/scripting_vim_with_ruby.pdf is a bit old and might be out-of-date, but will probably point you in the right direction.
Thanks for the reply, Evan.
I do use tpopes setup for ctags. But I'm still a little unclear on the steps to use starscope with vim's builtin cscope support. Can you confirm I have it right?
starscope --quiet -e cscope & i
to the tpope git hook files.:he cscope
and then setting up the mappings I want to vim's various cscope commands -- is that correct?:cs add .git/cscope
or something like this, to setup the connection to the cscope db file created by starscope?:cs find...
commands to implement "Find references..." and other similar queries.Just want to make sure I'm understanding everything from a high-level before embarking on the actual setup...
Thanks again.
.git
folder or it will be right at the root of your repository. It shouldn't be anywhere else so it will be easy to check.:cscope help
for a summary help.For what it's worth, the exact section of my .vimrc
dedicated to cscope looks like this:
set cscopetag
set cscopetagorder=1
cscope add cscope.out
nnoremap <Leader>s :cs find s <C-R>=expand("<cword>")<CR><CR>
nnoremap <Leader>c :cs find c <C-R>=expand("<cword>")<CR><CR>
nnoremap <Leader>t :cs find t <C-R>=expand("<cword>")<CR><CR>
nnoremap <Leader>f :cs find f <C-R>=expand("<cfile>")<CR><CR>
nnoremap <Leader>i :cs find i <C-R>=expand("<cfile>")<CR><CR>
Very helpful, ty.
Hi, just found your gem and it looks quite powerful. How would I use this to create a "Find References.." features in vim. I'm imagining my cursor is on a method name, eg, I press a hotkey that I've mapped to something in starscope, and it opens up a quickfix window with the references. Is something like this already supported or would I have to build it on top of starscope and, if so, any tips on doing that?