Update Harpoon keymaps

This commit is contained in:
Oliver Davies 2024-02-27 22:30:54 +00:00
parent db13d667e9
commit de117a56e2
2 changed files with 12 additions and 6 deletions

View file

@ -4,7 +4,8 @@
### Changed
* Updated Telescope to ignore more files and directories by default.
* Update Harpoon keymaps and include keymaps to remove a single file and clear all files.
* Update Telescope to ignore more files and directories by default.
* Replace `christoomey/vim-tmux-navigator` with `alexghergh/nvim-tmux-navigation`.
## 26th February 2024

View file

@ -1,18 +1,23 @@
require("harpoon").setup()
local mark = require "harpoon.mark"
local ui = require "harpoon.ui"
local nmap = require("opdavies.keymap").nmap
nmap { "<M-h><M-l>", require("harpoon.ui").toggle_quick_menu }
nmap { "<M-h><M-m>", require("harpoon.mark").add_file }
nmap { "<M-h><M-l>", ui.toggle_quick_menu }
nmap { "<M-h><M-m>", mark.add_file }
nmap { "<leader>hl", require("harpoon.ui").toggle_quick_menu }
nmap { "<leader>hm", require("harpoon.mark").add_file }
nmap { "<leader>ha", mark.add_file }
nmap { "<leader>hc", mark.clear_all }
nmap { "<leader>ho", ui.toggle_quick_menu }
nmap { "<leader>hr", mark.rm_file }
for i = 1, 5 do
nmap {
string.format("<space>%s", i),
function()
require("harpoon.ui").nav_file(i)
ui.nav_file(i)
end,
}
end