PreviousNextTracker indexSee it online !

(12/207) 1540879 - filtered - selective Line Editing


I wanted to submit this feature request earlier posted
by Pierre M├ętras at

I found this feature very useful in SlickEdit.
Interface can be just opening a "search" dialog box
with text feild to enter a regular expression filter.
In his example below you would just enter without
quotes "blue|product".

I hope you will give it some consideration. Thanks.

"This is one of KEDIT's most popular features. The
selective editing facility lets you focus on a subset
of the lines in a file, such as all lines containing a
particular string. You can have KEDIT display only this
subset of your file, and you can perform editing
operations that affect only this subset. You can then
return to viewing and working with the entire file,
with the lines in the selected subset (as modified by
your editing) remaining in their original position in
the file. "

For instance, you have a file that contains a list of
products, with their manufacturer, color and material
(that's a flat database, to make the example easier,
but such cases happen in source code too). You want to
change the manufacturer's name of the blue products, if
they are not in plastic, and all products if they are
in leather..

With KEDIT, the operations are:
- "all /blue" This displays only the blue
products and folds the other lines.
- "less/plastic" Removes the plastic products from
the display - "more/leather" Add the leater products to
the display (unfold the "leather" lines that were
folded" Then you work in the resulting display and do a
serach/replace only on the visible lines. And "all" to
restore the full view.

No need for regular expressions here: what you see is
what you edit.

Imagine folding and bookmarks combined. You can place
(or remove) bookmarks on certain lines that match a
criteria you give. Then you are able to fold
the edit buffer on all the lines that don't have a
bookmark. And then, you can apply operations (search,
replace, Uppercase, macros...) only on the visible
lines (in other words, you apply an operation on lines
with a bookmark).
Please comment as I haven't the courage to try version
3.1 as my 3.0 final works well (now) with my usual

Submitted vpesochi - 2006-08-15 - 19:31:55z Assigned nobody
Priority 5 Category core
Status Open Group v4.3
Resolution None Visibility No


2006-08-15 - 19:35:36z
Logged In: YES

This feature is somewhat similar to the last request in
2011-11-30 - 17:49:55z
In editor I used before it was in search toolbar. There was an option "fold lines". Yes, I was using it sometimes. Where to locate it in jedit, maybe in hypersearch results pane.