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

Bookmarks #355

Closed
TahaMagdy opened this issue May 26, 2019 · 4 comments
Closed

Bookmarks #355

TahaMagdy opened this issue May 26, 2019 · 4 comments

Comments

@TahaMagdy
Copy link

TahaMagdy commented May 26, 2019

Can I select files that I open frequently and put them in a CommandT list; so that I open the CommandT list to open a file from them?!

I don't mean a list of the most recent opened file, I mean that I specifically select the files to be in that list.

How can I do that?!

@wincent
Copy link
Owner

wincent commented May 26, 2019

Nothing's implemented currently but I can see two relatively straightforward ways to do this:

  • One would be to implement a "favorites" or "bookmarks" scanner & finder that allowed you to specify a list of favorites somewhere (either in your .vimrc or via a config file).
  • Another would be to make a variant of the most-recently-used-buffer scanner/finder: this would be most-frequently-used files, and would persist across restarts.

Finally, I think a variant on that last one — but not easy to implement — would be to allow frequently-used files to be boosted higher in results listings.

@TahaMagdy
Copy link
Author

The fist solution is the one I think. To make "Bookmarks". How can I do that please?
You may tell me how the CommandT list read the array of files? And I'll implement it.

@TahaMagdy TahaMagdy changed the title A list for frequently opened files Bookmarks May 26, 2019
@wincent
Copy link
Owner

wincent commented May 26, 2019

  • The "scanners" are responsible for getting a list of files; there are multiple examples in this "scanners" directory.
  • The "finders" are responsible for managing a scanner and providing logic for "opening" whatever the user accepts: examples are in the "finders" directory.

In your case, you'd create a new scanner to read the list of "bookmarks", and your finder would be very simple because all it has to do is instantiate the scanner; as you're dealing with files, just letting the superclass open_selection implementation handle the actual opening should be fine, as long as you're dealing with absolute paths.

Finally, you have to wire things up so that the controller knows about your finder, and the user has a Vim command that they can invoke to access your finder.

@wincent
Copy link
Owner

wincent commented Aug 26, 2022

Given the big rewrite for v6.0.x, I'm closing all older issues as there is unlikely to be anything significant happening on the 5-x-devel branch from here on1. Feedback issue for 6.0.x is here:

Footnotes

  1. Patches and PRs would be welcome, but my personal efforts are going to be directed towards main.

@wincent wincent closed this as not planned Won't fix, can't repro, duplicate, stale Aug 26, 2022
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