gpt4 book ai didi

vim - 如何让 cscope 在 cscope.out 文件中使用绝对路径?

转载 作者:行者123 更新时间:2023-12-04 02:36:29 37 4
gpt4 key购买 nike

每次在 Vim 中加载 cscope.out 后,我​​需要将 Vim 的“pwd”更改为与 cscope.out 文件所在的目录相同的目录,这可能是由于 cscope 在生成标记文件时使用了相对路径。因此,如果有一种方法可以强制 cscope 在其标记文件中使用绝对路径 - cscope.out,那么无论您的 Vim session 的密码是否与 cscope.out 文件所在的目录相同。

最佳答案

您可以要求 vim 解释 cscope.out 中的路径亲戚 通过设置 cscoperelative 到 cscope.out 文件的位置选项。
来自 :help csre :

If 'cscoperelative' is set, then in absence of a prefix given to cscope (prefix is the argument of -P option of cscope), basename of cscope.out location (usually the project root directory) will be used as the prefix to construct an absolute path. The default is off. Note: This option is only effective when cscope (cscopeprg) is initialized without a prefix path (-P).

Examples

: set csre
: set nocsre

关于vim - 如何让 cscope 在 cscope.out 文件中使用绝对路径?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2188405/

37 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com