Slashdot Mirror


Visual Studio 2010 Forces Tab Indenting

An anonymous reader writes "For years, Microsoft has allowed Visual Studio users to define arbitrary tab widths, often to the dismay of those viewing the resultant code in other editors. With VS 2010, it appears that they have taken the next step of forcing tab width to be the same as the indent size in code. Two-space tabs anyone?"

8 of 390 comments (clear)

  1. Re:This is news at any level how? by Col.+Klink+(retired) · · Score: 3, Informative

    Did you read the blog post where they solicited feedback? It had 9 comments in total. Among them was this comment from the author of the blog (4th comment):

    I assure you we won't be changing that option [tab vs spaces] any time soon :-)

    So they solicited comments on a blog that no one reads and immediately say they aren't planning to change anything when questioned. After saying they wouldn't be changing the option, no one complained. Wow, what due diligence.

    --

    -- Don't Tase me, bro!

  2. Re:Why put tabs in code anyway? by weicco · · Score: 3, Informative

    I'm doubtful that giving an invisible character semantic meaning is wise

    (In the voice of dr. Farnsworth) Yes, yes. Let's all forget about those nasty invisible characters like \r \n and especially \0

    --
    You don't know what you don't know.
  3. Re:This is news at any level how? by cgenman · · Score: 5, Informative

    This tab thing makes Slashdot front page and the following didn't?

    Of course the tab thing made Slashdot front page. Some people here virtually LIVE in Visual Studio, and code indentation is a heavily entrenched basic function of coding that people get surprisingly fired up about. Even if this particular aspect of code indentation isn't going to effect people, it's just begging for a heated emacs level discussion.

    Your article, on the other hand, basically confirms that people like Windows 7 more than Vista, and that Windows 7 continues the well known and understood tradition of Windows outselling OSX by a factor of 10 to 1. These are things we already knew. Also, the article you site isn't even the source of the information, but refers to a much better Ars Technica article, which itself gets the data from Net Applications. I wonder if you didn't link the Ars Technica article directly because it claims that "Linux was the only operating system [in December] to show positive percentage growth in market share." Or maybe this one "When putting this into perspective across the whole year, though, we see that Windows was actually sliding steadily throughout 2009 (93.66 percent in January 2009), while both Mac OS (4.71 percent in January 2009) and Linux (0.90 percent in January 2009) have been gaining." Or maybe the fact that Windows XP continues to hold onto 2/3rds of the active Windows installbase.

    Also, it might be nice to point out that you're work at Microsoft in the Windows org as a development manger. It would boost your credibility as a poster, and reduce potential conflicts of interest.

  4. Re:Why put tabs in code anyway? by poopdeville · · Score: 3, Informative

    * The tab character itself has some semantic meaning - indent. The space is a word and symbol separator. Use an indentation character when you want to indicate indentation.

    No, it doesn't mean "indent". It means "tabulate". You shouldn't be using tab to indicate indentation. You should use tab align table columns -- i.e., to indicate tabulation.

    --
    After all, I am strangely colored.
  5. TABs are for TABles! by mangu · · Score: 4, Informative

    when I open the file my editor represents the tabs as width as two spaces, while my colleague uses a four-spaces-for-tabs setting as he prefer that way.

    And then comes another guy who uses three spaces to indent and your code is gone. Allowing each user to change arbitrarily the width of the TAB is a BAD idea.

    The original use of the TAB key was to ease the creation of tables in typewriters. There was a set of mechanical stops, one for each column, and you could set or reset each stop. Pressing the TAB key moved the carriage to the next stop. Some electronic terminals, like the VT-100 for instance, kept this convention, allowing one to set or reset the TAB stop for each column. In modern computers this is not really necessary, since editing tables is often done in spreadsheets.

    Setting the TAB width arbitrarily at fixed multiples of eight or any other number of columns really doesn't help much, since the indentation support of modern editors is much more powerful than that.

    The only use of the TAB key for me is moving to the next widget in the GUI.

  6. Re:Why put tabs in code anyway? by gazbo · · Score: 3, Informative

    But you wouldn't use tabs for that. You would use tabs to indent to the current level, and then spaces for formatting. In the example you showed where everything is at the top level, there would be no tabs at all.

  7. Re:This is news at any level how? by Waffle+Iron · · Score: 3, Informative

    0.90 to 1.02 isn't particularly impressive. 0.00 to 5.71 is.

    It's not all that impressive if you've already enlisted every single PC OEM as your personal towel boy.

  8. Re:Tabs suck. Use a space. by smellotron · · Score: 3, Informative
    Sorry, there's probably a better phrase for what I'm trying to describe, and /. is mangling my attempt at ASCII art. Replace these underscores with spaces and you'll see the effect I'm going for. When L (and most characters in a fixed-pitch font) is the leading character in a line, it is visually as far-to-the-left as possible. However, some other characters (|ijf) will be centered, giving the appearance of being shifted slightly to the right. If the only indentation is a single space, the distinction between "real" indentation and leading whitespace inside the character's region is fairly small.

    L
    _L
    __L
    ___L
    ____L
    ____L
    ____L
    ____L
    ____L
    __|

    If you use more spaces for an indent level, even a dead, beaten horse could easily identify the nesting level.

    L
    __L
    ____L
    ______L
    ________L
    ________L
    ________L
    ________L
    ________L
    ____|