Focussed areas
I was recently editing a JS script of about 1000 lines and I had to focus on about 8 related areas throughout the script, which although related fell in different areas. The issue is that you want to see them, and just them, all on the screen together, so you can sit back and take them all in as a whole, and do editing on them. Using bookmarks to jump between them doesn't work hugely well, so I copied them all to a separate JS file, worked on them, and copied them all back. This isn't the first time this need has arisen. It would be very handy if there were a feature where one could highlight multiple regions of lines and then toggle so just those are visible, rather akin to how code folding can already hide things, although in this instance symbolisation of hidden areas (if any symbolism) doesn't have to be the same. I had a look to see if any existing editor had this very useful ability but was unable to spot one. David
Can be implemented with SCI_SHOWLINES and SCI_HIDELINES:
https://www.scintilla.org/ScintillaDoc.html#SCI_SHOWLINES
SCI_SHOWLINES(line lineStart, line lineEnd)
SCI_HIDELINES(line lineStart, line lineEnd)
SC_ELEMENT_HIDDEN_LINE : colouralpha
SCI_GETLINEVISIBLE(line line) → bool
SCI_GETALLLINESVISIBLE → bool
I should add to this idea, that any new lines created whilst in this focussed view should naturally be added to the lines that are marked to be showing. I'm not sure how the show-lines is implemented internally, but if they are stored as ranges rather than a line list I imagine it would just mean extending an existing range if the new line is created on the edge of a range, or much more simply adding it as a one-line new range since the overall number of ranges is going to be limited in number, typically from anywhere between 2 and 10.