mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-02 22:20:06 +08:00
feat(git): add git_diff_position
option
close https://github.com/SpaceVim/SpaceVim/issues/3360
This commit is contained in:
parent
27c0f5585c
commit
592e0ec9ef
@ -22,6 +22,13 @@
|
||||
" name = 'git'
|
||||
" git_plugin = 'git'
|
||||
" <
|
||||
" `git_diff_position`: set the default command to split diff windows, by
|
||||
" default it is `10split`. Example:
|
||||
" >
|
||||
" [[layers]]
|
||||
" name = 'git'
|
||||
" git_diff_position = 'vsplit'
|
||||
" <
|
||||
" @subsection Key bindings
|
||||
"
|
||||
" The following key bindings will be definded when the `git` layer is loaded.
|
||||
@ -152,6 +159,7 @@ function! SpaceVim#layers#git#set_variable(var) abort
|
||||
\ get(a:var,
|
||||
\ 'git-plugin',
|
||||
\ s:git_plugin))
|
||||
let g:git_diff_position = get(a:var, 'git_diff_position', '10split')
|
||||
|
||||
endfunction
|
||||
|
||||
|
@ -40,7 +40,7 @@ endfunction
|
||||
|
||||
|
||||
function! s:openDiffBuffer() abort
|
||||
10split git://diff
|
||||
exe printf('%s git://diff', get(g:, 'git_diff_position', '10split'))
|
||||
normal! "_dd
|
||||
setl nobuflisted
|
||||
setl nomodifiable
|
||||
|
@ -1938,6 +1938,13 @@ is `git`, the following plugins are supported: `gina`, `fugitive` and `gita`.
|
||||
name = 'git'
|
||||
git_plugin = 'git'
|
||||
<
|
||||
`git_diff_position`: set the default command to split diff windows, by default
|
||||
it is `10split`. Example:
|
||||
>
|
||||
[[layers]]
|
||||
name = 'git'
|
||||
git_diff_position = 'vsplit'
|
||||
<
|
||||
KEY BINDINGS
|
||||
|
||||
The following key bindings will be definded when the `git` layer is loaded.
|
||||
|
Loading…
Reference in New Issue
Block a user