jceb/jiejie.nvim

github github
git
stars 43
issues 1
subscribers 0
forks 0
CREATED

UPDATED


jiejie

Neovim plugin that adds support for the Jujutsu source control management system. The design is heavily inspired by vim-fugitive.

jiejie

Usage

jiejie provides a large amount of key mappings in the log window to expose as much of jujutsu's functionality as possible. For remembering the mappings more easily, these rules might prove helpful:

  • The current change (@) is at the center of all interactions. Rebasing a commit, squashing changes, all references the current change.
  • When the cursor is on another change, this other change becomes the target of the operation, e.g. the current change (@) is rebased upon the change under the cursor.
  • Breaking operations, e.g. moving a bookmark backwards (--allow-backwards) or modifying an immutable change (--ignore-immutable), can be achieved by adding a leading ! to the mapping.
  • Destructive operations or operations that prompt the user for an arbitrary change id use upper case letters, e.g. cbM for moving an arbitrary bookmark to the change under the cursor.
  • Shortcuts follow jujutsu's aliases where possible, e.g. all bookmark related cb mappings start with c (change) and b (bookmark alias).

Features

  • UX very close to tope's vim-fugitive
    • Edit file (<CR>, o, gO, O)
    • Edit file at a certain revision (:Jedit [revision]:[file], or by selecting the file in the log summary window via <CR>, o, gO, O)
    • Open full change in preview window (K)
    • Toggle inline diff (=)
    • Compare multiple versions of a file (d?, :Jdiffsplit [revision], dD, dd, dV, dv, dS, ds, dH, dh, dq)
    • Wraper for jj CLI (:J or :Jj)
    • Show help (g?, c?, d?, r?, s?)
  • Status log buffer (:J or :Jj)
    • Includes the list of modified files alongside the log
    • Adjust view of displayed log entries (s?, sA, sa, sb, sd, sf, sr, sq, ss, 1ss, ..ss, st)
    • Navigation between changes, files and hunks ([[, ]], <Tab>)
    • Increase or decrease the number of log entries shown (<C-a>, <C-x>)
    • Close log buffer (q, gq)
    • Populate a : or :! command with the file under the cursor (., !!)
  • Modify commits from the log buffer
    • Add ! prefix to mappings when modifying immutable changes
    • Edit change (<CR>)
    • Pull and push changes to git (gu, gp)
    • Modify change description in an editor window (ce) or quick edit the first line (cd)
    • Copy change description of change / commit ID (yy, yc, yC)
    • Create a new change (c?, A, a, cA, ca, cI, ci, i, I, cn)
    • Create a merge commit (cB, cm, cM)
    • Commit change or file under the cursor (cc)
    • Squash change or file into parent or into the change under the cursor (cs, cS)
    • Duplicate / cherry-pick change under the cursor (cpP, cpp, cpM, cpm, cpT, cpt)
    • Revert change under the cursor (cR)
    • Abandon change or file under the cursor (X)
    • Rebase branch, tree or individual change (r?, <<, >>, rbD, rbd, rbM, rbm, rbO, rbo, rD, rd, rO, ro, rR, rr, rtD, rtd, rtO, rto, rtt rtT)
    • Undo last operation (cU)
    • Bookmark management (cbb, cbc, cbF, cbf, cbM, cbm, cbR, cbr, cbX, cbx)
    • Tag management (ctc, ctm, ctt, ctX, ctx)
    • Untrack and track files (x, !x)

Installation

With Lazy, add this configuration to nvim:

{
  -- https://github.com/jceb/jiejie.nvim.git
  "jceb/jiejie.nvim",
}

Roadmap

See ROADMAP.md.

Limitations

  • Changing the commit log and operation log node icon style will break the plugin!

References

There isn't too much information about Jujutus on the web, yet. Here are a number of references that I find helpful: