Add simple rebase maps

Leaving undocumented until the rebase functionality is more fleshed out.
This commit is contained in:
Tim Pope 2018-12-30 19:38:48 -05:00
parent fbeb9d6793
commit 68cd7ecf71
2 changed files with 12 additions and 1 deletions

View File

@ -4069,6 +4069,17 @@ function! fugitive#MapJumps(...) abort
nnoremap <buffer> cf :<C-U>Gcommit --fixup=<C-R>=<SID>SquashArgument()<CR>
nnoremap <buffer> cs :<C-U>Gcommit --squash=<C-R>=<SID>SquashArgument()<CR>
nnoremap <buffer> cA :<C-U>Gcommit --edit --squash=<C-R>=<SID>SquashArgument()<CR>
nnoremap <buffer> <silent> ri :<C-U>Grebase --interactive<C-R>=substitute(<SID>SquashArgument(),'.\+',' &^','')<CR><CR>
nnoremap <buffer> <silent> rf :<C-U>Grebase --autosquash<C-R>=substitute(<SID>SquashArgument(),'.\+',' &^','')<CR><CR>
nnoremap <buffer> <silent> ru :<C-U>Grebase --interactive @{upstream}<CR>
nnoremap <buffer> <silent> rp :<C-U>Grebase --interactive @{push}<CR>
nnoremap <buffer> <silent> rw :<C-U>exe 'Grebase --interactive<C-R>=substitute(<SID>SquashArgument(),'.\+',' &^','')<CR>'<Bar>s/^pick/reword/e<CR>
nnoremap <buffer> <silent> rm :<C-U>exe 'Grebase --interactive<C-R>=substitute(<SID>SquashArgument(),'.\+',' &^','')<CR>'<Bar>s/^pick/edit/e<CR>
nnoremap <buffer> <silent> rk :<C-U>exe 'Grebase --interactive<C-R>=substitute(<SID>SquashArgument(),'.\+',' &^','')<CR>'<Bar>s/^pick/drop/e<CR>
nnoremap <buffer> <silent> rr :<C-U>Grebase --continue<CR>
nnoremap <buffer> <silent> rs :<C-U>Grebase --skip<CR>
nnoremap <buffer> <silent> re :<C-U>Grebase --edit-todo<CR>
nnoremap <buffer> <silent> ra :<C-U>Grebase --abort<CR>
nmap <buffer> . <SID>: <Plug><cfile><Home>
endif
endfunction

View File

@ -69,7 +69,7 @@ that are part of Git repositories).
X |:Git| clean (untracked files)
X |:Git| rm (unmerged files)
q close status
r reload status
R reload status
. enter |:| command line with file prepopulated
*fugitive-:Gcommit*