nvim: add/change key mappings for git pull/push

This commit is contained in:
tastytea 2022-10-03 15:33:40 +02:00
parent 76b3451d91
commit 820b17ffca
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM

View File

@ -68,7 +68,10 @@ require('which-key').register({ ['<Leader>g'] = { name = 'Git' } })
require('which-key').register({ ['<Leader>gc'] = { name = 'commit' } })
map('n', '<Leader>gcc', ':Git commit<CR>', 'commit')
map('n', '<Leader>gca', ':Git commit --amend<CR>', 'amend')
map('n', '<Leader>gp', ':Git push<CR>', 'push')
map('n', '<Leader>gP', ':Git push<CR>', 'push')
require('which-key').register({ ['<Leader>gp'] = { name = 'pull' } })
map('n', '<Leader>gpo', ':Git pull origin<CR>', 'origin')
map('n', '<Leader>gpu', ':Git pull upstream<CR>', 'upstream')
require('which-key').register({ ['<Leader>ga'] = { name = 'add' } })
map('n', '<Leader>gau', ':Git add --update --patch<CR>', '--update --patch')
map('n', '<Leader>ga%', ':Git add %<CR>', 'This file')