0

When I do :Explore //** searchingforthis I get this error:

E132: Function call depth is higher than 'maxfuncdepth'

Anyone knows why? Btw, //** do a grep in the netrw dir and let you step through the files where the pattern were found.

I'm using ag instead of grep.

fedorqui
  • 275,237
  • 103
  • 548
  • 598
Olle Härstedt
  • 3,799
  • 1
  • 24
  • 57
  • 3
    The correct syntax is `:Ex **//pattern`. Netrw doesn't use grep for that, it uses `:vimgrep`. – romainl Nov 12 '14 at 14:55
  • That error seems to indicate that for whatever reason the recursion involved to satisfy that call was greater than the configured limit. You could try increasing `maxfuncdepth` if you want but without knowing why this happened that might not be able to help you in any meaningful way (e.g. if the limit you would need to set is unacceptably/unsettably high). – Etan Reisner Nov 12 '14 at 14:56

1 Answers1

3

Netrw is not a very good tool for what you seem to be trying to do.

If you are trying to recursively find all files in the current directory that contain foo, try :grep or :vimgrep:

:grep foo **/* | cw
:vim bar **/* | cw
romainl
  • 186,200
  • 21
  • 280
  • 313
  • Why would "netrw not be a very good tool for this"? Netrw is using :vimgrep; using :vimgrep directly or via netrw has the same benefits and limitations. The problem is presumably the incorrect pattern as you (romainl) pointed out; I think perhaps the user actually wanted:Ex **//searchingforthis . – user21497 Nov 12 '14 at 22:12
  • @user21497, netrw is not a good search tool because of the way it displays results and handles the navigation between them. The commands above**, and the quickfix window,** are infinitely better at that job. – romainl Nov 12 '14 at 22:41