0

Is it possible to show a Table of Content (TOC) in Kate for text documents such as txt files or files without filetype?

Maybe it's possible with some setting that I haven't found or with some plugin (maybe there's a plugin for it that isn't available in the options you can select under Settings->Configure Kate). If so, please describe how one can enable a TOC.

It would be useful to organize notes, todos and other texts into separate sections. Clicking on a section in the TOC would make you jump to it.

The text has the syntax "Normal" (this should work with default settings when simply opening a txt file and not require you to select the Markdown syntax for example). For example, if you then write "####This is is a header" somewhere in the txt document, it would display just like all the other text in the file (no color-highlighting or necessarily headers that have a larger font-size) but still make this show up as a section in the TOC which is shown in the panel on the left beneath (not instead) the "Documents" tab if you have that view open there.

I created an issue requesting this feature here but haven't received a reply yet and it may already be possible with some plugin/option/separate tool/Kate-fork/workaround.

I have Kate v20.12.2 in Debian11/KDE.

mYnDstrEAm
  • 4,008
  • 13
  • 49
  • 108
  • 1
    There is no standard for how to define chapters etc in plain text without markup. Instead of introducing your own definition better use an existing markup language or use a rich text editor like LibreOffice Writer. – Philippos May 10 '22 at 14:32
  • Should have clarified this here too (it's in the linked issue): the syntax would be easily configurable by the user, there is no other markup-syntax used here at all...only TOC-headers (default could be something like ####). LibreOffice is inappropriate for notes and similar txt files. Markdown as language does all kinds of color-highlighting in the txt file, you first need to switch to it to enable the TOC and the txt file may not be written in Markdown; this really is just for the TOC. Good point though. – mYnDstrEAm May 10 '22 at 14:43
  • 1
    Do you know of any plain text editor with this feature for comparison? – Philippos May 10 '22 at 14:48
  • For taking notes `Knotes` is the preferred KDE tool. For your purpose, maybe an outliner like `KJots` is the right tool. – Philippos May 10 '22 at 15:16
  • It's relevant but this question is about Kate, not software recommendations. `Knotes` is for sticky-notes not other notes-taking and `KJots` doesn't work in Debian11 ("The Akonadi personal information management service is not operational") but I will check if it features TOCs. – mYnDstrEAm May 10 '22 at 15:25
  • Create a bug report for Kjots [here](https://bugs.kde.org/show_bug.cgi?id=453631). And the issue about TOCs in Kate was a duplicate, progress can be tracked in the issue linked there. A good alternative that features TOCs (but currently only for markdown) is `QOwnNotes`. – mYnDstrEAm May 23 '22 at 10:48

0 Answers0