{"id":13895980,"url":"https://github.com/orbitalquark/textadept-file-diff","last_synced_at":"2025-05-01T18:30:30.588Z","repository":{"id":42376212,"uuid":"301852204","full_name":"orbitalquark/textadept-file-diff","owner":"orbitalquark","description":"Two-way file comparison module for Textadept.","archived":false,"fork":false,"pushed_at":"2025-04-24T13:37:26.000Z","size":146,"stargazers_count":15,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"default","last_synced_at":"2025-04-24T14:35:41.797Z","etag":null,"topics":["file-compare","file-comparison","file-diff","textadept","textadept-module"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/orbitalquark.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-10-06T20:53:58.000Z","updated_at":"2025-04-24T13:35:38.000Z","dependencies_parsed_at":"2023-12-18T06:26:07.594Z","dependency_job_id":"54341ddb-f3a0-4056-8922-0f175da2f7f2","html_url":"https://github.com/orbitalquark/textadept-file-diff","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbitalquark%2Ftextadept-file-diff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbitalquark%2Ftextadept-file-diff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbitalquark%2Ftextadept-file-diff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbitalquark%2Ftextadept-file-diff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orbitalquark","download_url":"https://codeload.github.com/orbitalquark/textadept-file-diff/tar.gz/refs/heads/default","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251924562,"owners_count":21665991,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["file-compare","file-comparison","file-diff","textadept","textadept-module"],"created_at":"2024-08-06T18:02:35.853Z","updated_at":"2025-05-01T18:30:30.581Z","avatar_url":"https://github.com/orbitalquark.png","language":"Lua","funding_links":[],"categories":["Lua"],"sub_categories":[],"readme":"# File Diff\n\nTwo-way file comparison for Textadept.\n\nInstall this module by copying it into your *~/.textadept/modules/* directory or Textadept's\n*modules/* directory, and then putting the following in your *~/.textadept/init.lua*:\n\n```lua\nlocal file_diff = require('file_diff')\n```\n\n## Compiling\n\nReleases include binaries, so building this modules should not be necessary. If you want\nto build manually, use CMake. For example:\n\n```bash\ncmake -S . -B build_dir\ncmake --build build_dir --target diff\ncmake --install build_dir\n```\n\n## Usage\n\nA sample workflow is this:\n1. Start comparing two files via the \"Compare Files\" submenu in the \"Tools\" menu.\n2. The caret is initially placed in the file on the left.\n3. Go to the next change via menu or key binding.\n4. Merge the change from the other buffer into the current one (right to left) via menu or\n\tkey binding.\n5. Go to the next change via menu or key binding.\n6. Merge the change from the current buffer into the other one (left to right) via menu or\n\tkey binding.\n7. Repeat as necessary.\n\nNote: merging can be performed wherever the caret is placed when jumping between changes,\neven if one buffer has a change and the other does not (additions or deletions).\n\n## Key Bindings\n\nWindows and Linux | macOS | Terminal | Command\n-|-|-|-\n**Tools**| | |\nF6 | F6 | None | Compare files...\nShift+F6 | ⇧F6 | None | Compare the buffers in two split views\nCtrl+F6 | ⌘F6 | None | Stop comparing\nCtrl+Alt+. | ^⌘. | None | Goto next difference\nCtrl+Alt+, | ^⌘, | None | Goto previous difference\nCtrl+Alt+\u003c | ^⌘\u003c | None | Merge left\nCtrl+Alt+\u003e | ^⌘\u003e | None | Merge right\n\n\u003ca id=\"file_diff.INDIC_ADDITION\"\u003e\u003c/a\u003e\n## `file_diff.INDIC_ADDITION`\n\nThe indicator number for text added within lines.\n\n\u003ca id=\"file_diff.INDIC_DELETION\"\u003e\u003c/a\u003e\n## `file_diff.INDIC_DELETION`\n\nThe indicator number for text deleted within lines.\n\n\u003ca id=\"file_diff.MARK_ADDITION\"\u003e\u003c/a\u003e\n## `file_diff.MARK_ADDITION`\n\nThe marker for line additions.\n\n\u003ca id=\"file_diff.MARK_DELETION\"\u003e\u003c/a\u003e\n## `file_diff.MARK_DELETION`\n\nThe marker for line deletions.\n\n\u003ca id=\"file_diff.MARK_MODIFICATION\"\u003e\u003c/a\u003e\n## `file_diff.MARK_MODIFICATION`\n\nThe marker for line modifications.\n\n\u003ca id=\"_G.diff\"\u003e\u003c/a\u003e\n## `_G.diff`(*text1*, *text2*)\n\nReturns a list of the differences between strings.\n\nEach consecutive pair of elements in the returned list represents a \"diff\". The first element\nis an integer: 0 for a deletion, 1 for an insertion, and 2 for equality. The second element\nis the associated diff text.\n\nParameters:\n- *text1*:  String to compare against.\n- *text2*:  String to compare.\n\nUsage:\n\n```lua\ndiffs = diff(text1, text2)\nfor i = 1, #diffs, 2 do print(diffs[i], diffs[i + 1]) end\n```\n\n\u003ca id=\"file_diff.addition_color_name\"\u003e\u003c/a\u003e\n## `file_diff.addition_color_name`\n\nThe name of the theme color used to mark additions.\n\nThe default value is 'green'. If your theme does not define that color, set this field to\nyour theme's equivalent.\n\n\u003ca id=\"file_diff.deletion_color_name\"\u003e\u003c/a\u003e\n## `file_diff.deletion_color_name`\n\nThe name of the theme color used to mark deletions.\n\nThe default value is 'red'. If your theme does not define that color, set this field to your\ntheme's equivalent.\n\n\u003ca id=\"file_diff.goto_change\"\u003e\u003c/a\u003e\n## `file_diff.goto_change`([*next*=false])\n\nJumps to the next or previous difference between the two files.\n\n[`file_diff.start()`](#file_diff.start) must have been called previously.\n\nParameters:\n- *next*:  Go to the next previous difference relative to the current line,\n\tas opposed to the previous one.\n\n\u003ca id=\"file_diff.merge\"\u003e\u003c/a\u003e\n## `file_diff.merge`([*left*=false])\n\nMerges a change from one buffer to another, depending on the change under the caret and the\nmerge direction.\n\nParameters:\n- *left*:  Merge from right to left as opposed to left to right.\n\n\u003ca id=\"file_diff.modification_color_name\"\u003e\u003c/a\u003e\n## `file_diff.modification_color_name`\n\nThe name of the theme color used to mark modifications.\n\nThe default value is 'yellow'. If your theme does not define that color, set this field to\nyour theme's equivalent.\n\n\u003ca id=\"file_diff.start\"\u003e\u003c/a\u003e\n## `file_diff.start`([*file1*[, *file2*[, *horizontal*=false]]])\n\nHighlight differences between files.\n\nParameters:\n- *file1*:  String older filename. If `-`, uses the current buffer. If `nil`, the user\n\tis prompted for a file.\n- *file2*:  String newer filename. If `-`, uses the current buffer. If `nil`, the user\n\tis prompted for a file.\n- *horizontal*:  Split the view horizontally instead of vertically. The\n\tdefault is to compare files side-by-side.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forbitalquark%2Ftextadept-file-diff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forbitalquark%2Ftextadept-file-diff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forbitalquark%2Ftextadept-file-diff/lists"}