mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-13 10:15:41 +08:00
parent
976274f1fe
commit
1eeb3e35ff
@ -413,9 +413,6 @@ function! SpaceVim#end() abort
|
|||||||
let g:leaderGuide_max_size = 15
|
let g:leaderGuide_max_size = 15
|
||||||
let g:leaderGuide_submode_mappings =
|
let g:leaderGuide_submode_mappings =
|
||||||
\ { '<C-C>': 'win_close', '<PageDown>': 'page_down', '<PageUp>': 'page_up'}
|
\ { '<C-C>': 'win_close', '<PageDown>': 'page_down', '<PageUp>': 'page_up'}
|
||||||
let g:_spacevim_mappings.g = {'name' : 'git function',
|
|
||||||
\ 'd' : ['Gita diff', 'git diff'],
|
|
||||||
\ }
|
|
||||||
call SpaceVim#plugins#load()
|
call SpaceVim#plugins#load()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
@ -1,26 +1,63 @@
|
|||||||
function! SpaceVim#layers#git#plugins() abort
|
function! SpaceVim#layers#git#plugins() abort
|
||||||
return [
|
let plugins = [
|
||||||
\ ['cohama/agit.vim', { 'on_cmd':['Agit','AgitFile']}],
|
\ ['cohama/agit.vim', { 'on_cmd' : ['Agit','AgitFile']}],
|
||||||
\ ['gregsexton/gitv', { 'on_cmd':['Gitv']}],
|
\ ['gregsexton/gitv', { 'on_cmd' : ['Gitv']}],
|
||||||
\ ['junegunn/gv.vim', { 'on_cmd' : 'GV'}],
|
\ ['junegunn/gv.vim', { 'on_cmd' : 'GV'}],
|
||||||
\ ['lambdalisue/vim-gita', {'on_cmd': 'Gita'}],
|
\ ['tpope/vim-fugitive', { 'merged' : 0}],
|
||||||
\ ['tpope/vim-fugitive'],
|
\ ]
|
||||||
\ ]
|
if has('patch-8.0.0027') || has('nvim')
|
||||||
|
call add(plugins, ['lambdalisue/gina.vim', { 'on_cmd' : 'Gina'}])
|
||||||
|
else
|
||||||
|
call add(plugins, ['lambdalisue/vim-gita', { 'on_cmd' : 'Gita'}])
|
||||||
|
endif
|
||||||
|
return plugins
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
function! SpaceVim#layers#git#config() abort
|
function! SpaceVim#layers#git#config() abort
|
||||||
nnoremap <silent> <Leader>gs :Gita status<CR>
|
if has('patch-8.0.0027') || has('nvim')
|
||||||
|
nnoremap <silent> <Leader>gd :Gina diff<CR>
|
||||||
|
nnoremap <silent> <Leader>gs :Gina status<CR>
|
||||||
|
nnoremap <silent> <Leader>gc :Gina commit<CR>
|
||||||
|
nnoremap <silent> <Leader>gb :Gina blame<CR>
|
||||||
|
nnoremap <silent> <Leader>gp :Gina push<CR>
|
||||||
|
nnoremap <silent> <Leader>ga :Gina add %<CR>
|
||||||
|
nnoremap <silent> <Leader>gA :Gina add .<CR>
|
||||||
|
let g:_spacevim_mappings.g = {'name' : 'git function',
|
||||||
|
\ 'd' : ['Gina diff', 'git diff'],
|
||||||
|
\ 's' : ['Gina status', 'git status'],
|
||||||
|
\ 'c' : ['Gina commit', 'git commit'],
|
||||||
|
\ 'b' : ['Gina blame', 'git blame'],
|
||||||
|
\ 'p' : ['Gina push', 'git push'],
|
||||||
|
\ 'a' : ['Gina add %', 'git add current buffer'],
|
||||||
|
\ 'A' : ['Gina add .', 'git add all files'],
|
||||||
|
\ }
|
||||||
|
else
|
||||||
nnoremap <silent> <Leader>gd :Gita diff<CR>
|
nnoremap <silent> <Leader>gd :Gita diff<CR>
|
||||||
|
nnoremap <silent> <Leader>gs :Gita status<CR>
|
||||||
nnoremap <silent> <Leader>gc :Gita commit<CR>
|
nnoremap <silent> <Leader>gc :Gita commit<CR>
|
||||||
nnoremap <silent> <Leader>gb :Gita blame<CR>
|
nnoremap <silent> <Leader>gb :Gita blame<CR>
|
||||||
nnoremap <silent> <Leader>gp :Gita push<CR>
|
nnoremap <silent> <Leader>gp :Gita push<CR>
|
||||||
nmap <leader>hj <plug>(signify-next-hunk)
|
nnoremap <silent> <Leader>ga :Gita add %<CR>
|
||||||
nmap <leader>hk <plug>(signify-prev-hunk)
|
nnoremap <silent> <Leader>gA :Gita add .<CR>
|
||||||
nmap <leader>hJ 9999<leader>gj
|
let g:_spacevim_mappings.g = {'name' : 'git function',
|
||||||
nmap <leader>hK 9999<leader>gk
|
\ 'd' : ['Gita diff', 'git diff'],
|
||||||
augroup spacevim_layer_git
|
\ 's' : ['Gita status', 'git status'],
|
||||||
autocmd!
|
\ 'c' : ['Gita commit', 'git commit'],
|
||||||
autocmd FileType diff nnoremap <buffer><silent> q :bd!<CR>
|
\ 'b' : ['Gita blame', 'git blame'],
|
||||||
augroup END
|
\ 'p' : ['Gita push', 'git push'],
|
||||||
|
\ 'a' : ['Gita add %', 'git add current buffer'],
|
||||||
|
\ 'A' : ['Gita add .', 'git add all files'],
|
||||||
|
\ }
|
||||||
|
endif
|
||||||
|
nmap <leader>hj <plug>(signify-next-hunk)
|
||||||
|
nmap <leader>hk <plug>(signify-prev-hunk)
|
||||||
|
nmap <leader>hJ 9999<leader>gj
|
||||||
|
nmap <leader>hK 9999<leader>gk
|
||||||
|
augroup spacevim_layer_git
|
||||||
|
autocmd!
|
||||||
|
autocmd FileType diff nnoremap <buffer><silent> q :bd!<CR>
|
||||||
|
augroup END
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
" vim:set et sw=2 cc=80:
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
let g:leaderGuide_max_size = 15
|
|
||||||
let g:leaderGuide_submode_mappings =
|
|
||||||
\ { '<C-C>': 'win_close', '<PageDown>': 'page_down', '<PageUp>': 'page_up'}
|
|
||||||
let g:_spacevim_mappings.g = {'name' : 'git function',
|
|
||||||
\ 'd' : ['Gita diff', 'git diff'],
|
|
||||||
\ }
|
|
||||||
call leaderGuide#register_prefix_descriptions("\\", 'g:_spacevim_mappings')
|
|
||||||
call leaderGuide#register_prefix_descriptions("[unite]", 'g:_spacevim_unite_mappings')
|
|
@ -1,4 +0,0 @@
|
|||||||
if g:spacevim_realtime_leader_guide
|
|
||||||
nnoremap <silent><nowait> <leader> :<c-u>LeaderGuide get(g:, 'mapleader', '\')<CR>
|
|
||||||
vnoremap <silent> <leader> :<c-u>LeaderGuideVisual get(g:, 'mapleader', '\')<CR>
|
|
||||||
endif
|
|
Loading…
x
Reference in New Issue
Block a user