Monday, February 1, 2010

Re: Shorten cscope quickfix path?

----- "Ben Fritz" <fritzophrenic@gmail.com> wrote:

> On Feb 1, 1:03 pm, Lewis Thompson <pur...@lewiz.net> 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

No comments:

Post a Comment