-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathddu-source-git_diff.txt
122 lines (91 loc) · 3.69 KB
/
ddu-source-git_diff.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
*ddu-source-git_diff.txt* Git diff source for ddu.vim
Author: kuuote
License: zlib license
CONTENTS *ddu-source-git_diff-contents*
Introduction |ddu-source-git_diff-introduction|
Install |ddu-source-git_diff-install|
Examples |ddu-source-git_diff-examples|
Actions |ddu-source-git_diff-actions|
Params |ddu-source-git_diff-params|
Compatibility |ddu-source-git_diff-compatibility|
==============================================================================
INTRODUCTION *ddu-source-git_diff-introduction*
This is |ddu-sources| show file differ by `git diff`
It is a |ddu-kind-file| source like |ddu-source-line|.
It useful for jump to modified position
==============================================================================
INSTALL *ddu-source-git_diff-install*
Please install under plugins.
https://github.com/vim-denops/denops.vim
https://github.com/Shougo/ddu.vim
https://github.com/Shougo/ddu-kind-file
==============================================================================
EXAMPLES *ddu-source-git_diff-examples*
Use |ddu-source-option-path| to specify worktree or target file. (for onlyFile)
>
call ddu#start(#{
\ sources: [#{
\ name: 'git_diff',
\ options: #{
\ path: expand('%:p'),
\ },
\ params: #{
\ onlyFile: v:true,
\ },
\ }],
\ })
call ddu#start(#{
\ sources: [#{
\ name: 'git_diff',
\ params: #{
\ show: v:true,
\ },
\ }],
\ })
" With ddu-commands.vim
" https://github.com/Shougo/ddu-commands.vim
Ddu git_diff -name=git_diff -source-option-path=`expand('%:p')`
Ddu git_diff -name=git_diff -source-param-show=v:true
<
==============================================================================
ACTIONS *ddu-source-git_diff-actions*
Almost actions are from |ddu-kind-file|. Please see it.
*ddu-source-git_diff-action-applyPatch*
applyPatch
Apply patch of selects files, hunks, or lines to staging area.
It can be partial add like lazygit.
Note: It's only normal diff or reverse and cached flags are
true to works properly.
==============================================================================
PARAMS *ddu-source-git_diff-params*
*ddu-source-git_diff-param-cached*
cached (boolean)
Append `--cached` flag to command execution.
For display staging area.
Default: v:false
*ddu-source-git_diff-param-onlyFile*
onlyFile (boolean)
Shows diff to only specified file.
Default: v:false
*ddu-source-git_diff-param-reverse*
reverse (boolean)
Swap diff target by `git diff -R`
It is useful for applyPatch action with cached param
for discard cached lines.
Default: v:false
*ddu-source-git_diff-param-show*
show (boolean)
Use `git show` instead of `git diff`
Default: v:false
*ddu-source-git_diff-param-unifiedContext*
unifiedContext (number)
Generate diffs with specified lines of unified context.
It pass to `-U<n>`
Default: 3
==============================================================================
COMPATIBILITY *ddu-source-git_diff-compatibility*
2023-07-09~
* Use |ddu-source-option-path| instead of current file path.
Change to require specify path manually.
==============================================================================
vim:tw=78:ts=8:ft=help:norl:noet:fen:noet: