使用vim键盘映射后,cscope显示错误

时间:2013-02-26 07:04:51

标签: vim cscope

我使用了来自http://cscope.sourceforge.net/cscope_maps.vim的键盘映射来在cscope中使用键盘快捷键。我的地图是

 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>

当我按下Ctrl-g并将光标放在符号上时,它会转到正确的定义,但会显示此错误。 E259:找不到cscope查询的匹配项

我已经找到了答案,只是将其发布,以便其他人不会浪费我那么多的时间。

1 个答案:

答案 0 :(得分:4)

您需要检查nmap后是否有任何额外的标签。删除任何额外的标签解决了我的问题sourceforge站点上的cscope_maps.vim文件包含它们。另外,确保'='符号的两侧没有空格,这也可能导致这种类型的错误。