-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Additional ways to format #21
Comments
The only one I have reservations about is the automatic formatting. Otherwise, I like this idea a lot! I also think it would be nice to add a feature where, if text is selected, it will only format that text. |
Out of curiosity, what don't you like about it? How would you feel about adding it with a toggle that's off by default?
As far as I'm aware Prettier requires formatted text to be valid as an entire file, so this would mean that only some selections could be formatted properly. Personally I think it's easier to only allow formatting entire inputs, since it's closer to Prettier's built in functionality. Otherwise we would have to explain to the user why selections are invalid and implement extra error handling. |
Having a toggle sounds good! I don't think it's a good idea to modify text as users are typing, since characters can move and make it really unwieldy.
That's right. What I like about this functionality is that blocks of code that aren't in markdown can be formatted. That being said, I don't think this should be a high priority feature. |
These are some ideas based on what I think is useful though I'm not sure we'd want all of them:
Ctrl + Shift + F
)Note: These could make #20 easier to implement as we wouldn't have to worry about placing a button in an unknown UI, which could break stuff or look ugly.
The text was updated successfully, but these errors were encountered: