【发布时间】:2023-03-27 03:11:01
【问题描述】:
我希望能够搜索仅位于我在 vim 中打开的文件所在目录中的文件。
阿克的纪录片说:
:Ack[!] [options] {pattern n} [{directory}] *:Ack*
Search recursively in {directory} (which defaults to the current
directory) for the {pattern}. Behaves just like the |:grep| command, but
will open the |Quickfix| window for you. If [!] is not given the first
occurrence is jumped to.
在VimFandom我发现我可以通过
echo expand('%:p:h') 但我怎样才能让它在 Ack 命令中进行评估?
我需要这样的东西:
:Ack searchpattern expand('%:p:h')
【问题讨论】: