Add an S mapping for vertical splits from :Gstatus

This commit is contained in:
Adam George 2012-03-26 15:02:08 +11:00 committed by Tim Pope
parent dfba6a17f6
commit 75a27559a3
2 changed files with 7 additions and 0 deletions

View File

@ -53,6 +53,7 @@ that are part of Git repositories).
p |:Git| reset --patch (staged files)
q close status
R reload status
S |:Gvsplit|
*fugitive-:Gcommit*
:Gcommit [args] A wrapper around git-commit. If there is nothing
@ -232,6 +233,10 @@ These maps are available in Git objects.
*fugitive-o*
o Jump to the revision under the cursor in a new split.
*fugitive-S*
S Jump to the revision under the cursor in a new
vertical split.
*fugitive-O*
O Jump to the revision under the cursor in a new tab.

View File

@ -2172,6 +2172,7 @@ function! s:JumpInit() abort
nnoremap <buffer> <silent> <CR> :<C-U>exe <SID>GF("edit")<CR>
if !&modifiable
nnoremap <buffer> <silent> o :<C-U>exe <SID>GF("split")<CR>
nnoremap <buffer> <silent> S :<C-U>exe <SID>GF("vsplit")<CR>
nnoremap <buffer> <silent> O :<C-U>exe <SID>GF("tabedit")<CR>
nnoremap <buffer> <silent> - :<C-U>exe <SID>Edit('edit',0,<SID>buffer().up(v:count1))<CR>
nnoremap <buffer> <silent> P :<C-U>exe <SID>Edit('edit',0,<SID>buffer().commit().'^'.v:count1.<SID>buffer().path(':'))<CR>
@ -2179,6 +2180,7 @@ function! s:JumpInit() abort
nnoremap <buffer> <silent> C :<C-U>exe <SID>Edit('edit',0,<SID>buffer().containing_commit())<CR>
nnoremap <buffer> <silent> cc :<C-U>exe <SID>Edit('edit',0,<SID>buffer().containing_commit())<CR>
nnoremap <buffer> <silent> co :<C-U>exe <SID>Edit('split',0,<SID>buffer().containing_commit())<CR>
nnoremap <buffer> <silent> cS :<C-U>exe <SID>Edit('vsplit',0,<SID>buffer().containing_commit())<CR>
nnoremap <buffer> <silent> cO :<C-U>exe <SID>Edit('tabedit',0,<SID>buffer().containing_commit())<CR>
nnoremap <buffer> <silent> cp :<C-U>exe <SID>Edit('pedit',0,<SID>buffer().containing_commit())<CR>
endif