开发者

Vi + Cscope: using "cscope find c function" in vim, finds multiple results, how to go next

开发者 https://www.devze.com 2023-01-29 11:46 出处:网络
When I used this command to search functions who call this function, if there are more than one result, only the first one showed in the buffer, how do I go to the next one with a vi command or shortc

When I used this command to search functions who call this function, if there are more than one result, only the first one showed in the buffer, how do I go to the next one with a vi command or shortcu开发者_StackOverflow社区t keys?


I guess your have modified your .vimrc following the instruction in this page http://vim.wikia.com/wiki/Cscope .

If I am right, try to delete these lines from .vimrc to see if it works :

if has('quickfix') set cscopequickfix=s-,c-,d-,i-,t-,e- endif

It works for me.


use

:help tag-matchlist to learn more

:tnext goes to next match and

:tprev goes to the previous one


Try below commands :cw :cl :cn :cprev :cc


You can use space bar which scrolls to next page of search result , then you can use up/down arrow key to select the file you like to open by hitting enter or any key ,you also know how lines matched for your search at the bottom , while you press space bar you will see the line matched will get decrease ,bcoz we are scrolling the search result page .once you reaced the last page, it will again start from first .

Regards,

Tamil

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号