KTextEditor gets Scrollbar and Code Folding Preview (Updated)

The KTextEditor Framework just got a new features for the next KDE Frameworks 5.24 release: A Text Preview on the vertical scrollbar.

If enabled in the options, the KTextEditor now shows a preview of the text when the mouse hovers over the scrollbar. The feature is available both when the minimap is used and also when the standard scrollbar is used. The text preview is only visible when vertical scrolling is possible.

This feature is enabled by default, and is also automatically available in Kile and KDevelop, so we hope this is useful to you!

For developers, to ensure this feature is off, the ConfigInterface of the View can be used through the config key “scrollbar-preview” of type bool.

Kate Text PreviewAnd in addition to the preview in the scrollbar, it is now also possible to have a preview for folded code: Hovering over folded code pops up a preview of the hidden lines. When clicked, the code folding opens.

Kate Code Folding Preview

These features got added during the KDE Randa sprint, where around 40 KDE developers focus on improving KDE software and bringing KDE software to other platforms such as Windows and Mac OS. You can support us by donating through the following banner: 🙂

13 thoughts on “KTextEditor gets Scrollbar and Code Folding Preview (Updated)”

  1. When something goes into framework does that mean any and all apps based on that framework can also implement same features. Is that correct? Is Kwrite and Kate the only two editors based on KTextEditor Framework?

    1. Yes, all applications using KTextEditor will automatically get this feature. For instance: Kile, KDevelop, Kate, KWrite, RKWard, Cantor, maybe more…

    1. As said, will be available in next release, with KDE Frameworks 5.24 libraries. So it will take some time (at least a month) until it reaches distributions.

  2. Hi Dominik, my comment was meant as a reply to Filipe Saraiva.

    I.e. where/how can I find the highlighting of all occurrences of a searched text in the scroll-bar?

    cheers

  3. Dear Dominik,

    Thank you very much for this cool feature. This is really usefull.

    Unfortunately, current Scrollbar could not show CJK characters, for example Chinese characters. We can even see the Chinese characters in the Scrollbar preview, but not in the Scrollbar it self.

    If the Scrollbar could show Chinese characters as well as Latin characters, it will really helps a lot.

    Best regards,
    Mengjiao Lyu

Leave a Reply