1
1
# File Diff
2
- ---
3
2
4
3
Two-way file comparison for Textadept.
5
4
6
5
Install this module by copying it into your * ~ /.textadept/modules/* directory or Textadept's
7
6
* modules/* directory, and then putting the following in your * ~ /.textadept/init.lua* :
8
7
9
- require('file_diff')
8
+ require('file_diff')
10
9
11
10
## Compiling
12
11
13
12
Releases include binaries, so building this modules should not be necessary. If you want
14
13
to build manually, use CMake. For example:
15
14
16
- cmake -S . -B build_dir
17
- cmake --build build_dir --target diff
18
- cmake --install build_dir
15
+ cmake -S . -B build_dir
16
+ cmake --build build_dir --target diff
17
+ cmake --install build_dir
19
18
20
19
## Usage
21
20
@@ -25,10 +24,10 @@ A sample workflow is this:
25
24
2 . The caret is initially placed in the file on the left.
26
25
3 . Go to the next change via menu or key binding.
27
26
4 . Merge the change from the other buffer into the current one (right to left) via menu or
28
- key binding.
27
+ key binding.
29
28
5 . Go to the next change via menu or key binding.
30
29
6 . Merge the change from the current buffer into the other one (left to right) via menu or
31
- key binding.
30
+ key binding.
32
31
7 . Repeat as necessary.
33
32
34
33
Note: merging can be performed wherever the caret is placed when jumping between changes,
@@ -93,7 +92,7 @@ Parameters:
93
92
Usage:
94
93
95
94
- `diffs = diff(text1, text2)
96
- for i = 1, #diffs, 2 do print(diffs[ i] , diffs[ i + 1] ) end
95
+ for i = 1, #diffs, 2 do print(diffs[i], diffs[i + 1]) end
97
96
`
98
97
99
98
Return:
@@ -128,11 +127,11 @@ Highlight differences between files *file1* and *file2*, or the user-selected fi
128
127
Parameters:
129
128
130
129
- * file1* : Optional name of the older file. If ` - ` , uses the current buffer. If ` nil ` ,
131
- the user is prompted for a file.
130
+ the user is prompted for a file.
132
131
- * file2* : Optional name of the newer file. If ` - ` , uses the current buffer. If ` nil ` ,
133
- the user is prompted for a file.
132
+ the user is prompted for a file.
134
133
- * horizontal* : Optional flag specifying whether or not to split the view horizontally. The
135
- default value is ` false ` , comparing the two files side-by-side.
134
+ default value is `false`, comparing the two files side-by-side.
136
135
137
136
138
137
---
0 commit comments