Is there any way I could use folding to do this:

1. Fold all lines in a file that contain only comments.

2. Optionally delete all the lines that have previously been folded.

I have a feeling I am looking for something less sophisticated than the
fold feature where I could remove all lines that contain a given pattern
- say, # or /* in col. 1, from a buffer and I am not sure folding is
the feature I should be looking at.

An example of possible use:

I would find this useful when trying to prune some configuration file
that has some ten lines of comments for every entry so that I can have
more or less the entire configuration file fit on one screen instead of fifteen 
or twenty.  

A more general definition of this need/problem might be to 'remove all lines
that match a certain pattern from the buffer - and optionally from the file
itself'.

Thanks.

cga

Reply via email to