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

后端 未结 6 847
野的像风
野的像风 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:49

    When importing cscope.out, you can supply the prefix, i.e.

    :cscope add /path/to/cscope.out /path/to/src/code
    

    Then your searches will turn up like:

    Cscope Tag: foobar
        #   line  filename / context / line
        1     21 /path/to/src/code/foobar_file.c
    

提交回复
热议问题