PreviousNextTracker indexSee it online !

(11/212) 36 - filtered - selective Line Editing

Hi\!

I wanted to submit this feature request earlier posted
by Pierre Métras at
http://marc.theaimsgroup.com/?l=jedit-users&m=98960814101033&w=2

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
puggins..."

Submitted vpesochi - 2006-08-15 19:31:55 Assigned
Priority 5 Labels core
Status open Group v5.2
Resolution None

Comments

2006-08-15 19:35:36
vpesochi

Logged In: YES
user_id=1576437

This feature is somewhat similar to the last request in
http://sourceforge.net/tracker/index.php?func=detail&aid=1535445&group_id=588&atid=350588

2011-11-30 05:29:49
ezust

- **summary**: Selective Line Editing --> filtered - selective Line Editing

2011-11-30 17:49:55
jarekczek

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.