How to hide all lines with exactly 50 characters?
Let me explain that on a simple sample file with following content:
Code: Select all
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
0123456789012345678901234567890234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789x
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789
Open the regular Find dialog and enter as search string
^.{50}$, check the option
Regular expressions and select
Perl.
Current file must be selected for option
In. The check box options
Match whole word,
Match case Highlight all items found,
List lines containing string and
In column are all not checked.
But checked must be the option
Filter lines and selected next must be
Hide.
On running the find with clicking on button
Next all lines are hidden containing a matching string. In this case with this Perl regular expression string it means all lines are hidden having exactly 50 characters.
So the resulting display is:
--- Lines are hidden ---
0123456789012345678901234567890234567890123456789
01234567890123456789012345678901234567890123456789x
And there is the symbol
[+] left to each of those 3 lines indicating that multiple lines are folded to a single line.
The line number displayed in status bar or on left side if display of line numbers is enabled indicates where the too short and the too long line exist in the file, line 18 is too short and line 30 is too long.