Any pointers please!

Thanks,
Natesh


----- Original Message ----
From: Natesh Kedlaya <[EMAIL PROTECTED]>
To: [email protected]
Sent: Thursday, May 3, 2007 10:28:15 AM
Subject: Error while opening the cscope referenced file in vim

Hi,
  I have built a cscope db of a source tree which was mounted on /mnt.
  Now, I want to use the same cscope db on the same source tree but mounted
  on a different mount point /scratch.

  I could achieve this using the standard cscope and EDITOR env variable
  trick as shown below.
  1. set the EDITOR to a shell script of my own. The shell script contains
     the following lines in it.

     #!/bin/sh
     offset=$1
     fname=`echo $2 | sed s@/mnt/@/scratch/@`
     xterm -e /usr/bin/vim $offset $fname

  2. Run cscope and when it tries to open a file, it goes through my
    EDITOR script and does the right job.


  How do I achieve the same in vim6.3?
  I have the necessary settings in my .vimrc to work with cscope :

  if has("cscope")
    set cscopeprg=/usr/local/bin/cscope
    set csto=0
    set cst
    set nocsverb
    " add any database in current directory
    if filereadable("cscope.out")
      cs add cscope.out
      " else add database pointed to by environment
    elseif $CSCOPE_DB != ""
      cs add $SRCHOME/$NDE_PRODUCT/utl/ $SRCHOME -U
    endif
    set cspc=5
    set csverb
  endif


Thanks,
Natesh




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 





 
____________________________________________________________________________________
Don't get soaked.  Take a quick peak at the forecast
with the Yahoo! Search weather shortcut.
http://tools.search.yahoo.com/shortcuts/#loc_weather

Reply via email to