Is it possible to jump directly to files in mini.visits? #2232
-
Contributing guidelines
Module(s)mini.visits QuestionI tend jump between the same group of files a lot and while I appreciate the 'core' function of mini.visits, I was wondering if there is a way to jump specifically to a file I have in mind rather than sifting through a UI. Reading through the documentation, it seems a lot of the mappings are for assigning labels or structuring lists. The primary use case that I have is for when working with static sites, I want to quickly jump between a components, content, or configurations file, either to edit or make a file action. Ideally, I would be able to have something per project that could be navigated to through something like so on and so forth. I had looked into similar applications in mini.files but couldn't find a reasonable way to do per-project bookmarks like this. Ideally, they would be set from the buffer and be persistent & the only way to set marks in mini.files is through the lua configuration. My initial instinct was to use something like arrow.nvim for this but came across a discussion where someone was asked why they were using arrow.nvim over mini.visits so I wanted to ask in case I've overlooked something that's supported. The closest thing I saw was |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
Hello @kikidotdirectory, Yes, this is possible and demonstrated in this example. You have already mentioned local jump_directly = function(i)
MiniVisits.iterate_paths("first", nil, { filter = "your label", n_times = i })
endIn mini.visits, the order of the visits is not fixed by default though. The order changes with recency-frequency. Sometime ago I configured visits to work more closely like harpoon, see this discussion. Nowadays, I use the defaults, but with a per-project visits file. The mappings for first, last, backward and forward are good enough for my use-case. |
Beta Was this translation helpful? Give feedback.
Hello @kikidotdirectory,
Yes, this is possible and demonstrated in this example. You have already mentioned
iterate_paths. That function also accepts an index asn_timesIn mini.visits, the order of the visits is not fixed by default though. The order changes with recency-frequency. Sometime ago I configured visits to work more closely like harpoon, see this discussion.
Nowadays, I use the defaults, but with a per-project visits file. The mappings for first, last, backward and forward are good enough for my use-case.