add quickfix and location list mappings for gitsigns
Added key mappings to send all hunks to the quickfix list and buffer hunks to the location list for improved navigation and management of git changes.
This commit is contained in:
parent
4e9e22da00
commit
5e3a14596d
2 changed files with 6 additions and 0 deletions
|
|
@ -49,6 +49,10 @@ return {
|
|||
map('n', '<leader>hp', gs.preview_hunk, { desc = 'Gitsigns: Preview hunk' })
|
||||
map('n', '<leader>hd', gs.diffthis, { desc = 'Gitsigns: Diff this' })
|
||||
map('n', '<leader>hD', function() gs.diffthis('~') end, { desc = 'Gitsigns: Diff this ~' })
|
||||
|
||||
-- Quickfix/Location list
|
||||
map('n', '<leader>hq', function() gs.setqflist('all') end, { desc = 'Gitsigns: All hunks to quickfix' })
|
||||
map('n', '<leader>hl', function() gs.setloclist(0) end, { desc = 'Gitsigns: Buffer hunks to loclist' })
|
||||
|
||||
-- Text object
|
||||
map({ 'o', 'x' }, 'ih', ':<C-U>Gitsigns select_hunk<CR>', { desc = 'Gitsigns: Select hunk' })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue