Closed mjkx5 closed 3 months ago
If you want to search in current buffer, you should give the file path i.e. %
as an argument like this: :lgrep core %
I understand that. It's weird. In that case, :grep and :lgrep are the same. :lgrep core % == :grep core %
lgrep core == grep core
It's indeedly solve my current problem. thanks.
I'm going to close this issue as not planned to avoid further confusion. The only distinction between :lgrep
and :grep
lies in the storage location of the results. A location-list (or a window-local quickfix-list) is used for :lgrep
while the quickfix-list is used for :grep
. The search process itself remains identical for both (with results obtained using |grepprg|
).
Feature description
when I input :lgrep in command model. It's like grep.
It's lgrep in help.
lgr[ep][!] [arguments] Same as ":grep", except the location list for the current window is used instead of the quickfix list.
Additional information
when I input grep !rg --hidden --vimgrep --smart-case -- 2>&1| tee /tmp/ when I input lgrep !rg --hidden --vimgrep --smart-case -- 2>&1| tee /tmp/
lgrep cannot search in local file, but in all file.