Skip to content

Commit

Permalink
feat(harpoon): add keymap to jump mark index
Browse files Browse the repository at this point in the history
  • Loading branch information
RayJameson committed Jun 20, 2023
1 parent e77f353 commit d1c4f7c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lua/astrocommunity/motion/harpoon/harpoon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ return {
{ prefix, function() end, desc = "󱡀 Harpoon" },
{ prefix .. "a", function() require("harpoon.mark").add_file() end, desc = "Add file" },
{ prefix .. "e", function() require("harpoon.ui").toggle_quick_menu() end, desc = "Toggle quick menu" },
{
"<C-t>",
function()
local num = tonumber(vim.fn.input "Go to mark index: ")
if num == nil then return end
require("harpoon.ui").nav_file(num)
end,
desc = "Goto index of mark",
},
{ "<C-p>", function() require("harpoon.ui").nav_prev() end, desc = "Goto previous mark" },
{ "<C-n>", function() require("harpoon.ui").nav_next() end, desc = "Goto next mark" },
{ prefix .. "m", "<cmd>Telescope harpoon marks<CR>", desc = "Show marks in Telescope" },
Expand Down

0 comments on commit d1c4f7c

Please sign in to comment.