Terminal emulator that has "code folding"
Solution 1:
I have being looking for this feature for years as but I am afraid to say that at this moment there is no usable terminal that implements this feature.
I read that there were plans to add it to iTerm2 but that moment is still on wishlist.