Closed fonsp closed 7 months ago
Open Julia and type:
julia> import Pkg
julia> Pkg.activate(temp=true)
julia> Pkg.add(url="https://github.com/fonsp/Pluto.jl", rev="move-cells-with-alt-arrow")
julia> using Pluto
I had one weird issue when moving the cell from the CM (when everything is selected): moving up works fine, but moving down causes the CM to lose focus, so I had to manually refocus the cell after moving. It looks janky and cm_forced_focus
ed cells dont fully work. Annoying!
Not sure why it happens, the preact key
is working properly: the cell input is not being regenerated, it just loses focus.
EDIT: this was caused by https://github.com/preactjs/preact/issues/4235
Part of #65
You can now use
Alt
+Up
/Down
(orOption
+Up
/Down
on Mac) to move cells in the notebook.This was already the shortcut to move lines within a cell (just like VS Code). I found a nice way to make the shortcut work naturally for both actions:
All methods will auto-scroll (instant) to keep the cell in view.
https://github.com/fonsp/Pluto.jl/assets/6933510/96e120bb-80e2-4b72-92bc-861b76fe2656