ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Request: code editor (or extension) with synced second view with filtered lines?

<< < (2/5) > >>

Nod5:
I searched a bit for Sublime extensions but the closest thing I found was
sublime-filterlines, https://github.com/davidpeckham/sublime-filterlines (related SuperUser page).
But it seems to only work similarly to the VS Code extension Text Power Tools above.

Both either replaces the original text (with undo as the only way back, it seems) with the filtered lines or exports the filtered lines into a new document. The only way back from the replace alternative is undo, it seems. So not good for this three step sequence: filter lines, make a few quick manual changes, and expand all lines again. They also can't display the same document in two synced views (one filtered, one unfiltered).

Shades:
I distinctly remember using Notepad++ to apply a filter to a text file, for the purpose of hiding away 80% of it's content and doing manual changes on the content that still was shown. Also tried automated content changes, but these were applied to all the content, not just the content that was being shown.

There are quite a few options how to hide/reveal content from view using the 'TextFX Viz' functionality in Notepad++. It might not be your cup of tea, of course.

Well, this functionality is available in version 6.5.5 of Notepad++ as that appears to be the version I'm currently using.

* edit: added clarification

Nod5:
I distinctly remember using Notepad++ to apply a filter to a text file, for the purpose of hiding away 80% of it's content and doing manual changes on the content that still was shown.
-Shades (November 30, 2019, 06:04 AM)
--- End quote ---
Thanks. I see the "Hide Lines" (alt+H) command in Notepad++ menu View. But no "unhide" keyboard shortcut, though clicking the green hidden lines markers in the linenumber column works. Will try the TextFX Viz next.

I'm also tinkering on a small AutoHotkey test script with two views where one is filterable. The two only sync on save yet, I'll try sync as you type next.

Some thoughts from playing with it so far. To be most useful I think this kind of linefilter/accordion tool will need a few extra features:
- Linenumbers is a must
- shortcuts to unhide +1 lines line above or below current position (and +5, and +N)
- smart ways to toggle between edits in the filtered view affecting only visible lines vs all content. E.g. if line 2 is hidden and we select from line 1 to 3, should Delete also remove line 2? Or only 1 and 3?; Ditto find and replace.
- negative filter syntax (e.g. toggle all code comment lines off)
- filtering lines could be very handy together with multi caret editing. You want to rename a variable name everywhere in a long code document. First filter lines with the current variable name. Then hit shortcut to start multi caret editing at the start of the filter string on each visible line. Same end result as find and replace on the filtered view lines, but different visual response and easier to backtrack and adjust the new name while typing it.

anandcoral:
How about LogViewer http://www.uvviewsoft.com/logviewer/

Regards,

Anand

Nod5:
How about LogViewer http://www.uvviewsoft.com/logviewer/
-anandcoral (December 02, 2019, 06:14 AM)
--- End quote ---
I tried it. Interesting tool but not a match here because it seems to not hide lines, only hide/replace text on lines.

Screenshots from Notepad++ to illustrate roughly the kind of line hiding I'm after.

Before hiding


After hiding

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version