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.tool = "jjdiff --print"  # 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.2.0.tar.gz (643.6 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.2.0-py3-none-any.whl (867.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for jjdiff-0.2.0.tar.gz
Algorithm Hash digest
SHA256 12f0c6116de2916a61de012f2db217368ae7b1a4c5f9fecb8f568bea1cf924a2
MD5 d0e6b6b3f976af27a71eccf2d8630232
BLAKE2b-256 a4c176072895267bb0d054429d6aaeaba360ad715bb0ef21fd61c6e4798903d0

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for jjdiff-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7091363216603fc11705c777db4b92cc51ef8f56e5269167a7b0b7b7c8dff907
MD5 9b31388c919734443315f2cb7b5a176e
BLAKE2b-256 cfcd38e9666095d454b41492b6c7cbb3f6189aec0a853281d455d862b5248779

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