Update to harpoon2, update keymaps
This commit is contained in:
parent
26700c7911
commit
4767195fff
|
@ -24,7 +24,7 @@ in
|
||||||
conf-vim
|
conf-vim
|
||||||
edit-alternate-vim
|
edit-alternate-vim
|
||||||
gitsigns-nvim
|
gitsigns-nvim
|
||||||
harpoon
|
harpoon2
|
||||||
mini-nvim
|
mini-nvim
|
||||||
nvim-web-devicons
|
nvim-web-devicons
|
||||||
oil-nvim
|
oil-nvim
|
||||||
|
|
|
@ -1,13 +1,47 @@
|
||||||
require("harpoon").setup()
|
local harpoon = require "harpoon"
|
||||||
|
|
||||||
local mark = require "harpoon.mark"
|
harpoon:setup()
|
||||||
local ui = require "harpoon.ui"
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<M-h><M-l>", ui.toggle_quick_menu)
|
vim.keymap.set("n", "<leader>A", function()
|
||||||
vim.keymap.set("n", "<M-h><M-m>", mark.add_file)
|
harpoon:list():prepend()
|
||||||
|
end)
|
||||||
|
|
||||||
for i = 1, 5 do
|
vim.keymap.set("n", "<leader>a", function()
|
||||||
vim.keymap.set("n", string.format("<space>%s", i), function()
|
harpoon:list():add()
|
||||||
ui.nav_file(i)
|
end)
|
||||||
end)
|
|
||||||
end
|
vim.keymap.set("n", "<C-e>", function()
|
||||||
|
harpoon.ui:toggle_quick_menu(harpoon:list())
|
||||||
|
end)
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<C-h>", function()
|
||||||
|
harpoon:list():select(1)
|
||||||
|
end)
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<C-j>", function()
|
||||||
|
harpoon:list():select(2)
|
||||||
|
end)
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<C-k>", function()
|
||||||
|
harpoon:list():select(3)
|
||||||
|
end)
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<C-l>", function()
|
||||||
|
harpoon:list():select(4)
|
||||||
|
end)
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader><C-h>", function()
|
||||||
|
harpoon:list():replace_at(1)
|
||||||
|
end)
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader><C-j>", function()
|
||||||
|
harpoon:list():replace_at(2)
|
||||||
|
end)
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader><C-k>", function()
|
||||||
|
harpoon:list():replace_at(3)
|
||||||
|
end)
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader><C-l>", function()
|
||||||
|
harpoon:list():replace_at(4)
|
||||||
|
end)
|
||||||
|
|
Loading…
Reference in a new issue