正在使用“gf”; 在vim中可以使用符号链接吗?

发布于 2024-07-15 17:35:07 字数 321 浏览 5 评论 0原文

是否可以配置 vim 通过 gf 跟踪符号链接?

例如,假设我在同一目录中有一个文件 foo.txt 和一个符号链接 bar。 我希望能够通过 gf 编辑 foo.txt 中的“bar”一词来编辑 bar 指向的文件。

更一般地说,我希望能够使用 find 和其他使用路径的命令,就好像实际文件与我正在编辑的文件位于同一目录中一样。 不过,我会选择一个可以工作的 gf

Is it possible to configure vim to follow symlinks via gf?

For example, suppose I have a file foo.txt and a symlink bar in the same directory. I'd like to be able to edit the file bar points to by gf'ing over the word 'bar' in foo.txt.

More generally, I'd like to be able to use find and other path-using commands as though the actual files were in the same directory as the file I'm editing. I'll settle for a working gf though.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

眉目亦如画i 2024-07-22 17:35:07

对我有用。 VIM 7.1。

当您 gf 符号链接的名称时,您会得到什么输出? 当您输入 :version 时,是否启用了 +file_in_path

Works for me. VIM 7.1.

What output do you get when you gf over the name of a symlink? Is +file_in_path enabled when you type :version?

冰火雁神 2024-07-22 17:35:07

关于:find,你配置了&path吗?

Regarding :find, did you configure &path ?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文