git
source for ddu.vim
This source collects various item by using git
command.
git_ref
:git show-ref
git_status
:git status
switch
:git switch <branch_name>
create
:git branch <branch_name>
tag
:git tag <tag_name> <branch_name>
delete
:git branch --delete <branch_name>
push
:git push --set-upstream <remote_name> <branch_name>
pull
:git pull --set-upstream <remote_name> <branch_name>
switch
:git switch --detach <tag_name>
create
:git tag <tag_name>
delete
:git tag --delete <tag_name>
restoreStaged
:git restore --staged <path>
commitAll
:git commit
add
:git add <path>
restore
:git restore <path>
" Set default kind action.
call ddu#custom#patch_global({
\ 'kindOptions': {
\ 'git_tag': {
\ 'defaultAction': 'switch',
\ },
\ 'git_branch': {
\ 'defaultAction': 'switch',
\ },
\ },
\}
" Use git_ref source.
call ddu#start({'ui': 'ff', 'sources': [{'name': 'git_ref'}]})