Skip to content

Implement Tab Width #172

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

Merged
merged 2 commits into from
Apr 4, 2023
Merged

Conversation

thecoolwinter
Copy link
Collaborator

Description

This PR adds the tab stops implementation. It was previously thought to not function as expected but after comparing to other editors this is the correct implementation. Adding tab stops makes it so tabs stop at intervals along the document, so a tab will not act like a space but rather a break in the line until the next tab stop. Like so:

Raw:   |\t1\t2\t3
Visual:|----1---2---3

Raw:   |\tabc\t2\t3
Visual:|----abc-2---3

Related Issues

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

Screenshots

Screen recording shows the width being updated in real time using a placeholder preference, as well as editing a line with tabs showing the tab stops go backwards only when needed.

Screen.Recording.2023-04-04.at.12.27.22.PM.mov

Copy link
Contributor

@matthijseikelenboom matthijseikelenboom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice stuff!

@austincondiff
Copy link
Collaborator

Really awesome dude, nice work! I am surprised at how little was required to get this to work.

@austincondiff austincondiff self-requested a review April 4, 2023 17:47
@austincondiff austincondiff merged commit ace0f2c into CodeEditApp:main Apr 4, 2023
@thecoolwinter thecoolwinter deleted the tab-width branch April 4, 2023 17:51
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.

🐞 Respect Users Tab Width setting
3 participants