|
5 | 5 | -- Install this module by copying it into your *~/.textadept/modules/* directory or Textadept's
|
6 | 6 | -- *modules/* directory, and then putting the following in your *~/.textadept/init.lua*:
|
7 | 7 | --
|
8 |
| --- require('file_diff') |
| 8 | +-- require('file_diff') |
9 | 9 | --
|
10 | 10 | -- ### Compiling
|
11 | 11 | --
|
12 | 12 | -- Releases include binaries, so building this modules should not be necessary. If you want
|
13 | 13 | -- to build manually, use CMake. For example:
|
14 | 14 | --
|
15 |
| --- cmake -S . -B build_dir |
16 |
| --- cmake --build build_dir --target diff |
17 |
| --- cmake --install build_dir |
| 15 | +-- cmake -S . -B build_dir |
| 16 | +-- cmake --build build_dir --target diff |
| 17 | +-- cmake --install build_dir |
18 | 18 | --
|
19 | 19 | -- ### Usage
|
20 | 20 | --
|
|
24 | 24 | -- 2. The caret is initially placed in the file on the left.
|
25 | 25 | -- 3. Go to the next change via menu or key binding.
|
26 | 26 | -- 4. Merge the change from the other buffer into the current one (right to left) via menu or
|
27 |
| --- key binding. |
| 27 | +-- key binding. |
28 | 28 | -- 5. Go to the next change via menu or key binding.
|
29 | 29 | -- 6. Merge the change from the current buffer into the other one (left to right) via menu or
|
30 |
| --- key binding. |
| 30 | +-- key binding. |
31 | 31 | -- 7. Repeat as necessary.
|
32 | 32 | --
|
33 | 33 | -- Note: merging can be performed wherever the caret is placed when jumping between changes,
|
@@ -275,11 +275,11 @@ local starting_diff = false
|
275 | 275 |
|
276 | 276 | --- Highlight differences between files *file1* and *file2*, or the user-selected files.
|
277 | 277 | -- @param file1 Optional name of the older file. If `-`, uses the current buffer. If `nil`,
|
278 |
| --- the user is prompted for a file. |
| 278 | +-- the user is prompted for a file. |
279 | 279 | -- @param file2 Optional name of the newer file. If `-`, uses the current buffer. If `nil`,
|
280 |
| --- the user is prompted for a file. |
| 280 | +-- the user is prompted for a file. |
281 | 281 | -- @param horizontal Optional flag specifying whether or not to split the view horizontally. The
|
282 |
| --- default value is `false`, comparing the two files side-by-side. |
| 282 | +-- default value is `false`, comparing the two files side-by-side. |
283 | 283 | function M.start(file1, file2, horizontal)
|
284 | 284 | file1 = file1 or ui.dialogs.open{
|
285 | 285 | title = _L['Select the first file to compare'],
|
@@ -561,5 +561,5 @@ return M
|
561 | 561 | -- @param text2 String to compare.
|
562 | 562 | -- @return list of differences
|
563 | 563 | -- @usage diffs = diff(text1, text2)
|
564 |
| --- for i = 1, #diffs, 2 do print(diffs[i], diffs[i + 1]) end |
| 564 | +-- for i = 1, #diffs, 2 do print(diffs[i], diffs[i + 1]) end |
565 | 565 | -- @function _G.diff
|
0 commit comments