Maintaining tab depths / nested structure in pasted text


#1

Continuing the discussion from FoldingText 2.1 Dev (741):

Thanks for the response @complexpoint! Apologies for the delay. Thought I was going a little crazy, but I’ve got a clearer sense of my issue with this now. I’m copying and pasting text within the same FoldingText document. What I’ve seen is that if I have:

  • item
  • item
  • item

And I copy these items into a blank space within a document (i.e. not directly under a heading)— tabs are retained without any problems. If, however, I paste these items directly under a heading, I lose indents, and they’re all pasted in on the same level. Is this expected behaviour? Makes for a few more keypresses to tidy text up when moving things around…


#2

Levels and indents can be the same thing if you are only using list items,

but if you use hash headings then the levels are preserved, but they are no longer fully represented by indentation. (Lists under hashes start their level from from one more than that of their parent heading, rather than from their own raw tab count).

Have you tried experimenting with this plugin, which allows you to re-format your outline between 0 and 6 levels of hash heading ? You can watch the indentation levels change, while the logical levels remain unchanged.


#3

Ah. This is really interesting.

I’ve seen the plugin, but hadn’t really considered how it’ll work for me. I’m not sure how I’d tweak it in the case of wanting to shift an item with some nested tasks to another part of the same document, and whether that would be the easiest way to do what I want?

I think I need to pay more mind to whether items under headings are indented when I’m pasting between lists. I’m inclined to intend items, but I know some of the plugins I use to grab items from outside of FoldingText don’t force a tab (e.g. the “grab email as task and put it in inbox” script you helped me with…). I’m guessing that’s not too difficult to adjust, though!