Toad World® Forums

Code Folding

Guys, I come from a .NET world and we have a similar ability to fold code in Visual Studio. When you fold code on Visual Studio you can edit the code around the folded code without issues.

I am not able to do the same thing in Toad. Is there any option that will allow me to isolate the folded section. For example, I just want to copy a folded section like: SELECT… in other words, just copy one line which will allow me to copy the whole code underneith the fold in one shot.

Something else I was trying to do is working around folded code without the folded code automatically unfolding. For example: I have a folded section, SELECT… and I want to surround the folded section with a SELECT COUNT(*) FROM (SELECT…)

Is any of this possible in Toad?

You can copy the folded region, but you have to start your selection on the line above or below it. It’s not intuitive, but you can’t select only on the folded line.

As soon as you start typing your “SELECT COUNT(*)…” statement you’ve invalidated your earlier SELECT and incorporated it into your parent SELECT. It’s not until you complete your statement that the editor can parse and detect a parent SELECT with a sub-select within, but by that point the folding region has already become invalidated and has been removed.