在使用cscope的時候,有時跳轉不過去,提示
driver/***/***/***x no such file (大概是這個吧)
主要是因為在生成cscope.out的時候用的是相對路徑,然後vim就找不到了,然後就坑爹了。
然後網上找了一下,找到了這個.vimrc片段
自動載入cscope.out
if has("cscope")
set csprg=/usr/bin/cscope
set csto=0
set cst
set csverb
set cspc=3
"add any database in current dir
if filereadable("cscope.out")
cs add cscope.out
"else search cscope.out elsewhere
else
let cscope_file=findfile("cscope.out", ".;")
let cscope_pre=matchstr(cscope_file, ".*/")
if !empty(cscope_file) && filereadable(cscope_file)
exe "cs add" cscope_file cscope_pre
endif
endif
endif
但是不知道什麼問題感覺我這裡還是有這個問題,
於是我改了一下
if has("cscope")
set csprg=/usr/local/bin/cscope
set csto=0
set cst
set csverb
set cspc=3
"add any database in current dir
if filereadable("cscope.out")
let cscope_file=findfile("cscope.out", ".;")
let cscope_pre = system("
pwd")
let cscope_pre = strpart(cscope_pre,0,strlen(cscope_pre) - 1)
if !empty(cscope_file) && filereadable(cscope_file)
exe "cs add" cscope_file cscope_pre
endif
endif
endif
cs add ***/cscope.out ***x
沒有在其他地方測是,只在我自己電腦上試了一下,大家可以一起試試
pycharm加入import路徑
系統版本 unbantu16.0.4 pycharm版本 pycharm community 2017.2 目標 匯入cifar10 git clonestep2 在pycharm中使用cifar 10資料的類 import cifar10,cifar10 input報錯 no module nam...
macaca之全域性路徑
之前剛進行macaca環境配置的時候,直接安裝在系統盤c盤內,雖然所佔記憶體不多,但還是有點強迫症想著將其安裝在其他磁碟內,所以就找了一些方法,記錄下來。安裝好nodejs後就可以進行全域性路徑的設定,主要使用兩個指令,乙個主檔案,乙個是快取檔案 npm config set prefix node...
nodejs修改全域性安裝路徑
安裝好nodejs後假設我們想修改全域性安裝的路徑可採用如下做法 在安裝目錄下 本文以d program files nodejs 為例 新建node global與node cache2個資料夾。在cmd視窗下執行 npm config set prefix d program files nod...