andreikop / enki

A text editor for programmers
http://enki-editor.org
GNU General Public License v2.0
161 stars 38 forks source link

Showing leading spaces or tabs in "tabs" and "spaces" mode respectively. #178

Closed vi closed 10 years ago

vi commented 10 years ago

Currently (Version 13.11.1; Uses Qutepart 1.3.0 (with binary parser)) I only see dots for spaces and dashes for tabs for trailing whitespace, unless I check "Show indentation".

I want a little bit milder "Show indentation" mode: if file mode is "Spaces", then only leading tabs are shown. If file mode is "Tabs", then only leading spaces are shown, i.e. I want to see "inappropriate" indentation.

andreikop commented 10 years ago

Hi, vi Nice to hear you again!

I would say, that spaces after tabs are appropriate indentation, if spaces are used after tabs and space count is less than tab width.

How should I configure inappropriate/all/trailing whiteshace display mode? (Which checkboxes shall be visible in the menu?)

vi commented 10 years ago

Maybe rename "Show trailing whitespaces" into "Show inappropriate whitespaces" with more detailed choice of what is appropriate in options?

andreikop commented 10 years ago

To make more detailed choice we need probably to move settings from main menu to settings dialog. But I'd like to leave it in main menu. I might display inappropriate indentation always, and leave menu as is. What do you think about it?

vi commented 10 years ago

There should definitely be a way to hide all whitespace. If all whitespace-related checkboxes in the menu are unchecked, none of whitespace should be displayed.

If you want to minimize the number of menu items (at expense of having modefun ones), you can do this: The main checkbox is "Show identation".

Of course "Show trailing whitespace" and "Hide OK whitespace" should not share the same underlying value in config.

Another approach is to have "whitespace display levels" - none -> minimal -> medium -> all, with exact meaning adjustable in config/settings/code. The accompanying config will be something like:

andreikop commented 10 years ago

Done. The UI is as simple as possible. Will see, if vi and other users will be happy with it.