harpoon
harpoon copied to clipboard
Toggling harpoon list should highlight current file
If you have 5 files in the harpoon list and you have file 4 selected, it would be nice if when toggling harpoon list open, file 4 is highlighted instead of the first one.
This would make it easy to open list, go down one or two items then select that one.
If the buffer in the current window is not in harpoon list, then highlight the first item.
That would indeed be very helpful!
It would allow one blindly remove a file: open menu, dd
, close menu.
It would be a harpoon-style precise operation.
Check it out :) #574
I've created a small plugin that adds this functionality. The actual code is so small that you can copy it to your config and save yourself a dependency.
I've created a small plugin that adds this functionality. The actual code is so small that you can copy it to your config and save yourself a dependency.
Thanks, I love it!
Nice, thanks!
Quick tip, on Windows, add a backslash escape to make sure files in child directories are highlighted:
local current = Path:new(ctx.current_file)
:make_relative(vim.uv.cwd())
:gsub("\\", "\\\\")