diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 82faa8f..d000561 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -7917,6 +7917,7 @@ function! s:MapGitOps(is_ftplugin) abort exe s:Map('n', 'cc', ':Git commit', '', ft) exe s:Map('n', 'ce', ':Git commit --amend --no-edit', '', ft) exe s:Map('n', 'cw', ':Git commit --amend --only', '', ft) + exe s:Map('n', 'cW', ':Git commit --fixup=reword:=SquashArgument()', '', ft) exe s:Map('n', 'cva', ':tab Git commit -v --amend', '', ft) exe s:Map('n', 'cvc', ':tab Git commit -v', '', ft) exe s:Map('n', 'cRa', ':Git commit --reset-author --amend', '', ft) diff --git a/doc/fugitive.txt b/doc/fugitive.txt index 34c861e..1a52f95 100644 --- a/doc/fugitive.txt +++ b/doc/fugitive.txt @@ -465,15 +465,18 @@ Commit maps ~ cc Create a commit. +cvc Create a commit with -v. + ca Amend the last commit and edit the message. +cva Amend the last commit with -v. + ce Amend the last commit without editing the message. cw Reword the last commit. -cvc Create a commit with -v. - -cva Amend the last commit with -v +cW Create an `amend!` commit that rewords the commit + under the cursor. cf Create a `fixup!` commit for the commit under the cursor.