vim, cscope and jump stack

327 views
Skip to first unread message

FlashBurn

unread,
Mar 15, 2013, 5:10:37 PM3/15/13
to vim...@googlegroups.com
Does anybody know if vim has the ability to store a history of my cscope searches?It would be nice if I could jump back to my previous searches or to the files which I jumped from.

Any help is appreciated.

Gary Johnson

unread,
Mar 15, 2013, 5:58:14 PM3/15/13
to vim...@googlegroups.com
As long as you don't exit Vim, the results of the last 10 quickfix
searches will be kept in a stack. See

:help quickfix-error-lists

You can move through the stack with :colder and :cnewer and when
you've reached the desired one, you can jump to the current error in
that list with :cc.

Unfortunately, you can't determine what generated each list, so you
have to remember what you put on the stack.

I don't know of any way to save the quickfix stack between Vim
sessions.

You can jump back in the list of places you've been with Ctrl-O.
See

:help jumplist

HTH,
Gary

Christian Brabandt

unread,
Mar 16, 2013, 8:10:35 AM3/16/13
to vim...@googlegroups.com
Hi Gary!

On Fr, 15 M�r 2013, Gary Johnson wrote:

> Unfortunately, you can't determine what generated each list, so you
> have to remember what you put on the stack.

Recent vim versions store that info in the w:quickfix_title variable.

regards,
Christian
--
Treffen sich zwei Berliner. Sagt der eine:
"Mensch! Hab ick doch am letzten Sonntag 100 Mark beim Rennen verloren!"
"Na, wat rennst auch so?!"

Gary Johnson

unread,
Mar 16, 2013, 4:38:49 PM3/16/13
to vim...@googlegroups.com
On 2013-03-16, Christian Brabandt wrote:
> Hi Gary!
>
> On Fr, 15 M�r 2013, Gary Johnson wrote:
>
> > Unfortunately, you can't determine what generated each list, so you
> > have to remember what you put on the stack.
>
> Recent vim versions store that info in the w:quickfix_title variable.

Cool! One can learn a lot here by giving wrong answers. I hardly
ever open the quickfix window because it hasn't been that useful to
me. Now I'll use it more.

Thanks,
Gary

Tony Mechelynck

unread,
Mar 17, 2013, 2:43:49 AM3/17/13
to vim...@googlegroups.com
On 15/03/13 22:10, FlashBurn wrote:
> Does anybody know if vim has the ability to store a history of my cscope searches?It would be nice if I could jump back to my previous searches or to the files which I jumped from.
>
> Any help is appreciated.
>

cscope can produce a "quickfix list", y'know, like :helpgrep, :vimgrep,
:grep and :make do. It can even produce a "location list" (i.e., a
window-local quickfix list).

See
:help csqf
:help :cscope
:help :lcscope
:help if_cscop.txt
:help quickfix.txt


Best regards,
Tony.
--
This is an especially good time for you vacationers who plan to fly,
because the Reagan administration, as part of the same policy under
which it recently sold Yellowstone National Park to Wayne Newton, has
"deregulated" the airline industry. What this means for you, the
consumer, is that the airlines are no longer required to follow any
rules whatsoever. They can show snuff movies. They can charge for
oxygen. They can hire pilots right out of Vending Machine Refill
Person School. They can conserve fuel by ejecting husky passengers
over water. They can ram competing planes in mid-air. These
innovations have resulted in tremendous cost savings which have been
passed along to you, the consumer, in the form of flights with
amazingly low fares, such as $29. Of course, certain restrictions do
apply, the main one being that all these flights take you to Newark,
and you must pay thousands of dollars if you want to fly back out.
-- Dave Barry, "Iowa -- Land of Secure Vacations"

Reply all
Reply to author
Forward
0 new messages