Skip to content

Commit

Permalink
doc(README): use lua functions in keybindings
Browse files Browse the repository at this point in the history
Closes #727
  • Loading branch information
lewis6991 committed Apr 21, 2023
1 parent 7fe4482 commit 5d84067
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,10 @@ require('gitsigns').setup{
end, {expr=true})

-- Actions
map({'n', 'v'}, '<leader>hs', ':Gitsigns stage_hunk<CR>')
map({'n', 'v'}, '<leader>hr', ':Gitsigns reset_hunk<CR>')
map('n', '<leader>hs', gs.stage_hunk)
map('n', '<leader>hr', gs.reset_hunk)
map('v', '<leader>hs', function() gs.stage_hunk {line("."), line("v")} end)
map('v', '<leader>hr', function() gs.reset_hunk {line("."), line("v")} end)
map('n', '<leader>hS', gs.stage_buffer)
map('n', '<leader>hu', gs.undo_stage_hunk)
map('n', '<leader>hR', gs.reset_buffer)
Expand Down

0 comments on commit 5d84067

Please sign in to comment.