【问题标题】:cscope shows error after using vim keyboard mapscscope 在使用 vim 键盘映射后显示错误
【发布时间】:2013-02-26 07:04:50
【问题描述】:

我使用来自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 查询找到匹配项

我已经找到答案了,只是贴出来,以免别人像我一样浪费时间。

【问题讨论】:

  • 您应该将其发布为答案,而不是评论。 :-)

标签: vim cscope


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-12-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多