正在使用“gf”; 在vim中可以使用符号链接吗?
是否可以配置 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对我有用。 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
?关于
:find
,你配置了&path
吗?Regarding
:find
, did you configure&path
?