PreviousNextTracker indexSee it online !

(160/207) 3074519 - Hide text regions in the buffer from the text area

Allow a configurable engine for hiding selected regions of text from the text area.
For example: In C/C++, hide parts of the buffer that are excluded from the current build configuration (e.g. using #ifdef ...).

This can be extended to different syntax highlight styles for different regions of text. For example, MS Developer Studio shows the text in the above example in gray, while the rest of the text is syntax highlighted. Another example: Mylyn (an eclipse plugin) colors text according to the frequency of visiting it. A function that was never visited (by browsing through the source code) is hidden; frequently visited text is colored "darker" than rarely visited text.

Submitted shlomy - 2010-09-24 - 03:29:42z Assigned nobody
Priority 5 Category core
Status Open Group None
Resolution None Visibility No


2010-09-24 - 03:31:40z
In addition, when some buffer text is hidden from the text area, the folding should apply only to the visible lines - as if the hidden text is not part of the buffer. That is, the folding should be applied on the result of the filtering.
2010-09-25 - 12:29:37z
Sounds like an ambitious plan. Two notes:

1. One way to filter lines could be "simply" to use a hyper search result.
2. It would be perfect if operations like search&replace or column cursor editing could ignore the hidden lines.
2010-09-26 - 07:18:02z
An ambitious plan, yes. But I think it's a very useful feature.
1. How would you use hypersearch results for filtering? The filtering may, for example, include all the text between a "#if" and its "#end".
2. I don't think so, but I think that the filtering should be easily turned off (or modified to select another criteria for filtering) using the UI.

One thing missing here is how to apply the filter during editing. It seems like me like this should use a mechanism similar to the syntax highlighting.

2010-09-26 - 11:43:54z
Some time ago a user asked for a feature which is found in "The Hessling Editor" ( ). It lets You hide all lines that don't match a criteria (i.e. a search text) and then lets You edit only the displayed lines.

So I thought, that using the line numbers of hyper search results could be one way of filtering for Your "configurable engine". But if this hasn't been Your intent, I won't ask for this feature.