How to let cscope use absolute path in cscope.out file?

后端 未结 6 763
野的像风
野的像风 2021-02-02 02:11

Everytime after load a cscope.out in Vim, I need to change Vim\'s \"pwd\" to the same directory as cscope.out file is under, which might be due to that cscope use relative path

6条回答
  •  不思量自难忘°
    2021-02-02 02:44

    You can create your cscpoe.files using absolute paths to your files, here is my scripts to generate my cscope databases

    #!/bin/sh
    
    find $PWD -name '*.[ch]' -exec echo \"{}\" \; | sort -u > cscope.files
    cscope -bvq
    

    Then just vim cscope.files and maybe :cs add cscope.out, although my cscope plugin does that automatically. Then I search for the files I am interested in and jump to them with gf.

提交回复
热议问题