Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make control characters configurable #280

Merged
merged 5 commits into from
Oct 19, 2022
Merged

Make control characters configurable #280

merged 5 commits into from
Oct 19, 2022

Conversation

danipen
Copy link
Collaborator

@danipen danipen commented Oct 19, 2022

This PR allows to configure the control chars displayed for spaces, tabs and EOL, via TextEditorOptions:

  • ShowSpaces: Default character is ·.
  • ShowTabs: Default character is .
  • ShowEndOfLine:
    • CRLF: Default character is .
    • CR: Default character is \r.
    • LF: Default character is \n.

Additionally, this PR displays the EOL chars with smaller font size, to make the EOL glyphs less conspicuous, they were too big.

Example: Setting the following configuration for the demo application:

   _textEditor.Options.ShowSpacesGlyph = "o";
   _textEditor.Options.ShowTabsGlyph = ">";
   _textEditor.Options.EndOfLineCRGlyph = "CR";
   _textEditor.Options.EndOfLineLFGlyph = "LF";
   _textEditor.Options.EndOfLineCRLFGlyph = "CRLF";

Displays the control characters in the following way:
customize-eol

This PR allows to configure the characters displayed for the following options:
- ShowSpaces: Default character is `·`.
- ShowTabs: Default character is `→ `.
- ShowEndOfLine:
    - CRLF: Default character is `¶`.
    - CR: Default character is ` \r`.
    - LF: Default character is ` \n`.
@danipen danipen requested a review from Gillibald October 19, 2022 11:21
@danipen danipen merged commit f118fbd into master Oct 19, 2022
@Takoooooo Takoooooo deleted the configurable-glyphs branch November 30, 2022 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants