I suggest you ...

Store per-project source formatting settings with project properties

I wish it were possible to define per-project editor settings that affect formatting and writing style: tab size, use tabs/spaces, autoindent and so on.

Because, different solutions (or even projects in one solution) can have different coding styles or conventions.

Having to poke in several tabs of environment settings every time as I switch projects is a major annoyance.

Actually the formatting settings are not private user preferences; they are part of a project and should be stored in source sontrol, so that the next person that takes on the code automatically gets the proper settings.

121 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    p.a.p.a. shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →
    TomTom shared a merged idea: Add Solution wide settings  ·   · 

    12 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • p.a.p.a. commented  ·   ·  Flag as inappropriate

        Yes, EditorConfig is what is needed... at least, very close to it!
        p.a.

      • Olaf van der SpekOlaf van der Spek commented  ·   ·  Flag as inappropriate

        I vote for auto-detection too. What if a file is edited that's not part of an opened project/solution?
        Settings to trim trailing whitespace and for encoding and end of line style would be nice too.

      • Ian William James HallidayIan William James Halliday commented  ·   ·  Flag as inappropriate

        There should be settings at each level of granularity, projects, solutions, user (dropbox!). Each overrides the next.

        E.g. I have my typical settings that I prefer, but I open some OSS solution with different settings, so it overrides my settings. Further within this solution one particular project is inconsistent with the rest, so it has its own settings which override the solution's settings.

      • romrom commented  ·   ·  Flag as inappropriate

        I've always found it silly that VS treats formatting settings as a user preference, when clearly it's a per-project preference.

      • saulsaul commented  ·   ·  Flag as inappropriate

        Eclipse does this, so VS can too. Or even should. -

      • QwertieQwertie commented  ·   ·  Flag as inappropriate

        Another idea is an option to let the editor auto-select between tabs and spaces when opening an existing file (based on whether the file already uses mainly tabs or space indents).

      • Justin ChaseJustin Chase commented  ·   ·  Flag as inappropriate

        I think this is very important for open source developers. When you work on more than one project at any given time and your coding styles are very different this becomes a serious pain point in VS. It would be nice if you could have, by convention, a .vssettings file sitting in the same folder as a .csproj and have it pick up those settings when editing code in that project.

      • Mark HMark H commented  ·   ·  Flag as inappropriate

        I really would like this feature too. At present we're prevented from using any tools which perform auto-formatting because they just make our diffs look like garbage.

        I think this should also be exteneded to more than just formatting settings - but also per project/solution/configuration settings for debugging, source control and other things. Many settings are project specific rather than user specific, and should be treated in such a way.

        Perhaps they should exist as user settings too, but they should be overridden by solution settings, and solution settings be overridden by project settings etc.

      Feedback and Knowledge Base