issues icon indicating copy to clipboard operation
issues copied to clipboard

Feature Request: re-order headings by dragging in the headings dialog

Open iainsproat opened this issue 7 years ago • 6 comments

I'd like to be able to drag and drop headings in the ctrl g headings dialog to quickly select and reorder entire sections of the file.

The desired workflow:

  1. press ctrl g to view the headings dialog
  2. Press and hold a heading
  3. The heading and all content below it to, up to but not including the next heading at the same level, is selected in the active file
    1. Dragging and releasing the heading to a new location in the dialog will move the entire selection in the active file to its corresponding new location
    2. Alternatively, releasing without dragging will unselect the content

Thank you!

iainsproat avatar May 21 '17 17:05 iainsproat

@erusev, @astoilkov this is in line with the outline mode we've discussed before and I honestly feel it would be an excellent addition to Caret. This is one possible way of doing it and would remain familiar to long time user of Caret.

pslobo avatar May 22 '17 08:05 pslobo

What if we make keyboard shortcuts that move the selected heading up / down and these are the same shortcuts that move the current line up / down in the editor? Would that make sense?

erusev avatar May 22 '17 10:05 erusev

@erusev that would work fine for me provided that when moving a header, all child elements beneath that header move with it. So moving an H2, would move all text and nested H3-H6 headers beneath that H2. Like I mentioned at the time, good examples of this behaviour are TaskPaper and MultiMarkdown Composer.

pslobo avatar May 22 '17 10:05 pslobo

@pslobo - I agree that all the child elements of a header should move with the header.

@erusev are you referring to the shortcuts alt and alt ?

iainsproat avatar May 22 '17 11:05 iainsproat

@pslobo Yes, that makes sense.

@iainsproat Yes. Perhaps, we should support both dragging and shortctuts, though.

erusev avatar May 22 '17 13:05 erusev

I ran into this issue. When you are writing or editing a longer piece, the ability to rearrange heading sections for better flow is something a lot of writers do. The ability to do this from the Outline View would be amazing. Right now I am cutting and pasting manually.

sguergachi avatar Dec 03 '18 00:12 sguergachi