@@ -7,14 +7,14 @@ Author: Sindre T. Strøm
7
7
8
8
==============================================================================
9
9
10
- INTRODUCTION *diffview-nvim -introduction*
10
+ INTRODUCTION *diffview-introduction*
11
11
12
12
Vim's diff mode is pretty good, but there is no convenient way to quickly bring
13
13
up all modified files in a diffsplit. This plugin aims to provide a simple,
14
14
unified, single tabpage interface that lets you easily review all changed files
15
15
for any git rev.
16
16
17
- USAGE *diffview-nvim -usage*
17
+ USAGE *diffview-usage*
18
18
19
19
Quick-start: `:DiffviewOpen` to open a Diffview that compares against the
20
20
index.
@@ -30,15 +30,16 @@ Diffviews are automatically updated:
30
30
31
31
Updates are not run unless the current tabpage is a Diffview.
32
32
33
- CONFIGURATION *diffview-nvim-configuration *
33
+ CONFIGURATION *diffview-config *
34
34
35
35
Example configuration with default settings:
36
36
>
37
37
-- Lua
38
38
local cb = require'diffview.config'.diffview_callback
39
39
require'diffview'.setup {
40
40
diff_binaries = false, -- Show diffs for binaries
41
- use_icons = true -- Requires nvim-web-devicons
41
+ use_icons = true, -- Requires nvim-web-devicons
42
+ enhanced_diff_hl = false, -- See |diffview-config-enhanced_diff_hl|
42
43
signs = {
43
44
fold_closed = "",
44
45
fold_open = "",
@@ -123,13 +124,20 @@ Example configuration with default settings:
123
124
}
124
125
<
125
126
126
- LAYOUT *diffview-nvim-layout*
127
+ enhanced_diff_hl *diffview-config-enhanced_diff_hl*
128
+ Type: `boolean ` , Default: `false`
129
+
130
+ Enable/disable enhanced diff highlighting. When enabled, | hl-DiffAdd |
131
+ in the left diff buffer will be highlighted as | hl-DiffDelete | , and
132
+ the delete fill-chars will be highlighted more subtly.
133
+
134
+ LAYOUT *diffview-layout*
127
135
128
136
The diff windows can be aligned either with a horizontal split or a vertical
129
137
split. To change the alignment add either `horizontal ` or `vertical ` to your
130
138
'diffopt' .
131
139
132
- COMMANDS *diffview-nvim -commands*
140
+ COMMANDS *diffview-commands*
133
141
134
142
*:DiffviewOpen*
135
143
:DiffviewOpen [git-rev] [args] [ -- {paths...} ]
@@ -194,7 +202,7 @@ COMMANDS *diffview-nvim-commands*
194
202
:DiffviewRefresh Update stats and entries in the file list of the
195
203
current Diffview.
196
204
197
- MAPS *diffview-nvim -maps*
205
+ MAPS *diffview-maps*
198
206
199
207
All listed maps are the defaults, but all mappings can be configured. Most of
200
208
the file panel mappings should also work from the view if they are added to
@@ -205,7 +213,7 @@ really make sense specifically in the file panel, such as `next_entry`,
205
213
these will target the file currently open in the view rather than the file
206
214
under the cursor in the file panel.
207
215
208
- *diffview-nvim -file-inference*
216
+ *diffview-file-inference*
209
217
File inference~
210
218
211
219
Mappings that target a file will infer the target file according to a set of
@@ -216,77 +224,77 @@ simple rules:
216
224
- If the cursor is in a file panel, the target file will be determined by
217
225
the entry under the cursor.
218
226
219
- *diffview-nvim -maps-view*
227
+ *diffview-maps-view*
220
228
View maps~
221
229
222
230
These maps are available in the diff buffers while a Diffview is the current
223
231
tabpage.
224
232
225
- *diffview-nvim -maps-select_next_entry*
233
+ *diffview-maps-select_next_entry*
226
234
<Tab> Open the diff for the next file.
227
235
228
- *diffview-nvim -maps-select_prev_entry*
236
+ *diffview-maps-select_prev_entry*
229
237
<S-Tab> Open the diff for the previous file.
230
238
231
- *diffview-nvim -maps-goto_file*
239
+ *diffview-maps-goto_file*
232
240
gf Open the local version of the file in a new split in a
233
241
different tabpage. This will target your previous
234
242
(last accessed) tabpage first. If you have no
235
243
non-diffview tabpages open, the file will open in a
236
244
new tabpage. See | diffview-nvim-file-inference | for
237
245
details on how the file target is determined.
238
246
239
- *diffview-nvim -maps-goto_file_split*
247
+ *diffview-maps-goto_file_split*
240
248
<C-w><C-f> Open the local version of the file in a new split. See
241
249
| diffview-nvim-file-inference | for details on how the
242
250
file target is determined.
243
251
244
- *diffview-nvim -maps-goto_file_tab*
252
+ *diffview-maps-goto_file_tab*
245
253
<C-w> gf Open the local version of the file in a new tabpage.
246
254
See | diffview-nvim-file-inference | for details on how
247
255
the file target is determined.
248
256
249
- *diffview-nvim -maps-toggle_files*
257
+ *diffview-maps-toggle_files*
250
258
<leader> b Toggle the file panel.
251
259
252
- *diffview-nvim -maps-focus_files*
260
+ *diffview-maps-focus_files*
253
261
<leader> e Bring focus to the file panel.
254
262
255
- *diffview-nvim -maps-file-panel*
263
+ *diffview-maps-file-panel*
256
264
File panel maps~
257
265
258
266
These maps are available in the file panel buffer.
259
267
260
- *diffview-nvim -maps-next_entry*
268
+ *diffview-maps-next_entry*
261
269
j Bring the cursor to the next file entry
262
270
<Down>
263
271
264
- *diffview-nvim -maps-prev_entry*
272
+ *diffview-maps-prev_entry*
265
273
k Bring the cursor to the previous file entry
266
274
<Up>
267
275
268
- *diffview-nvim -maps-select_entry*
276
+ *diffview-maps-select_entry*
269
277
o Open the diff for the selected file entry.
270
278
<CR>
271
279
<2-LeftMouse>
272
280
273
- *diffview-nvim -maps-toggle_stage_entry*
281
+ *diffview-maps-toggle_stage_entry*
274
282
- Stage/unstage the selected file entry.
275
283
276
- *diffview-nvim -maps-stage_all*
284
+ *diffview-maps-stage_all*
277
285
S Stage all entries.
278
286
279
- *diffview-nvim -maps-unstage_all*
287
+ *diffview-maps-unstage_all*
280
288
U Unstage all entries.
281
289
282
- *diffview-nvim -maps-restore_entry*
290
+ *diffview-maps-restore_entry*
283
291
X Revert the selected file entry to the state from the
284
292
left side of the diff. This only works if the right
285
293
side of the diff is showing the local state of the
286
294
file. A command is echoed that shows how to undo the
287
295
change. Check `:messages ` to see it again.
288
296
289
- *diffview-nvim -maps-refresh_files*
297
+ *diffview-maps-refresh_files*
290
298
R Update the stats and entries in the file list.
291
299
292
300
<Tab> Open the diff for the next file.
@@ -299,23 +307,23 @@ R Update the stats and entries in the file list.
299
307
300
308
<leader> e Bring focus to the file panel.
301
309
302
- *diffview-nvim -maps-file-history-panel*
310
+ *diffview-maps-file-history-panel*
303
311
File history panel maps~
304
312
305
313
These mappings are available in the file history panel buffer (the panel
306
314
listing the commits).
307
315
308
- *diffview-nvim -maps-options*
316
+ *diffview-maps-options*
309
317
g! Open the options panel.
310
318
311
- *diffview-nvim -maps-open_in_diffview*
319
+ *diffview-maps-open_in_diffview*
312
320
<C-d> Open the commit entry under the cursor in a Diffview.
313
321
314
- *diffview-nvim -maps-open_all_folds*
322
+ *diffview-maps-open_all_folds*
315
323
zR Open the fold on all commit entries (only when showing
316
324
history for multiple files).
317
325
318
- *diffview-nvim -maps-close_all_folds*
326
+ *diffview-maps-close_all_folds*
319
327
zM Close the fold on all commit entries (only when showing
320
328
history for multiple files).
321
329
@@ -339,7 +347,7 @@ o Open the diff for the selected item.
339
347
340
348
<leader> e Bring focus to the file history panel.
341
349
342
- *diffview-nvim -maps-file-history-option-panel*
350
+ *diffview-maps-file-history-option-panel*
343
351
File history option panel maps~
344
352
345
353
These mappings are available from the file history options panel. The option
0 commit comments