Skip to content

v0.4.4

Choose a tag to compare

@github-actions github-actions released this 07 Aug 04:07
· 90 commits to main since this release

jupynvim v0.4.4

Cell editing behaves the way vim taught you to expect.

Undo, delete, paste

dd then u used to fail with "modifiable is off". Command mode makes the buffer nomodifiable, and deleting a cell also mutates the notebook model and the backend, so vim's text-level undo was blocked and would have restored text into a model that no longer had the cell.

There is a cell-level undo now, and it follows the order of what you did rather than only re-inserting the last delete, so dd then p then u walks back one step at a time instead of leaving a duplicate. It covers every entry point: the cell-mode keys, <leader>na / <leader>nb / <leader>nd, and the :Jupynvim* commands. dd also yanks what it removes, and P pastes above as well as p below. Reported by @benkj in #27.

move_cell and cell-type changes are not on the stack yet, and there is no redo.

]c and [c move between cells again

They have always been bound to next-cell and prev-cell, but they attach during BufReadCmd and LazyVim's treesitter-textobjects binds the same keys on FileType, after us, and won. In a stock LazyVim config they resolved to "Next Class Start". They are rebound after the filetype autocmds settle, so they are ours again.

Clearing output takes effect immediately

<leader>nc and <leader>nC cleared the model but left the old text on screen until you reopened the notebook. Outputs are real buffer lines, so the buffer is rewritten now, and the change survives :w.

Counts work inside a cell

5j moved one line. j and k in edit mode threw away the count. They honour it now, still clamped to the cell so a large count stops at the boundary instead of bleeding into the next one.

Full Changelog: v0.4.3...v0.4.4