Skip to content

Preview

Press p to toggle the preview pane. It updates automatically as you navigate — what it shows depends on what is currently selected.

GIF

ContextWhat preview shows
Revision highlightedDiff of that revision (jj show)
File highlighted in detailsDiff of that file (jj diff)
Evolog entry highlightedPatch diff of that entry (jj evolog -p -n 1)
Oplog entry highlightedOperation details (jj op show)
  • p: toggle preview on/off
  • shift+p: move preview to bottom (toggle between side and bottom)
  • ctrl+n: scroll one line down
  • ctrl+p: scroll one line up
  • ctrl+d: scroll half page down
  • ctrl+u: scroll half page up
  • ctrl+h: expand preview width
  • ctrl+l: shrink preview width

When mouse support is available, you can scroll the preview and drag the separator to resize it.

[preview]
position = "auto" # auto | right | bottom
show_at_start = false
width_percentage = 50.0
width_increment_percentage = 5.0
  • auto (default): uses bottom in tall terminals, right in wide terminals
  • right: always on the right
  • bottom: always at the bottom

All preview commands are configurable. The placeholders $change_id, $commit_id, $operation_id, and $file are substituted at runtime.

[preview]
revision_command = ["show", "--color", "always", "-r", "$change_id"]
evolog_command = ["evolog", "--color", "always", "-r", "$commit_id", "-p", "-n", "1"]
oplog_command = ["op", "show", "$operation_id", "--color", "always"]
file_command = ["diff", "--color", "always", "-r", "$change_id", "$file"]
Contribute Community