remove obsolete mappings, add mappings for staging and unstaging of seletcd hunks
This commit is contained in:
parent
46e71b2461
commit
36aa117fbf
1 changed files with 4 additions and 15 deletions
|
@ -15,23 +15,12 @@ return {
|
|||
opts.buffer = bufnr
|
||||
vim.keymap.set(mode, l, r, opts)
|
||||
end
|
||||
|
||||
-- Navigation
|
||||
map('n', ']c', function()
|
||||
if vim.wo.diff then return ']c' end
|
||||
vim.schedule(function() gs.next_hunk() end)
|
||||
return '<Ignore>'
|
||||
end, { expr = true })
|
||||
|
||||
map('n', '[c', function()
|
||||
if vim.wo.diff then return '[c' end
|
||||
vim.schedule(function() gs.prev_hunk() end)
|
||||
return '<Ignore>'
|
||||
end, { expr = true })
|
||||
|
||||
-- Actions
|
||||
map('n', '<leader>gB', function() gs.blame_line { full = true } end)
|
||||
map('n', '<leader>gb', gs.toggle_current_line_blame)
|
||||
map('n', '<leader>gs', gs.stage_hunk) -- git stage this
|
||||
map('v', '<leader>gs', gs.stage_hunk) -- git stage this
|
||||
map('n', '<leader>gus', gs.undo_stage_hunk) -- git undo stage this
|
||||
map('v', '<leader>gus', gs.undo_stage_hunk) -- git undo stage this
|
||||
end
|
||||
})
|
||||
end,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue