You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is that possible? I'm coming from vscode-harpoon and there was a nice command for it. I had setup like this
CTRL + ALT + 1 mark current file at index 1 CTRL + ALT + 2 mark current file at index 2 CTRL + ALT + 3 mark current file at index 3
... ALT + 1 go to file at index 1 ALT + 2 go to file at index 2 ALT + 3 go to file at index 3
The text was updated successfully, but these errors were encountered:
An old question, but here's a snippet from my own harpoon Lazy spec:
-- NB: Using the replace methods can screw up the list if you don't
-- use them correclty; i.e., target a mark that actually exists.
vim.keymap.set("n", "<leader>m1", function() harpoon:list():replace_at(1) end, { desc = "Set harpoon mark 1" })
vim.keymap.set("n", "<leader>m2", function() harpoon:list():replace_at(2) end, { desc = "Set harpoon mark 2" })
vim.keymap.set("n", "<leader>m3", function() harpoon:list():replace_at(3) end, { desc = "Set harpoon mark 3" })
vim.keymap.set("n", "<leader>m4", function() harpoon:list():replace_at(4) end, { desc = "Set harpoon mark 4" })
vim.keymap.set("n", "<leader>m5", function() harpoon:list():replace_at(5) end, { desc = "Set harpoon mark 5" })
vim.keymap.set("n", "<leader>m6", function() harpoon:list():replace_at(6) end, { desc = "Set harpoon mark 6" })
vim.keymap.set("n", "<leader>m7", function() harpoon:list():replace_at(7) end, { desc = "Set harpoon mark 7" })
vim.keymap.set("n", "<leader>m8", function() harpoon:list():replace_at(8) end, { desc = "Set harpoon mark 8" })
vim.keymap.set("n", "<leader>m9", function() harpoon:list():replace_at(9) end, { desc = "Set harpoon mark 9" })
Hopefully that answers your question. And as the comment suggests, harpoon will happily let you set marks at places in the list that don't exist yet, and it doesn't much like that, so use with caution :)
The docs show how to access the N mark.
But how do I set the N mark with a shortcut ? For example if I'd wanted to set the current file to be at index
3
I would do something like this :Is that possible? I'm coming from vscode-harpoon and there was a nice command for it. I had setup like this
CTRL + ALT + 1 mark current file at index 1
CTRL + ALT + 2 mark current file at index 2
CTRL + ALT + 3 mark current file at index 3
...
ALT + 1 go to file at index 1
ALT + 2 go to file at index 2
ALT + 3 go to file at index 3
The text was updated successfully, but these errors were encountered: