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

Suggestion for the fuzzy search: moves files already opened on top #133

Open
cecton opened this issue Jan 7, 2019 · 2 comments
Open

Suggestion for the fuzzy search: moves files already opened on top #133

cecton opened this issue Jan 7, 2019 · 2 comments

Comments

@cecton
Copy link
Contributor

cecton commented Jan 7, 2019

I've started discovering and using amp for 2 days now and I have a few suggestions I would like to share. Here is the most important one:

TL;DR

In the fuzzy search result: first display the files that are already opened in a buffer and match the result, then the rest.

When the user is annoyed to see a file they are not working on anymore in the search result, they could simply close the buffer.

Alternative: a fuzzy search dedicated to the opened buffers.

Long Story

Coming from ViM I was used to use the tabs to change of file/buffer. Unfortunately it's not very handy when you have a lot of them and I discovered with Amp that this mechanism can be totally replaced by the fuzzy search of Amp.

BUT there is one problem: on a very large project there are more redundancy in the name of the files. Because of that it's hard to switch of buffer easily in Amp. It would be very nice if we could have a different way to order the items in the fuzzy search: first put the files that are already opened in a buffer, then the rest.

I think it would be the same than we have on browser: you type something in the URL bar, you get result from the search engine but also always from your bookmarks. I use that feature a lot.

@jmacdonald
Copy link
Owner

I like this idea.

From the beginning, I imagined that switching buffers in Amp would display an overlay with a list of open buffers (kind of like an Alt-Tab overlay in a desktop environment). I think that and your proposed idea could co-exist, but I'd be curious if my initial idea would be enough. I'll let you know when I get a chance to explore it!

@neur0manc
Copy link

fzf.vim has a :Buffers command that does something like you mentioned @jmacdonald . It opens a modal with a list of all open buffers and then lets you fuzzy find all open buffers by name.

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

3 participants