Skip to main content

Add your description here

Project description

jjdiff

A TUI that can be used as a diff editor in the jujutsu vcs.

jjdiff will show all changes and allow you to navigate through them and (partially) select them to be included.

jjdiff makes it easy to navigate the diff by having a 2 dimensional cursor that can 'grow' and 'shrink'.

This cursor can operate on 3 levels:

  • Change: select an entire change
  • Hunk: select a group of edited lines in a file
  • Line: select a single edited line in a file

Keybindings

Command Key Description
exit escape, ctrl+c or ctrl+d Exit the diff editor with status code 1, causing the diff to not be applied.
next_cursor j, down or tab Select the next entry.
prev_cursor k, up or shift+tab Select the previous entry.
shrink_cursor l or right Shrink the cursor. So go from change to hunk and from hunk to line. If the cursor is on an unopened change it will open it first.
grow_cursor h or left Grow the cursor. So go from line to hunk and from hunk to change. If the cursor is on an opened change it will close it.
select_cursor space Mark everything selected by the cursor to be included. If everything is already marked it will exclude it instead. This will also select the next entry.
confirm enter Confirm the selected changes.
undo u Undo the last command. Commands that only affect the UI state like changing the cursor and opening/closing changes are not included in this.
redo U Redo the last undone command. Commands that only affect the UI state like changing the cursor and opening/closing changes are not included in this.

Usage

jjdiff is available on pypi. You can use any way you are comfortable installing python applications.

You can then use it by adding the following settings to ~/.config/jj/config.toml:

[ui]
diff-editor = "jjdiff"
diff-instructions = false  # not required but recommended
diff-formatter = ["jjdiff", "--print", "$left", "$right"]  # to also format diffs using jjdiff

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jjdiff-0.3.0.tar.gz (644.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jjdiff-0.3.0-py3-none-any.whl (868.0 kB view details)

Uploaded Python 3

File details

Details for the file jjdiff-0.3.0.tar.gz.

File metadata

  • Download URL: jjdiff-0.3.0.tar.gz
  • Upload date:
  • Size: 644.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.3

File hashes

Hashes for jjdiff-0.3.0.tar.gz
Algorithm Hash digest
SHA256 4f3c1efe43663e4e69bad35f3cf831762f42b8c65fca8e91f2cd30e3cf3c3916
MD5 a56897611e09dc6e9c1c1cb11cd4fc1a
BLAKE2b-256 a314a15f87f1f6f6f1e3d49d289737776d554a26888432e64e9c66db6a647b3c

See more details on using hashes here.

File details

Details for the file jjdiff-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: jjdiff-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 868.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.3

File hashes

Hashes for jjdiff-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f2c3340ada2b0fa85bb7e98e69fe609c4991c5abee7d4c15e164a48780da7eba
MD5 108bc9f2858c49a4998ffeac9604bf17
BLAKE2b-256 d11bf036c7b8b486f2b6b57078c9320553a1184586ec7840828b088e64e45e2f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page