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

Request: (Option to) Show recently-matched files when opening Command T #268

Closed
dylan-chong opened this issue Feb 6, 2017 · 3 comments
Closed

Comments

@dylan-chong
Copy link

dylan-chong commented Feb 6, 2017

similar to the behaviour of double pressing shift in intellij ides. Currently it shows the files within the current directory.

It would be useful if I want to re-do a search without having to type in the entire search term again

As a potentially related idea, a recent files window could be useful. It may even replace the above request

@wincent
Copy link
Owner

wincent commented Feb 7, 2017

As a potentially related idea, a recent files window could be useful. It may even replace the above request

There is already a jump list finder and a most-recently-used buffer finder. Do either of those suit your needs?

It would be useful if I want to re-do a search without having to type in the entire search term again

Agreed, that could definitely be useful. Would just need to think of the right binding for it. Could be Control-Something to populate the search field with the previous search, or something "magic" (ugh) like double-space.

similar to the behaviour of double pressing shift in intellij ides. Currently it shows the files within the current directory.

I don't think I would implement this as described because it is trivial to explore the files in the current directory using features already built into Vim (eg. netrw). The feature could certainly be used for inspiration for something else, but we'd need some clear definition about exactly what that "something else" should be.

@dylan-chong
Copy link
Author

Awesome! Both of these seem to fit the requirement, although I prefer the most-recently-used window. I don't know how I missed those in the documentation. Surely I searched the word 'recent'...

I wonder if it would be possible to use the information in the most-recently-used window to sort the files in the normal command t window... It's not at all necessary in order to achieve what I want, but it's just a thought.

@wincent
Copy link
Owner

wincent commented Feb 12, 2017

I wonder if it would be possible to use the information in the most-recently-used window to sort the files in the normal command t window... It's not at all necessary in order to achieve what I want, but it's just a thought.

This is a logical enough request, but there are some tricky edge cases to consider that make it difficult. For example, consider #107 which is about an even simpler problem of never sorting the current file as most relevant; even that simple scenario has a bunch of sharp corners to it. Anything which messes with the sorting/scoring algorithm is going to be a bit thorny. Not to say that we shouldn't do it, just that it would be tricky.

Another issue about sort order:

And another one related to your idea above:

It would be useful if I want to re-do a search without having to type in the entire search term again

Going to close this one for now as I don't think there is anything actionable that isn't already reflected in those two issues above.

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