看板 Linux 關於我們 聯絡資訊
我的vim不能用 cs find s 等其他方法去找 function 或 symbol 我先說一下我怎麼 build 好了 Command 如下 find "$(pwd -P)" -name "*.c" -o -name "*.h" > cscope.files cscope -Rbqk -i cscope.files 以上兩個指令下在 project 的 Root 然後 .vimrc 參考這邊的做法 https://www.ptt.cc/bbs/Linux/M.1260968163.A.227.html 來取得 database,確保我在 project內的所有 folder 開檔都可以拿到database 我有使用 :cs show 來看有沒有正確載入,確實有載入我要的 cscope.out 但是就是沒辦法用,用 cs find s等等都不行,都會出現E259 matches no found... 但奇怪的是,我在 project 的 root 用以下 command cscope -Rbqk - I cscope.files 進入到互動介面後,整份 project 的 symbol 和 function 都可以如預期找到 我感覺像是 vim 除了狀況 但我不知道該怎麼查出來QQ ---- Sent from BePTT on my Samsung SM-M536B -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 101.12.28.180 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Linux/M.1669639648.A.CC8.html
drm343: 不知道你的 vim 設定,有用那些 plugin 嗎? 11/28 21:47
shane87123: 老實說我不太清楚,因為我前輩幫我用許多插件。我想 11/28 23:10
shane87123: 我應該把vimrc 重新弄一份新的試試看? 11/28 23:10
shane87123: 剛剛把vimrc弄乾淨了,一樣不行。更奇怪的是,我在he 11/29 09:13
shane87123: ader檔上用cs find f 卻可以跳到我要的檔案.. 11/29 09:14
chienweichih: 我都用 ripgrep 搜尋,供參,然後有 Editor 板 11/29 10:36
leolarrel: 我google到的,試試看: https://reurl.cc/lZQ8kl 11/29 14:24
shane87123: 更新一下現在的狀態:去build最新的cscope還是無解, 11/30 10:06
shane87123: 然後我本文寫錯了,建好cscope database後,用 cscop 11/30 10:06
shane87123: e -d是不能用的,所以應該是直接壞掉。目前debug結果 11/30 10:06
shane87123: 是,如果不用inverted index建的話,是正常的。這個 11/30 10:06
shane87123: 問題我爬過後,好像只有在windows才有這問題。我猜是 11/30 10:06
shane87123: 某些檔案的sort有問題?不是很清楚 11/30 10:06