Skip to content

Commit

Permalink
Replace cA map with cn
Browse files Browse the repository at this point in the history
Following Magit's lead.

References: #2369
  • Loading branch information
tpope committed Jan 20, 2025
1 parent de42a73 commit f4e8453
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion autoload/fugitive.vim
Original file line number Diff line number Diff line change
Expand Up @@ -7926,7 +7926,8 @@ function! s:MapGitOps(is_ftplugin) abort
exe s:Map('n', 'cF', ':<C-U><Bar>Git -c sequence.editor=true rebase --interactive --autosquash<C-R>=<SID>RebaseArgument()<CR><Home>Git commit --fixup=<C-R>=<SID>SquashArgument()<CR>', '', ft)
exe s:Map('n', 'cs', ':<C-U>Git commit --no-edit --squash=<C-R>=<SID>SquashArgument()<CR>', '', ft)
exe s:Map('n', 'cS', ':<C-U><Bar>Git -c sequence.editor=true rebase --interactive --autosquash<C-R>=<SID>RebaseArgument()<CR><Home>Git commit --no-edit --squash=<C-R>=<SID>SquashArgument()<CR>', '', ft)
exe s:Map('n', 'cA', ':<C-U>Git commit --edit --squash=<C-R>=<SID>SquashArgument()<CR>', '', ft)
exe s:Map('n', 'cn', ':<C-U>Git commit --edit --squash=<C-R>=<SID>SquashArgument()<CR>', '', ft)
exe s:Map('n', 'cA', ':<C-U>echoerr "Use cn"<CR>', '<silent><unique>', ft)
exe s:Map('n', 'c?', ':<C-U>help fugitive_c<CR>', '<silent>', ft)

exe s:Map('n', 'cr<Space>', ':Git revert<Space>', '', ft)
Expand Down
4 changes: 2 additions & 2 deletions doc/fugitive.txt
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,8 @@ cs Create a `squash!` commit for the commit under the
cS Create a `squash!` commit for the commit under the
cursor and immediately rebase it.

cA Create a `squash!` commit for the commit under the
cursor and edit the message.
cn Create a `squash!` commit for the commit under the
(formerly cA) cursor and edit the message.

c<Space> Populate command line with ":Git commit ".

Expand Down

0 comments on commit f4e8453

Please sign in to comment.