Question

I have tried the tutorial here: Vim/Cscope tutorial. After changing the @'s in the cscope_maps.vim file to SPACE I got Ctrl-SPACE s to launch cscope in gVim. However, it takes over the whole window rather than splitting the window for the cscope info.

I then tried as suggested in the comments to the cscope_maps.vim file changing nmap <C-SPACE>s :scs find s <C-R>=expand("<cword>")<CR><CR> to nmap <C-SPACE>s <C-W><C-S> :cs find s <C-R>=expand("<cword>")<CR><CR> because it appears that my gVim does nto support the :scs command. However, this still displays the cscope info in a full window, blocking out my code. When I exit the cscope interface, I return to two split screens.

Any help on how to craft a command in gVim 7.3 that will launch cscope in a split window?

Was it helpful?

Solution

scscope find c foo does what it's supposed to do: display a list of functions calling foo in the command line and open the chosen one in an horizontal split.

But that is not what you want, is it?

The list of possible targets is always displayed in the command line which is expanded as needed: it can't be displayed in a window at all.

cscope in action (default)

That said, you can use the quickfix window to display the list instead of the command line, see :help cscope-options.

cscope in action (quickfix)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top