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

Shorten cscope quickfix path?

Expand Messages
  • Lewis Thompson
    Hi guys I m using cscop and have cscopepathcomp=3 set in my .vimrc. This works correctly for lookups that don t use the quickfix window. However when the
    Message 1 of 3 , Feb 1, 2010
    • 0 Attachment
      Hi guys

      I'm using cscop and have cscopepathcomp=3 set in my .vimrc. This
      works correctly for lookups that don't use the quickfix window.

      However when the quickfix window gets used I still see the full path
      which is usually *very* long.

      Does anybody know if I can trim the file path in the quickfix window?

      Many thanks!

      Lewis

      --
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • Ben Fritz
      ... I don t know it for a fact, but from experience it seems that the quickfix window shows paths based on your current directory. You could change your
      Message 2 of 3 , Feb 1, 2010
      • 0 Attachment
        On Feb 1, 1:03 pm, Lewis Thompson <pur...@...> wrote:
        >
        > Does anybody know if I can trim the file path in the quickfix window?
        >

        I don't know it for a fact, but from experience it seems that the
        quickfix window shows paths based on your current directory. You could
        change your directory with :cd or :lcd or use the 'autochdir' option
        if it bothers you. I don't think there's much way around it otherwise.

        --
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
      • Bryan Venteicher
        ... IIRC, when listing results in the quickfix window, the path will be whatever is in the Cscope DB plus any prepend path given with :cs add. I ran into a
        Message 3 of 3 , Feb 1, 2010
        • 0 Attachment
          ----- "Ben Fritz" <fritzophrenic@...> wrote:

          > On Feb 1, 1:03 pm, Lewis Thompson <pur...@...> wrote:
          > >
          > > Does anybody know if I can trim the file path in the quickfix
          > window?
          > >
          >
          > I don't know it for a fact, but from experience it seems that the
          > quickfix window shows paths based on your current directory. You
          > could
          > change your directory with :cd or :lcd or use the 'autochdir' option
          > if it bothers you. I don't think there's much way around it
          > otherwise.
          >

          IIRC, when listing results in the quickfix window, the path will be whatever
          is in the Cscope DB plus any prepend path given with :cs add.

          I ran into a similar problem at $JOB. What I ended up doing was adding
          QuickFixCmd{Pre,Post} Cscope autocmd events [1] using the Post event to,
          among other things, strip off part of the path.

          I had talked with Bram offlist about getting the Cscope events added, but
          his reply had gotten lost in a deluge of email until this post caused me
          to go search my email. I'll try to talk with him again about it this week.

          [1] http://groups.google.com/group/vim_dev/msg/ed748eb60917d946

          --
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
        Your message has been successfully submitted and would be delivered to recipients shortly.