Skip to content

Inline Describe

Inline Describe

Press enter on a revision to open the inline description editor. The current description is loaded into the editor.

  • enter: insert a new line
  • alt+enter or ctrl+s: apply — runs jj describe with what you’ve typed
  • alt+shift+enter: force apply — useful when intentionally updating an immutable revision
  • alt+e: open the description in your external editor instead
  • esc: cancel when unchanged; when modified, open the discard confirmation
  • ctrl+x: clear the whole description and save it in the yank buffer

Press ctrl+y to insert the text most recently killed with ctrl+k or ctrl+u. After ctrl+x, ctrl+y restores the complete description.

When the description has unsaved changes, the discard confirmation starts with Discard selected: press enter or y to discard, or press esc (or n) to keep editing.

Inline describe exposes separate actions for accepting the description and inserting a new line, so you can choose the editing style you prefer. For example, this makes enter accept and shift+enter insert a line break:

[[bindings]]
action = "revisions.inline_describe.accept"
key = "enter"
scope = "revisions.inline_describe"
[[bindings]]
action = "revisions.inline_describe.new_line"
key = "shift+enter"
scope = "revisions.inline_describe"

The accept action also supports a force argument. This can be used from Lua to share an “ignore immutable” toggle with other operations:

local ignore_immutable = false
function setup(config)
config.action("toggle ignore immutable", function()
ignore_immutable = not ignore_immutable
flash(ignore_immutable and "ignore immutable is turned on" or "ignore immutable is turned off")
end, {
key = "G",
scope = "revisions",
})
config.action("revisions.inline_describe.accept", function()
jjui.builtin.revisions.inline_describe.accept({ force = ignore_immutable })
end)
end
Contribute Community