Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/perl/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
改善;“在光标下搜索”;(gf)在vim中_Vim - Fatal编程技术网

改善;“在光标下搜索”;(gf)在vim中

改善;“在光标下搜索”;(gf)在vim中,vim,Vim,我正在阅读Verilog代码,我想在其中打开unit1.vs,但代码包含: unit1 unit1_instance {...} 为此,我可以添加: includeexpr=substitute(v:fname,'\(.*\)','\1.vs','i') 在vimrc中使用gf 我现在有另一个unit2.sdpv,它被实例化为unit1。我如何扩展includeexpr来搜索file.vs和file.sdpv?尝试使用subfixesadd而不是includeexpr: :set suffi

我正在阅读Verilog代码,我想在其中打开
unit1.vs
,但代码包含:

unit1 unit1_instance {...}
为此,我可以添加:

includeexpr=substitute(v:fname,'\(.*\)','\1.vs','i')
在vimrc中使用gf


我现在有另一个
unit2.sdpv
,它被实例化为unit1。我如何扩展
includeexpr
来搜索
file.vs
file.sdpv

尝试使用
subfixesadd
而不是
includeexpr

:set suffixesadd=.vs,.sdpv

我在网上阅读了大量有关此功能的问题和答案,大多数问题实际上是在搜索
后缀sadd
,而大多数答案都是使用
includeexpr
的复杂解决方案。这是一个非常简单的解决方案。