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

Add on-type formatting support after hitting "return" on non-empty lines #32

Merged
merged 1 commit into from
Dec 22, 2023

Conversation

MahdiBM
Copy link
Collaborator

@MahdiBM MahdiBM commented Nov 12, 2023

Adds on-type formatting support after hitting "return" on non-empty lines.

This looks like this assuming you have the "editor.formatOnType": true:

Screen.Recording.2023-11-12.at.2.15.14.PM.mov

@vknabel
Copy link
Owner

vknabel commented Dec 9, 2023

Hi @MahdiBM, thanks for your contribution and sorry for the late response.
Code-wise this looks perfectly fine and like a great feature. But if I remember correctly, formatting the whole file and replacing all contents while typing might break the edit history. Will give it a try.

@MahdiBM
Copy link
Collaborator Author

MahdiBM commented Dec 9, 2023

Command+Z works fine if that's a sign. I haven't noticed anything buggy about it, but feel free to try it yourself as I might have not tried something that you're thinking of.

Copy link
Owner

@vknabel vknabel left a comment

Choose a reason for hiding this comment

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

Thanks a lot. This works great!

@vknabel vknabel merged commit 4e1e5d8 into vknabel:master Dec 22, 2023
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.

None yet

2 participants