Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#36 filtered - selective Line Editing

v5.2
open
nobody
core (195)
5
2013-12-09
2006-08-15
No

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

Discussion

  • Alan Ezust
    Alan Ezust
    2011-11-30

    • summary: Selective Line Editing --> filtered - selective Line Editing
     
  • 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.