QOwnNotes
QOwnNotes copied to clipboard
"Fold" functions for chapter headers (show/hide chapter contents)
Suggesting a "fold" function for chapter headers (#
, ##
, etc.) Display a "-" icon in front of each such header. When the user clicks the "-", the chapter contents (everything up to the next header with fewer or the same number of #
characters) is hidden ("fold"), and the "-" icon changes to a "+" icon. When the user clicks the "+" icon, the chapter contents is revealed ("unfold").
Provide "show/hide all" toolbar buttons to fold/unfold all chapters in the current document.
Thank you for your suggestion. Are you speaking of the editor or the preview?
But ether way it would be a huge amount of work. 😁
I mean the editor (didn't know there's a preview) but both would be nice.
That would mean implementing the feature in QTextBrowser and QPainTextEdit, which I doubt will ever happen.
Any chance to do it via a plug-in?
No, the renderers need to be rewritten.
I landed here because I wanted to make the same request.
The text (and source code) editor part of the Qt Creator IDE supports this "fold" function (and it do not depends on KDE). Maybe that can be used instead of the QPainTextEdit. (Qt Creator is licensed under GPLv3, I am not sure about QOwnNotes is GPLv2 only or v2-or-later, they may be incompatible.)
Thank you for your suggestion, but QPainTextEdit is very fast for large plain text files and uses little resources.
Opening a file sized ~500 KiB with ~10000 lines increased the used memory by 21 MiB in QOwnNotes, about 25 MiB in QtCreator and 27 MiB in Kate, editing / scrolling were smooth in all of them (on my 8-10 years old PC). Of course this not a proper measurement / test setup, but it could indicate that these programs / solutions may not consume significantly more resources than the simple QPainTextEdit.