Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add message when max files limit is hit #218

Closed
lencioni opened this issue May 16, 2016 · 6 comments
Closed

Add message when max files limit is hit #218

lencioni opened this issue May 16, 2016 · 6 comments

Comments

@lencioni
Copy link
Contributor

I just spent a good amount of time troubleshooting a problem where command-t wasn't allowing me to match on a bunch of files in my project (specifically it seemed like anything outside of my app directory). After a lot of experimentation, I was able to determine that I had simply hit the default max number of files. I resolved this by adding let g:CommandTMaxFiles=1000000 and adding a large generated directory to the command-t wildignore list.

I believe I would have saved some time troubleshooting if there would have been a clear message when the max number of files was hit. Ideally this message would include pointers on next steps to take to resolve the issue.

@wincent
Copy link
Owner

wincent commented May 16, 2016

One problem is where to put the message. The match listing is really only built to show files, and the prompt area is a very fragile abstraction built on top of the message area (I'm not even sure of the exact name for it) which Vim has a penchant for clearing (or not clearing) at odd times. I guess I could abuse input() for this purpose, although it would be pretty jarring. I'd probably want to up the default limit to about 100,000 anyway, which would end up being enough to cover most toy projects, even those with ridiculous trees buried under node_modules and the like.

wincent added a commit that referenced this issue May 17, 2016
I am about to make hitting the file limit a whole lot more intrusive, so let's
back the limit off a little bit. It should be ok to do this because:

- Performance-sensitive users are probably already using a fast scanner, like
  the "watchman" scanner.
- Computers are faster now than when I first implemented `g:CommandTMaxFiles`
  (March 2010), and when I last bumped the limit (April 2013).
- For the slower scanners, we now have a progress indicator, which means that
  people get some visual feedback when something takes a long time.

See: #218
wincent added a commit that referenced this issue May 17, 2016
Looks something like this:

```
Warning: maximum file limit reached

Increase it by setting a higher value in $MYVIMRC; eg:
  let g:CommandTMaxFiles=20
Or suppress this warning by setting:
  let g:CommantTSuppressMaxFilesWarning=1
For best performance, consider using a fast scanner; see:
  :help g:CommandTFileScanner

Press ENTER to continue.
```

Closes: #218
@wincent
Copy link
Owner

wincent commented May 17, 2016

So I just merged something to next for this. Going to mark this as closed.

@wincent wincent closed this as completed May 17, 2016
@lencioni
Copy link
Contributor Author

Thanks for the fast response on this! 🍝

@lencioni
Copy link
Contributor Author

Another thing that would have eased my pain a bit would be a "smarter" ordering of files that are indexed. In my particular case, I ended up with a new dot-directory that had a bunch of new files in it. If the file finder de-prioritized recursing into dot-directories until after non-dot-directories, I would have still had a mostly useful set of files to work with even though I had hit the limit.

@wincent
Copy link
Owner

wincent commented May 17, 2016

Want to file a separate issue for that one?

On Tue, May 17, 2016 at 10:49 AM, Joe Lencioni notifications@github.com
wrote:

Another thing that would have eased my pain a bit would be a "smarter"
ordering of files that are indexed. In my particular case, I ended up with
a new dot-directory that had a bunch of new files in it. If the file finder
de-prioritized recursing into dot-directories until after
non-dot-directories, I would have still had a mostly useful set of files to
work with even though I had hit the limit.


You are receiving this because you modified the open/close state.
Reply to this email directly or view it on GitHub
#218 (comment)

@lencioni
Copy link
Contributor Author

Done! #219

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants