Reverse inline diff mappings

References https://github.com/tpope/vim-fugitive/issues/1199
This commit is contained in:
Tim Pope 2019-07-24 16:17:03 -04:00
parent b92de0138d
commit 2bfb6e9889
2 changed files with 8 additions and 8 deletions

View File

@ -1799,11 +1799,11 @@ function! fugitive#BufReadStatus() abort
nnoremap <buffer> <silent> a :<C-U>execute <SID>Do('Toggle',0)<CR> nnoremap <buffer> <silent> a :<C-U>execute <SID>Do('Toggle',0)<CR>
nnoremap <buffer> <silent> i :<C-U>execute <SID>NextExpandedHunk(v:count1)<CR> nnoremap <buffer> <silent> i :<C-U>execute <SID>NextExpandedHunk(v:count1)<CR>
exe 'nnoremap <buffer> <silent>' nowait "= :<C-U>execute <SID>StageInline('toggle',line('.'),v:count)<CR>" exe 'nnoremap <buffer> <silent>' nowait "= :<C-U>execute <SID>StageInline('toggle',line('.'),v:count)<CR>"
exe 'nnoremap <buffer> <silent>' nowait "< :<C-U>execute <SID>StageInline('show', line('.'),v:count)<CR>" exe 'nnoremap <buffer> <silent>' nowait "< :<C-U>execute <SID>StageInline('hide', line('.'),v:count)<CR>"
exe 'nnoremap <buffer> <silent>' nowait "> :<C-U>execute <SID>StageInline('hide', line('.'),v:count)<CR>" exe 'nnoremap <buffer> <silent>' nowait "> :<C-U>execute <SID>StageInline('show', line('.'),v:count)<CR>"
exe 'xnoremap <buffer> <silent>' nowait "= :<C-U>execute <SID>StageInline('toggle',line(\"'<\"),line(\"'>\")-line(\"'<\")+1)<CR>" exe 'xnoremap <buffer> <silent>' nowait "= :<C-U>execute <SID>StageInline('toggle',line(\"'<\"),line(\"'>\")-line(\"'<\")+1)<CR>"
exe 'xnoremap <buffer> <silent>' nowait "< :<C-U>execute <SID>StageInline('show', line(\"'<\"),line(\"'>\")-line(\"'<\")+1)<CR>" exe 'xnoremap <buffer> <silent>' nowait "< :<C-U>execute <SID>StageInline('hide', line(\"'<\"),line(\"'>\")-line(\"'<\")+1)<CR>"
exe 'xnoremap <buffer> <silent>' nowait "> :<C-U>execute <SID>StageInline('hide', line(\"'<\"),line(\"'>\")-line(\"'<\")+1)<CR>" exe 'xnoremap <buffer> <silent>' nowait "> :<C-U>execute <SID>StageInline('show', line(\"'<\"),line(\"'>\")-line(\"'<\")+1)<CR>"
nnoremap <buffer> <silent> D :<C-U>execute <SID>StageDiff('Gdiffsplit')<CR> nnoremap <buffer> <silent> D :<C-U>execute <SID>StageDiff('Gdiffsplit')<CR>
nnoremap <buffer> <silent> dd :<C-U>execute <SID>StageDiff('Gdiffsplit')<CR> nnoremap <buffer> <silent> dd :<C-U>execute <SID>StageDiff('Gdiffsplit')<CR>
nnoremap <buffer> <silent> dh :<C-U>execute <SID>StageDiff('Ghdiffsplit')<CR> nnoremap <buffer> <silent> dh :<C-U>execute <SID>StageDiff('Ghdiffsplit')<CR>

View File

@ -264,11 +264,11 @@ X Discard the change under the cursor. This uses
*fugitive_=* *fugitive_=*
= Toggle an inline diff of the file under the cursor. = Toggle an inline diff of the file under the cursor.
*fugitive_<*
< Insert an inline diff of the file under the cursor.
*fugitive_>* *fugitive_>*
> Remove the inline diff of the file under the cursor. > Insert an inline diff of the file under the cursor.
*fugitive_<*
< Remove the inline diff of the file under the cursor.
P Invoke |:Git| add --patch or reset --patch on the file P Invoke |:Git| add --patch or reset --patch on the file
under the cursor. On untracked files, this instead under the cursor. On untracked files, this instead