KM version of harpoon for Finder

Hello genial KM people!

Last time I had a very successful question on implementing a vim-like "leader key" in KM (link). I have another question here about implementing another well-known vim plugin: harpoon.

Basically, the idea of the plugin is that it allows you to mark a folder or file on your computer. A shortcut applied to the mark then allows you to access the location.

For example: cmd-1 to mark an open Finder location.

Then ctrl-1 to open that Finder location

The point is to allow you to very quickly bookmark and access folders without the overhead of creating manual named links. You may also want to use a keymap for 'next' and 'previous' to allow you to access the next and previous linked locations.

The point here is that during the week, you might constantly be working on 3-4 folders on your computer. Using this keymap, you can easily bookmark these folders, then immediately bring them up in a Finder window.

Is your question, "Can KM replicate harpoon's functionality?"

Perhaps you need to explain exactly what you mean by that. Do you have a design in mind? I could suggest a design for you, but I'm worried that my design wouldn't satisfy you. If you explain exactly what keystrokes you want to "bookmark" and "access" a folder, we could tell you if it's possible. My suggestion is CTRL-1 to save the current folder location in Finder and CMD-1 to re-open that location. Then you could do the same with -2, -3, etc. Is that what you want?

Hello!

You're right, that was confusing. For simplicity, lets say:

ctrl-1, ctrl-2, ctrl-3 to save the current folder location in Finder
cmd-1, cmd-2, cmd-3 to open the referenced location
cmd-shift-n to go to the 'next' location (n+1) from the current
cmd-shift-p to go to the 'previous' location (n-1) from the current

That's clearer, except for one thing. How does KM know what the "current" location is? Is it based on the CMD-N last performed, or is it based on the "current folder location" in the "front window" of the Finder (assuming Finder is in front)?

Honestly, I think the use of 'next' and 'previous' makes more sense for the original context of Harpoon (where you would toggle it to go to next and previous documents you're working on).

In this case, it's best just to ignore it for now. I can't think of a clear use case for it within Finder.

Usually when people ask me to write code I try to give them exactly what they asked for. But this time I thought I would write the interface the way I would want to see it written. If you don't like my approach, I will probably rewrite it the way you specified, but try out my approach first.

In my approach, every Finder Folder change is observed, and memorized. Then when you press SHIFT-CTRL-A, it will show you the last ten locations and let you pick one. If for some reason you want to erase its memory, press SHIFT-CTRL-Z.

Folder Memory Macro (v11.0.3)

Folder Memory.kmmacros (8.3 KB)