Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to get Vim and CScope set up. A friend of mine has it set up, and it's working well, but when I try to run :cs find f (anything!) Vim outputs:

E319: Sorry, the command is not available in this version.

I've tried with Vim 7.2 and 7.3 with CScope Version 15.7a and 16.0a.

I'm trying to edit inside a Rails application.

share|improve this question
    
Does ":echo has('cscope')" show a 1 or a 0? If 0, your version of Vim doesn't have support for cscope. – Heptite Dec 17 '11 at 2:24
up vote 1 down vote accepted

Make sure +cscope is built in vim.

vim --version

VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Oct 27 2010 17:51:38) MS-Windows 32-bit console version Included patches: 1-46 Compiled by Bram@KIBAALE Big version without GUI. Features included (+) or not (-): +arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con +diff +digraphs ...

share|improve this answer
    
That was it. I just didn't know how to check. Rebuilt it with scope support, and I'm in business. Thank you! – YuKagi Dec 17 '11 at 21:15
    
find $(pwd) -name '.*' -prune -o \( -name '*.h' -o -name '*.cpp' -o -name '*.c' \) -print | cscope -bi- – kev Dec 20 '11 at 1:20
    
export CSCOPE_DB=/path/to/cscope.out – kev Dec 20 '11 at 1:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .