andreikop / enki

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

Show "non-printing" characters #106

Closed vi closed 11 years ago

vi commented 11 years ago

Such as tabs and end-of-lines.

andreikop commented 11 years ago

Done

Check, if it works like you expected.

andreikop commented 11 years ago

Tabs and spaces are drawn, but EOLs are never. Any line ends with EOL, according to #63

vi commented 11 years ago

The main use case of displaying EOLs is making trailing whitespace visible. But I see trailing whitespace is already being handled, so EOL display is not very needed...

Note: when "Show whitespace" setting is "Any indentation", scrolling the source code is about twice as slow as in normal mode.

Also the leading blue "identation steps" lines gets hidden with "Any indentation".

One of use cases for this feature is to be able to see tabs vs spaces mixture in the file, so users probably want to turn on "Any indentation" mode for a short time, not for long. It can be in "View" menu, for example.

Alternatively, you can implement displaying of tabs as little gray dashes when indentation mode is "4 spaces" and displaying of 4 consecutive spaces as 4 little gray dots when indentation mode is "Tabs".

andreikop commented 11 years ago

Note: when "Show whitespace" setting is "Any indentation", scrolling the source code is about twice as slow as in normal mode.

I was drawing spaces as elipses. Now it is rectangles. Drawing might become quicker, but I'm not sure

Also the leading blue "identation steps" lines gets hidden with "Any indentation".

Yes, it both shown - space looks terrible. Too many items

One of use cases for this feature is to be able to see tabs vs spaces mixture in the file, so users probably want to turn on "Any indentation" mode for a short time, not for long. It can be in "View" menu, for example.

I removed settings page and added 2 checkboxes to the View menu. State is saved in the settings and restored after restart.