Paul Smith

I grepped the scm-record repo for command names I was familiar with, and, finding the ui.rs source that maps key strokes and mouse clicks to commands, I extracted them into a cheatsheet-style layout suitable for quick reference while learning and using jj's built-in diff editor.

Click here for the cheatsheet

Screenshot of the current version of the cheatsheet

If you're like me, then lately you've been using the new VCS kid on the block, jj. And if you're really like me, then you have encountered the built-in diff editor/merge tool when doing a revision split (jj split), when doing the so-called squash workflow (interactively via jj squash -i), or when resolving a conflict (jj resolve). The tool is bundled with jj. It comes from a project named scm-record. The binary executable you're invoking is named scm-diff-editor, and you might see reference to that name in jj docs, but you don't need to know that if you just leave jj configured by default to use it as the built-in diff/merge tool.

And if you're really, really like me, then when you were presented with the built-in diff/merge tool in your terminal upon executing one of those commands, you were frustrated and felt dumb as you mashed keys and tried to understand what you were supposed to do and how. It's a spartan interface, and as far as I can tell, and I certainly tried to tell, because I queried the usual search indices and other knowledge resources, and combed the jj docs, and noted the apparent complete lack of scm-record docs, there is not much yet out there in the public to help you through editing a diff with it and ultimately amending your jj commit. I don't fault those involved, it's a young and maturing project, and the editor itself is a separate effort from jj, but seeing as how it is a key step in the recommended way of using jj, I needed more help. (Incidentally, Steve's doc linked there was the only documentation I was aware of when I trying to figure this out, so I appreciate him for providing a practical example).