An 'all' type feature would enhance productivity.
Submitted by Sunday, 19 June, 2022 - 09:47
on
Several other text editors I have used have an 'all' command which hides all lines that do not match a pattern. This does not rely on fold levels, so one can filter the edit view to show just the lines that contain e.g. a particular variable or phrase. For example, in Xedit the view might look something like this:
ELBERT NAMES A0 V 255 Trunc=255 Size=17 Line=8 Col=1 Alt=0
00000 * * * Top of File * * *
00001 :nick.O :Composer.Puccini:name.LaBoheme
00002 :addr.O1
00003
00004 :nick.C :Composer.Grieg:name.Peer Gynt Suites
00005 :addr.C1
00006
00007 :nick.C :Composer.Ravel:name.Piano Concerto in G Major
00008 :addr.C4
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7...
00009
00010 :nick.C :Composer.Offenbach:name.Les Bavards
00011 :addr.C3
00012
00013 :nick.O :Composer.Verdi:name.Aida
00014 :addr.O2
00015
00016 :nick.C :Composer.Mozart:name.Eine kleine Nachtmusik
00017 :addr.C2
====> all/nick.C/
X E D I T 1 File
before applying the all command; after applying it would look like this:
ELBERT NAMES A0 V 255 Trunc=255 Size=17 Line=4 Col=1 Alt=0
00000 * * * Top of File * * *
00001 -------------------- 3 line(s) not displayed --------------------
00004 :nick.C :Composer.Grieg:name.Peer Gynt Suites
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7...
00005 -------------------- 2 line(s) not displayed --------------------
00007 :nick.C :Composer.Ravel:name.Piano Concerto in G Major
00008 -------------------- 2 line(s) not displayed --------------------
00010 :nick.C :Composer.Offenbach:name.Les Bavards
00011 -------------------- 5 line(s) not displayed --------------------
00016 :nick.C :Composer.Mozart:name.Eine kleine Nachtmusik
00017 -------------------- 1 line(s) not displayed --------------------
00018 * * * End of File * * *
====>
X E D I T 1 File
Xedit allows the 'N line(s) not displayed' lines to be suppressed, so that the view would look something like this after using all:
ELBERT NAMES A0 V 255 Trunc=255 Size=17 Line=8 Col=1 Alt=0
00000 * * * Top of File * * *
00004 :nick.C :Composer.Grieg:name.Peer Gynt Suites
00007 :nick.C :Composer.Ravel:name.Piano Concerto in G Major
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7...
00010 :nick.C :Composer.Offenbach:name.Les Bavards
00016 :nick.C :Composer.Mozart:name.Eine kleine Nachtmusik
====>
X E D I T 1 File
My experience with jEdit is limited, but there appears to be no way to use the Fold methods to achieve this functionality.
Leslie
ELBERT NAMES A0 V 255 Trunc=255 Size=17 Line=8 Col=1 Alt=0
00000 * * * Top of File * * *
00001 :nick.O :Composer.Puccini:name.LaBoheme
00002 :addr.O1
00003
00004 :nick.C :Composer.Grieg:name.Peer Gynt Suites
00005 :addr.C1
00006
00007 :nick.C :Composer.Ravel:name.Piano Concerto in G Major
00008 :addr.C4
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7...
00009
00010 :nick.C :Composer.Offenbach:name.Les Bavards
00011 :addr.C3
00012
00013 :nick.O :Composer.Verdi:name.Aida
00014 :addr.O2
00015
00016 :nick.C :Composer.Mozart:name.Eine kleine Nachtmusik
00017 :addr.C2
====> all/nick.C/
X E D I T 1 File
before applying the all command; after applying it would look like this:
ELBERT NAMES A0 V 255 Trunc=255 Size=17 Line=4 Col=1 Alt=0
00000 * * * Top of File * * *
00001 -------------------- 3 line(s) not displayed --------------------
00004 :nick.C :Composer.Grieg:name.Peer Gynt Suites
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7...
00005 -------------------- 2 line(s) not displayed --------------------
00007 :nick.C :Composer.Ravel:name.Piano Concerto in G Major
00008 -------------------- 2 line(s) not displayed --------------------
00010 :nick.C :Composer.Offenbach:name.Les Bavards
00011 -------------------- 5 line(s) not displayed --------------------
00016 :nick.C :Composer.Mozart:name.Eine kleine Nachtmusik
00017 -------------------- 1 line(s) not displayed --------------------
00018 * * * End of File * * *
====>
X E D I T 1 File
Xedit allows the 'N line(s) not displayed' lines to be suppressed, so that the view would look something like this after using all:
ELBERT NAMES A0 V 255 Trunc=255 Size=17 Line=8 Col=1 Alt=0
00000 * * * Top of File * * *
00004 :nick.C :Composer.Grieg:name.Peer Gynt Suites
00007 :nick.C :Composer.Ravel:name.Piano Concerto in G Major
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7...
00010 :nick.C :Composer.Offenbach:name.Les Bavards
00016 :nick.C :Composer.Mozart:name.Eine kleine Nachtmusik
====>
X E D I T 1 File
My experience with jEdit is limited, but there appears to be no way to use the Fold methods to achieve this functionality.
Leslie