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
- Host: GitHub
- URL: https://github.com/tennashi/ddu-source-git
- Owner: tennashi
- Created: 2023-02-23T13:45:59.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-30T06:14:11.000Z (almost 3 years ago)
- Last Synced: 2025-04-04T19:11:09.114Z (about 1 year ago)
- Topics: ddu-kind, ddu-source, ddu-vim
- Language: TypeScript
- Homepage:
- Size: 76.2 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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'}]})
```