Learn how to search only certain files (such as *.h) in vimunite-grep.

Asked 2 years ago, Updated 2 years ago, 70 views

Recently, I've been relying on putting in unite and not being able to return to vim without unite, but
Only if you don't know how to use unite-grep with file extension and want to specify a file

:Ag HOGE-G\.h$

You are using ag.vim as shown in .
If possible, I would like to complete everything only with unite, but how can I do it?

vim

2022-09-30 14:33

1 Answers

Because grep itself does not have the option to specify a file pattern, unite-grep does not seem to support it directly.
You can pass arguments to commands that you are using internally, so if unite-grep is configured to use ag,

:Unite grep::-G\\\\.h$

It seems possible to specify that


2022-09-30 14:33

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.