mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-09 09: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'
|
" name = 'git'
|
||||||
" git_plugin = '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
|
" @subsection Key bindings
|
||||||
"
|
"
|
||||||
" The following key bindings will be definded when the `git` layer is loaded.
|
" 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,
|
\ get(a:var,
|
||||||
\ 'git-plugin',
|
\ 'git-plugin',
|
||||||
\ s:git_plugin))
|
\ s:git_plugin))
|
||||||
|
let g:git_diff_position = get(a:var, 'git_diff_position', '10split')
|
||||||
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ endfunction
|
|||||||
|
|
||||||
|
|
||||||
function! s:openDiffBuffer() abort
|
function! s:openDiffBuffer() abort
|
||||||
10split git://diff
|
exe printf('%s git://diff', get(g:, 'git_diff_position', '10split'))
|
||||||
normal! "_dd
|
normal! "_dd
|
||||||
setl nobuflisted
|
setl nobuflisted
|
||||||
setl nomodifiable
|
setl nomodifiable
|
||||||
|
@ -1938,6 +1938,13 @@ is `git`, the following plugins are supported: `gina`, `fugitive` and `gita`.
|
|||||||
name = 'git'
|
name = 'git'
|
||||||
git_plugin = '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
|
KEY BINDINGS
|
||||||
|
|
||||||
The following key bindings will be definded when the `git` layer is loaded.
|
The following key bindings will be definded when the `git` layer is loaded.
|
||||||
|
Loading…
Reference in New Issue
Block a user