adjust gitsigns map, <l>h{jk} and <l>ht{bd}

This commit is contained in:
leafee98 2023-12-14 21:51:46 +08:00
parent 9e3d55617c
commit e001ecc980

View file

@ -12,13 +12,13 @@ return {
vim.keymap.set(mode, l, r, opts)
end
m("n", "]h", function()
m("n", "<leader>hj", function()
if vim.wo.diff then return "]c" end
vim.schedule(function() gs.next_hunk() end)
return "<Ignore>"
end, {expr=true})
m("n", "[h", function()
m("n", "<leader>hk", function()
if vim.wo.diff then return "[c" end
vim.schedule(function() gs.prev_hunk() end)
return "<Ignore>"
@ -33,10 +33,10 @@ return {
m("n", "<leader>hR", gs.reset_buffer)
m("n", "<leader>hp", gs.preview_hunk)
m("n", "<leader>hb", function() gs.blame_line{full=true} end)
-- m("n", "<leader>tb", gs.toggle_current_line_blame)
m("n", "<leader>htb", gs.toggle_current_line_blame)
m("n", "<leader>hd", gs.diffthis)
m("n", "<leader>hD", function() gs.diffthis("~") end)
-- m("n", "<leader>td", gs.toggle_deleted)
m("n", "<leader>htd", gs.toggle_deleted)
end,
},
config = function (lazyplug, opts)