If you only care about folding Markdown, as in your animation, I'm sure that there are Markdown-specific editors that do that.
If you want folding across a wide variety of languages, then I think that your choices are going to be more-limited, since those editors need to be able to parse those languages. Vim and Emacs are kinda the Big Two general-purpose editors, and they're gonna have the widest support.
EDIT: For specifically programming languages, a number of IDEs can probably do it.
Here's Eclipse, for example.
EDIT2:
https://en.wikipedia.org/wiki/Comparison_of_text_editors
This has a "text folding" and "code folding" column.