In terms of what should happen, I imagine example3 should either have Section 2 on its own line, or it should unfold the entire section (because you are technically now editing something inside the scope of the fold.

With example 4, I imagine the correct thing would be to have 'One more thing' be encompassed by the fold when you move Section 2 past it.

Folding is nearly (but not really) great in sublime. The behaviour when using line-up and line-down as the above post points out is spurious and certainly not reliable. With these wrinkles ironed out ST2 could easily replace the functionality of the Outliner in Word for example, about the only feature left in Word that I actually like

Other folding weirdness:

1. selecting the folded line with Ctrl+l and cutting Ctrl+x, while selecting the fold, does not cut it. It only cuts the visible (parent) line of the fold, leaving the folded lines folded, the parent line empty and the fold mark still visible.2. selecting the folded line with Home then Shift+end DOES however correctly cut the entire fold, allowing it to be pasted elsewhere. In this case though it'd be much nicer to see the pasted section remain folded.

Finally, how can we define folding for particular language types like Markdown for example? It seems that Sublime ignores tmLanguage hints for folding, or am I wrong?