Selective Display (aka folding)

I am a simple guy. I can’t keep reams of detail in my head at one time. I like to see an overview of what is happening and when I need the detail, I want to get to the relevant bit quickly. When finished dealing with the detail, I want to return to the overview.

And I want to do this fast!

Any editor that supports this is a real saviour. Of the editors I currently use, Visual SlickEdit provides Selective Display and VIM provides Folding. Unfortunately I have not discovered this feature in the doyen of Mac editors BBEdit

I use it in a couple of ways. The first is to see the structure of the code i.e. what can be called and what calls it. The second is to place the cursor on word, hit a hotkey and have all occurrences of the word displayed. Hit another hotkey and the entire file is displayed again.

So what you say. A grep or find all occurrences does this already. But the difference is that selective display shows the results in the same window. From a coder’s perspective, it looks as though all lines that don’t contain the word have been hidden and the ones that do remain visible. You can now use normal cursor navigation to get to the line you want. Once there you can edit or even make changes.

To try out selective display in Visual Slickedit, look at the View Menu and bring up the selective display dialog. To learn about folding in VIM take a look at the VIM online documentation.