Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When working in a Mathematica notebook, I often want to reorder cells. Most of the time, I am adding cells at the bottom of the notebook, until I realize it may be better to insert this calculation at an earlier point, between existing cells.

Is there a convenient way to reorder cells in a Mathematica notebook without having to cut and paste?

Ideally, I would like to be able to drag cells by their bracket, possibly holding a modifier key. I've searched through the internet in general and this StackExchange in particular and come up with nothing.

share|improve this question
Interesting idea. I've wanted something like this before, but never bothered to implement it. Off the top of my head, I think it should be possible by using SelectedCells, then copy, NotebookDelete, SelectionMove (in the desired direction), followed by NotebookWrite. These could be bound to particular (modified) keys in – R. M. Dec 6 '13 at 20:24
@rm-rf - Thanks, I'll look into it. (Note: this is my second day of Mathematica, so I have some figuring out to do.) – Daan Michiels Dec 6 '13 at 20:26
Oh... then it might be a little too much too soon for you, I think. FrontEnd programming is not easy (and definitely not for a day 2 user). I'll try and post answer later if I get some time (you might get an answer sooner than that). Also, if it's only your day 2, I would encourage you to try to work with the notebook as is and get used to it a bit. It's not like your traditional text editor, so some very common features like undo, line numbers, moving lines up/down, joining lines, block indenting, etc. are unavailable. Everything is based around a Cell as the lowest common unit, not a line. – R. M. Dec 6 '13 at 20:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.