Loading ...
Sorry, an error occurred while loading the content.

Re: How to set -P argument for the cscope being run by the vim6.3

Expand Messages
  • Natesh Kedlaya
    Thank you Taylor. Your suggestion worked. I had to make two changes though. 1. unset the env parameter CSCOPE_DB 2. Add an extra condition to handle the
    Message 1 of 3 , May 2, 2007
    • 0 Attachment
      Thank you Taylor.

      Your suggestion worked. I had to make two changes though.

      1. unset the env parameter CSCOPE_DB
      2. Add an extra condition to handle the non-existing CSCOPE_DB env as
      elseif $CSCOPE_DB = ""
      cs add /my/path/cscope.out my/prepend/path
      endif

      For some reason if the CSCOPE_DB env is set the prepend path stuff does not work.

      Thanks,
      Natesh

      ----- Original Message ----
      From: Taylor Venable <taylor@...>
      To: Natesh Kedlaya <nateshkedlaya@...>
      Cc: vim@...
      Sent: Wednesday, May 2, 2007 10:40:28 AM
      Subject: Re: How to set -P argument for the cscope being run by the vim6.3

      On Wed, 2 May 2007 09:05:38 -0700 (PDT)
      Natesh Kedlaya <nateshkedlaya@...> wrote:

      > As one can see from the output, the "prepend path" is set to <none>.
      > How do I set the "prepend path" to some value that I want?
      >
      > I am able to use -P argument of cscope outside the vim to get the
      > intended results but, not in the vim.
      >
      > I am using the Vim 6.3.

      I'm not sure about Vim 6.3 - but in Vim 7.0 you can pass another
      argument to ":cscope add" which sets the prepend path. So for example:

      :cscope add /path/to/database/cscope.out /home/username

      This sets /home/username as the prepend path, as if you had done -P on
      the command line.

      (Upon further inspection, I don't see anything in version7.txt about
      this being new in Vim 7.0 so it should work (I would imagine) in the
      version of Vim you're running.)

      --
      Taylor Venable
      taylor@...
      http://www.metasyntax.net/




      __________________________________________________
      Do You Yahoo!?
      Tired of spam? Yahoo! Mail has the best spam protection around
      http://mail.yahoo.com
    Your message has been successfully submitted and would be delivered to recipients shortly.