2013-02-26 77 views
3

我用http://cscope.sourceforge.net/cscope_maps.vim的鍵盤映射在cscope中使用鍵盤快捷鍵。我的地圖是使用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查詢匹配的內容

我已經想出了答案,只是發佈它,以便其他人不會像我那樣浪費時間。

+0

您應該將其作爲回答發佈,而不是評論。 :-) – melpomene 2013-02-26 07:10:09

回答

4

您需要檢查nmap後是否有任何額外的選項卡。刪除任何額外的標籤解決了我的問題。 sourceforge網站上的cscope_maps.vim文件包含它們。還要確保'='符號不在任何一邊,而且也可能導致這種類型的錯誤。