An open API service indexing awesome lists of open source software.

https://github.com/tennashi/ddu-source-git


https://github.com/tennashi/ddu-source-git

ddu-kind ddu-source ddu-vim

Last synced: 11 months ago
JSON representation

Awesome Lists containing this project

README

          

# ddu-source-git

`git` source for `ddu.vim`

This source collects various item by using `git` command.

# Required

- [vim-denops/denops.vim](https://github.com/vim-denops/denops.vim)
- [Shougo/ddu.vim](https://github.com/Shougo/ddu.vim)
- [git/git](https://github.com/git/git)

# Supported sources

- `git_ref`: `git show-ref`
- `git_status`: `git status`

# Supported actions

## `git_branch` kind

- `switch`: `git switch `
- `create`: `git branch `
- `tag`: `git tag `
- `delete`: `git branch --delete `
- `push`: `git push --set-upstream `
- `pull`: `git pull --set-upstream `

## `git_tag` kind

- `switch`: `git switch --detach `
- `create`: `git tag `
- `delete`: `git tag --delete `

## `git_index` kind

- `restoreStaged`: `git restore --staged `
- `commitAll`: `git commit`

## `git_working_tree` kind

- `add`: `git add `
- `restore`: `git restore `

# Example

```vim
" 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'}]})
```