Doing that requires editing the quickfix list. Refer to the thread
you started April 27, "quickfix window's manual fix", for possible
solutions.
The only other way I can think of to do this is to set your
'grepprg' to "cscope" plus a few cscope options, piped into grep to
select those results matching your filename pattern.
I used to execute cscope searches using :grep and the performance
was pretty good.
> any thoughts ?
Those are my thoughts, but I don't have a canned solution for you.
Regards,
Gary
Do you want to eliminate non-matching entries from the list, or just not
switch to them?
Ben.
There was a message here, that mentioned a plugin that allows you
to modify the quickfix list:
http://groups.google.com/group/vim_use/msg/d622507cbf73a697
So you might want to try this plugin.
regards,
Christian
There was a recent thread where somebody wanted to jump between just
errors, or warnings, or info messages in qf, but the OP seems to have
gone AWOL. However, in that thread, I was thinking something along these
lines would work:
command! -nargs=1 QFNextRegex call QFNextRegex(<f-args>)
command! QFNextError call QFNextRegex('error:')
function! QFNextRegex(regex)
" Gather info about the window state
let l:winnr = winnr()
let l:winrest = winrestcmd()
let l:lastwin = winnr('$')
" Use the error window to find the current error number
copen
let l:errnum = line('.') - 1
" Restore the window state
if l:lastwin != winnr('$')
cclose
endif
exec l:winnr . "wincmd w"
exe l:winrest
" Get the quickfix list
let l:qf = getqflist()
" Find and go to the next matching item in the list
let l:len = len(l:qf)
let l:errnum += 1
while l:errnum < l:len
if l:qf[l:errnum]['text'] =~ a:regex
exe "cc " . (l:errnum + 1)
return
endif
let l:errnum += 1
endwhile
" Give error if not found (hardcoded to English error message)
echoerr "E553: No more items"
endfunction
:QFNextError
:QFNextRegex \<mykeyword\>
I leave it as an exercise to produce the 'previous' version and/or
modify it to truly check the error type rather than just matching the
text and/or add commands for patterns useful to you. :-)
Ben.