Bug 453175 - Toolbar button/menu item to "Show whitespace"
Summary: Toolbar button/menu item to "Show whitespace"
Status: REPORTED
Alias: None
Product: kate
Classification: Applications
Component: application (show other bugs)
Version: unspecified
Platform: Other Microsoft Windows
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-29 07:48 UTC by Dariusz Tereszkiewicz
Modified: 2022-05-03 15:16 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dariusz Tereszkiewicz 2022-04-29 07:48:24 UTC
The Kate editor lacks the basic features that other editors have.
There is no "show whitespace" button and option, e.g. tabs, newlines, spaces etc.
This is a very important functionality, useful when editing text files for different systems, sometimes it is worth knowing what characters contain a text file in addition to the text itself.

Ideally, it should be a button on the top bar of buttons (of course to choose from).

KATE 22.07.70
Windows 10
KDE 5.93
Qt 5.15.2
Comment 1 Eric Armbruster 2022-04-30 10:38:40 UTC
View->Show Non Printable Spaces shows Tabs and Spaces.
Comment 2 Dariusz Tereszkiewicz 2022-04-30 11:25:47 UTC
Eric,
thank you for your answer.
It is actually possible to set the "whitespace" view with the appropriate options.
However, I mean the possibility of adding a button "show all whitespace", including tabs, end of line, etc.
Comment 3 Eric Armbruster 2022-04-30 14:53:40 UTC
I hope I got this correctly now: you would like to have a button for the existing action (show non printable spaces), instead of having to select it from the menu? If so:

1. Right-click menu bar -> select main tool bar
2. Right-click tool bar -> Configure Toolbars
3. In Toolbar select Main toolbar Katepartview
4. Choose Show non printable spaces (and maybe an icon) and save

I know this does not fully solve your problem, as you are asking for separate buttons for the different whitespace characters and probably would like to have the buttons on the toolbar by default. 

However, I currently feel that would not be a great decision:
- I think most users do not need to frequently change this setting
- One action is sufficient for most users
- We would need to find or create a proper icon for this action, so the toolbar does not look so weird with the long text

On another note, newlines are always visualized to my understanding by, well ehm, new lines.
Comment 4 Dariusz Tereszkiewicz 2022-04-30 19:34:34 UTC
I mean one button that would show or hide all types of whitespace in a text file.
Such a button is available, for example, in the Notepadqq editor and LibreOffice Writer.
Of course, it could be an extra button that I add manually to the toolbar and to which I manually add an icon.
Comment 5 Christoph Cullmann 2022-04-30 21:08:22 UTC
In the settings there is the option to show some white space indicator. That would I assume cover this.

There is no explicit button to enable that in the menu.

Not that sure if that really is an often changed feature to put there.
Comment 6 Eric Armbruster 2022-04-30 22:19:36 UTC
> In the settings there is the option to show some white space indicator. That would I assume cover this.

This is not sufficient, I think. I just checked on Windows what Notepad++ actually does. It has different visualizations for all white space characters.
e.g. tabs are visualized as -> and spaces as a dot (as is currently) and even \r\n is visualized differently.

https://metadataconsulting.blogspot.com/2019/06/Notepad-Control-Characters-Explained.html