diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index af73edf..df92b49 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -1804,6 +1804,7 @@ function! fugitive#BufReadStatus() abort nnoremap ds :execute StageDiff('Ghdiffsplit') nnoremap dp :execute StageDiffEdit() nnoremap dv :execute StageDiff('Gvdiffsplit') + nnoremap d? :help fugitive_d nnoremap P :execute StagePatch(line('.'),line('.')+v:count1-1) xnoremap P :execute StagePatch(line("'<"),line("'>")) if empty(mapcheck('q', 'n')) @@ -1819,7 +1820,6 @@ function! fugitive#BufReadStatus() abort xnoremap gI :execute StageIgnore(line("'<"), line("'>"), v:count) nnoremap . : =StageArgs(0) xnoremap . : =StageArgs(1) - nnoremap :help fugitive-mappings setlocal filetype=fugitive for [lnum, section] in [[staged_end, 'Staged'], [unstaged_end, 'Unstaged']] @@ -4890,15 +4890,15 @@ function! fugitive#MapJumps(...) abort nnoremap P :exe 'Gedit ' . fnameescape(ContainingCommit().'^'.v:count1.Relative(':')) nnoremap ~ :exe 'Gedit ' . fnameescape(ContainingCommit().'~'.v:count1.Relative(':')) nnoremap C :exe 'Gedit ' . fnameescape(ContainingCommit()) - nnoremap co :echoerr 'Use CTRL-W sC' nnoremap cp :echoerr 'Use gC' nnoremap gC :exe 'Gpedit ' . fnameescape(ContainingCommit()) nnoremap gc :exe 'Gpedit ' . fnameescape(ContainingCommit()) nnoremap gi :exe 'Gsplit' (v:count ? '.gitignore' : '.git/info/exclude') - nnoremap c- :Gcommit - nnoremap c :Gcommit nnoremap c :Gcommit + nnoremap cv :Gcommit -v + nnoremap cv :Gcommit -v nnoremap ca :Gcommit --amend nnoremap cc :Gcommit nnoremap ce :Gcommit --amend --no-edit @@ -4921,7 +4921,15 @@ function! fugitive#MapJumps(...) abort nnoremap czz :exe EchoExec(['stash'] + (v:count > 1 ? ['--all'] : v:count ? ['--include-untracked'] : [])) nnoremap cz? :help fugitive_cz - nnoremap r- :Grebase - + nnoremap co :G checkout + nnoremap co :G checkout + nnoremap coo :exe EchoExec(['checkout'] + split(SquashArgument()) + ['--']) + nnoremap co? :help fugitive_co + + nnoremap cb :G branch + nnoremap cb :G branch + nnoremap cb? :help fugitive_cb + nnoremap r :Grebase nnoremap r :Grebase nnoremap ri :Grebase --interactive=RebaseArgument() @@ -4942,6 +4950,7 @@ function! fugitive#MapJumps(...) abort nnoremap . : =fnameescape(fugitive#Real(@%)) xnoremap . : =fnameescape(fugitive#Real(@%)) nnoremap g? :help fugitive-mappings + nnoremap :help fugitive-mappings endif endfunction diff --git a/doc/fugitive.txt b/doc/fugitive.txt index 8ac2219..b702e83 100644 --- a/doc/fugitive.txt +++ b/doc/fugitive.txt @@ -278,6 +278,8 @@ P Invoke |:Git| add --patch or reset --patch on the file under the cursor. On untracked files, this instead calls |:Git| add --intent-to-add. + *fugitive_d* +Diff mappings ~ *fugitive_dp* dp Invoke |:Git!| diff on the file under the cursor. Deprecated in favor of inline diffs. @@ -292,6 +294,8 @@ dv Perform a |:Gvdiffsplit| on the file under the cursor. ds Perform a |:Ghdiffsplit| on the file under the cursor. dh + *fugitive_d?* +d? Show this help. *fugitive-navigation-mappings* Navigation mappings ~ @@ -390,8 +394,23 @@ cS Create a `squash!` commit for the commit under the cA Create a `squash!` commit for the commit under the cursor and edit the message. +c Populate command line with ":Gcommit ". + c? Show this help. + *fugitive_cb* + *fugitive_co* +Checkout/branch mappings ~ + +coo Check out the commit under the cursor. + +cb Populate command line with ":G branch ". + +co Populate command line with ":G checkout ". + +cb? Show this help. +co? + *fugitive_cz* Stash mappings ~ @@ -405,6 +424,8 @@ cza Apply topmost stash, or stash@{count}. czp Pop topmost stash, or stash@{count}. +cz Populate command line with ":G stash ". + cz? Show this help. *fugitive_r* @@ -439,6 +460,8 @@ rm Perform an interactive rebase with the commit under rd Perform an interactive rebase with the commit under the cursor set to `drop`. +r Populate command line with ":Grebase ". + r? Show this help. *fugitive-misc-mappings*