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

show indentation in code editor #417

Open
typemytype opened this issue Jan 8, 2021 · 0 comments
Open

show indentation in code editor #417

typemytype opened this issue Jan 8, 2021 · 0 comments

Comments

@typemytype
Copy link
Owner

from @djrrb:

In teaching classes/workshops, I have found that indentation tends to be a challenge for folks who are new to Python. Since the Drawbot editor is intended to help beginners, I think an editor preference to show tabs might be very helpful...if it’s not too difficult to add!

There are a few ways to visualize this: greyed-out middots for each space, vertical lines, etc.

Talking to @robstenson about this topic, he suggested the Indent Rainbow VSCode extension, which clearly but subtly color codes tabs to help students easily identify the indentation level of a code block. (He also showed me Rainbow Brackets as well, which is pretty cool.)

If this should be a github issue, let me know, but I figured I would start here because I prefer typing my feature requests in DBRegular! 😎

Thank you!

see https://forum.drawbot.com/topic/286/show-tabs-in-editor

todo:

Create a custom NSLayoutManager for the code editor and overwrite drawGlyphsForGlyphRange_atPoint_ and draw something like a rainbow or dots or ...

also see https://github.com/coteditor/CotEditor/blob/89afb53f207309bfee2b1070ada3f258e1e0d6ef/CotEditor/Sources/LayoutManager.swift#L312

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

No branches or pull requests

1 participant