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

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

    Note: since I am not senior enough to add comments yet: Aaron and Neha's answers were useful to me to learn more about the entire system, but the best and most direct answer to the question is currently in 3rd place and is Shayan's.

    The asker was more asking about getting absolute pathnames by cscope, not working around it using (the very capable and powerful) vim.

    Note2: There is another way to make a single change in vim and accomplish the same as what Neha did.

    :set cscopeprg=cscope -P path_to_relative_base
    

    I like Neha's better, but this way is closer to modifying cscope rather than vim settings, if this is what you want. And this is the only way that allows you to move the cscope db to anywhere.

提交回复
热议问题