0

I use cscope on a large project, 7zip. I generate the cscope database and run the command cscope -d, then I search for the C symbol main, I choose one, press Enter, but I get this:

cchaney@localhost 7zipsources$ cscope -d
Error detected while processing /home/cchaney/.vimrc:
line   10:
E492: Not an editor command:  Plugin 'gmarik/Vundle.vim'
line   29:
E492: Not an editor command:  Plugin 'scrooloose/syntastic'
line   30:
E492: Not an editor command:  Plugin 'a.vim'
line   31:
E492: Not an editor command:  Plugin 'molokai'
line   32:
E492: Not an editor command:  Plugin 'scrooloose/nerdcommenter'
line   33:
E492: Not an editor command:  Plugin 'unimpaired.vim'
line   64:
E518: Unknown option: autochdir
line   89:
E538: No mouse support: mouse=a
line   94:
E518: Unknown option: foldenable
line   95:
E518: Unknown option: foldmethod=syntax
line   96:
E518: Unknown option: foldcolumn=0
line   97:
E518: Unknown option: foldlevel=1
Press ENTER or type command to continue

This is weird, because everything is fine when I open the file directly in vim.

What's going on? How may I fix this?

UPDATE======

Cscope launched vi instead of vim. So , how to fix it?

MMMMMCCLXXVII
  • 571
  • 1
  • 8
  • 23
  • I'm not sure, but it may be that you might've got multiple versions of *vim* installed, and you have `$EDITOR` or `$VISUAL` set to a really old version? – Kusalananda May 30 '15 at 09:53
  • @Kusalananda no. I didn't do anything to that two env variable – MMMMMCCLXXVII May 30 '15 at 10:05
  • That's not quite what I asked. I asked whether they were set to an older version of *vim*. I don't know *cscope*, but are you able to configure what editor to launch somewhere, and is that editor the same as when you just type `vim` on the command line? – Kusalananda May 30 '15 at 10:09
  • @Kusalananda It shows me nothing when i type `echo $EDITOR` or `echo $VISUAL`, is that abnormal? – MMMMMCCLXXVII May 30 '15 at 10:15
  • 1
    No, it's not, but it seems *cscope* is launching a very old version of *vim* somehow. – Kusalananda May 30 '15 at 10:18

1 Answers1

0

Try setting vim as your cscope's default editor

export CSCOPE_EDITOR=vim

Make sure that you add this line in your .bash_profile file so you don't have to manually do it every time.

See section ENVIRONMENT VARIABLES in cscope man page

theman
  • 598
  • 1
  • 7
  • 19