0

how to jump to next matching result which show in "Location list" more efficiently,when using cscope in VIM?

hi, all: I have tried these commands to jump to next result,but not work:

      | ø      | SHIFT   | CTRL
------+--------+---------+---------
<F11> | :cprev | :cpfile | :colder
<F12> | :cnext | :cnfile | :cnewer

so, I still do it by the still way:

  1. <c-w> j: go to the location list(Quickfix list?)

  2. j : locate to next line

  3. [enter]: go to browse the details

when using source insight, I just need to press <F9> but do the same things.

I want a hotkey to do this.

Mr Lister
  • 45,515
  • 15
  • 108
  • 150
jack guan
  • 331
  • 2
  • 12
  • I have tried `ln` and `lp` also.it will not work again. – jack guan Feb 05 '16 at 13:29
  • What is the value of `'cscopequickfix'`? Check by doing `:set cscopequickfix?`. By default the value of `'cscopequickfix'` is blank meaning cscope results will not be put into the quickfix list. For more help see `:h 'cscopequickfix'` and `:h cscopequickfix`. – Peter Rincker Feb 05 '16 at 16:13
  • the value is : cscopequickfix=s-,g-,d-,c-,t-,e-,f-,i- – jack guan Oct 19 '16 at 06:31
  • I have a plug change quickfix list to location list. so it works: ```noremap :lprevious noremap :lnext``` – jack guan Oct 19 '16 at 06:34

2 Answers2

1

I have the following in my vimrc:

nnoremap <F5> :cp<CR>
nnoremap <F6> :cn<CR>
Vlad Dogaru
  • 1,166
  • 6
  • 11
  • I have a plug change quickfix list to location list. so it works: noremap :lprevious noremap :lnext. Thank you – jack guan Oct 19 '16 at 06:35
0

I have a pluging change quickfix list to location list, which name cscope.vim(brookhong). so it work after mapping this:

noremap <up> :lprevious<CR> noremap <down> :lnext<CR>

jack guan
  • 331
  • 2
  • 12