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

Format document on Save is missing both from VS 2022 and PPT22 #251

Open
Krusty93 opened this issue Sep 23, 2021 · 3 comments
Open

Format document on Save is missing both from VS 2022 and PPT22 #251

Krusty93 opened this issue Sep 23, 2021 · 3 comments

Comments

@Krusty93
Copy link

Krusty93 commented Sep 23, 2021

It looks like two of the most used PPT features have been removed from VS 2022.

They're the following ones (VS 19):
image

The 'Remove and sort using' has already been integrated into VS19, meanwhile the "Format document on Save" is missing.
I think this feature is really important because it makes it easier to resolve all the formatting issues in an entire document with a simple shortcut. Moreover, you don't need to manually run the 'Code Clean Up' feature using CTRL K + CTRL E (or whatever, depending on personal settings).

Would it be possible to restore it? The same request was opened in VS 22 user voice by another user

@Krusty93 Krusty93 changed the title Format document on Save is missing from VS 2022 Format document on Save is missing both from VS 2022 and PPT22 Sep 23, 2021
@std66
Copy link

std66 commented Nov 10, 2021

I'm also missing these features on save. I'm so used to it that it costs me additional steps:
CTRL+S
[oh, I forgot...]
CTRL+K, E
CTRL+S again

@Caedendi
Copy link

Caedendi commented Nov 17, 2021

same, this is one of my most-used features

edit: looks like they now officially recommend the Code Cleanup On Save extension for this feature: https://docs.microsoft.com/en-us/visualstudio/ide/code-styles-and-code-cleanup?view=vs-2022. See bottom of the page before "See also".

Found a workaround for the Remove and Sort Usings on save. Seems you can't add Sort usings and Remove unnecessary usings. Saving will automatically remove them. This however isn't the case for the other options.

  • Go to Analyze -> Code Cleanup -> Configure Code Cleanup
  • Select Profile 1 (default)
  • Remove all included fixers
  • Press OK
  • Open Configure Code Cleanup again
  • Add all fixers you want (sort usings/imports, remove usings/imports, format document, apply file header preferences, etc).
  • Press OK
  • Open Configure Code Cleanup again
  • All added fixers are saved, except for the 2 usings fixers.
  • Press OK
  • Add an unused using on an unsorted line
  • Press ctrl+s
  • Unused using is now removed and usings are sorted

@mmarinchenko
Copy link

There is also Format document on Save extension by @mynkow.

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

4 participants