Coder Social home page Coder Social logo

Comments (3)

mmarinchenko avatar mmarinchenko commented on May 27, 2024 4

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

from vs-ppt.

std66 avatar std66 commented on May 27, 2024 2

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

from vs-ppt.

Caedendi avatar Caedendi commented on May 27, 2024 2

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

from vs-ppt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.