Wednesday, October 31, 2012

Re: saving code browsing history

2012/10/31 happyFace <happyface.tcsh2002@gmail.com>
Hi,

I have been using vim for sometime now but I am completely new to writing vim plugins. I would like to write a plugin that record all the file locations we jump to (with tags or cscope symbols) and save them in a file. So that we can later review the "code browsing session" and be able to conveniently revisit the same tags we browsed.

Hi!

Vim already has that feature. It's called the jumplist.
Couldn't be better explained than by Drew Neil:

There is also a switch to make Vim save its history. 
So after restarting it, you still have your old jumplist.
You can set it in your vimrc, unfortunately I can't remember it right now..

Cheers!
 

I know ":tags" can give us the tags stack but I want also to save cscope symbols accessed.

The only way I can think of for doing this is to remap ctrl+], tag <pattern>, cs find g <pattern>, etc to my own functions which will then do two things:
1- jump to the new tag, symbol.
2- record the location, tag, etc

Is there a better way to go about this? Better yet, is there an existing plugin for this? I could not find any. The closest I found are ":tags" for the tag stack, ":history" for the list of commands history, Taglist plugin but this displays all tags in a file, it doesn't record only those visited...

Thanks,
E.S.


--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: