collapse everything except <h1>
-
i’m writing a very long text in html.after a while it is difficult to find a part i’d like to edit. it would be nice to collapse all text except h1 titles. is there any way to do this?
-
Hello, @paweł-łabno and All,
Not totally sure that is the right solution for you ! But let’s give it a try ;-)). I simply suppose that all your titles lay in a single line. So :
-
Open one of your html files, in N++
-
Fold all the sections with the View > Fold All menu option or use the
Alt + 0shortcut ( NOT from the numeric keypad ! )
=> The text collapses and you should see the
<html>tag, only !-
Then, open the Find dialog Search > Find… menu option or use the
Ctrl + Fshortcut -
Type in the regex
(?-is)(?<=<h1>).*?(?=</h1>), in the Find what: zone -
Select the
Regular expressionsearch mode -
Click on the
Find All in Current Documentbutton
=> At once, the Find result windows pops up, at bottom of the screen, with all the
<h1>....</h1>titles !-
Now, simply double-click, in the Find result window, on one of these results. Immediately :
-
Your HTML file should expand the zone, containing the corresponding
<h1>....</h1>title ;-)) -
All the title, between the boundaries
<h1>and</h1>, is selected
-
Best Regards
guy038
-
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login