Cool, it worked great. Thanks a lot!
On Jun 16, 11:07 am, Gary Johnson <[email protected]> wrote:
> On 2009-06-16, Matt Wozniski wrote:
>
>
>
> > On Tue, Jun 16, 2009 at 1:27 PM, Navdeep Parhar wrote:
>
> > > On Tue, Jun 16, 2009 at 10:21 AM, sinbad<[email protected]> wrote:
>
> > >> how can i scan through the list instances given by the cscope.
> > >> for example i searched for symbol "abc" in big piece of code.
> > >> it showed up 25 instances of abc, i will select instace 1, if that is
> > >> not
> > >> the one i am looking for i have to to the search again. i feel this
> > >> will be
> > >> difficult if i had to go over all the 25 instances. I am looking for
> > >> some kind
> > >> of shortcut which will take me to all instances in a sequenced manner
> > >> like if i
> > >> press <C-N>. I hope i am clear.
>
> > > If you have the cscope results in a location window, you can use :lnext
> > > and :lprev to look at the results in forward/backward sequence.
>
> > > See help for :lcscope and location lists.
>
> > Also, see :help 'cscopequickfix'
>
> ... and the surrounding text for other good tips on using cscope
> with Vim.
>
> Cscope normally puts its results in a quickfix list rather than a
> location list. You can see and navigate this list by executing
>
> :copen
>
> An easy way to traverse the list as you requested, by using <C-N>
> for example, is to use these mappings:
>
> nmap <silent> <C-N> :cn<CR>zv
> nmap <silent> <C-P> :cp<CR>zv
>
> The zv at the end opens the current fold in the event that <C-N> or
> <C-P> takes you into some folded code.
>
> HTH,
> Gary
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---