3

I used the keyboard mappings from http://cscope.sourceforge.net/cscope_maps.vim to have keyboard shortcuts in cscope. My maps are

 nmap <C-s> :cs find s <C-R>=expand("<cword>")<CR><CR>    
 nmap <C-g> :cs find g <C-R>=expand("<cword>")<CR><CR>
 nmap <C-c> :cs find c <C-R>=expand("<cword>")<CR><CR>
 nmap <C-x> :cs find t <C-R>=expand("<cword>")<CR><CR>
 nmap <C-e> :cs find e <C-R>=expand("<cword>")<CR><CR>
 nmap <C-f> :cs find f <C-R>=expand("<cfile>")<CR><CR>
 nmap <C-i> :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
 nmap <C-d> :cs find d <C-R>=expand("<cword>")<CR><CR>

When I press Ctrl-g with the cursor on a symbol, it goes to the proper definition but shows this error. E259 : no matches found for cscope query

I have figured out the answer, just posting it so that someone else will not waste as much time as I did.

saketrp
  • 2,323
  • 3
  • 16
  • 18

1 Answers1

4

You need to check if there are any extra tabs after the nmap. Removing any extra tabs solved my problem. The cscope_maps.vim file on the sourceforge site has them. Also do make sure that the '=' symbol is not flanked on either side by a space, that too can lead to this type of an error.

saketrp
  • 2,323
  • 3
  • 16
  • 18