tab size

This is a discussion on tab size within the C++ Programming forums, part of the General Programming Boards category; Is there a way to reduce the default tab indentation for code posted on this board? Code that looks fine ...

  1. #1
    Registered User
    Join Date
    Feb 2003
    Posts
    595

    tab size

    Is there a way to reduce the default tab indentation for code posted on this board?

    Code that looks fine in msvc's editor gets HUGE here because the tab spacing is being doubled from 4 spaces to 8.

  2. #2
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640

    Re: tab size

    Originally posted by R.Stiltskin
    Code that looks fine in msvc's editor gets HUGE here because the tab spacing is being doubled from 4 spaces to 8.
    8 spaces is a standard tab. (as far as i know)

  3. #3
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Safest way is to not use tabs in your source, instead use spaces. I have my editor configured to output 4 spaces when I hit the tab key. That way, your code will look good no matter what
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  4. #4
    Registered User
    Join Date
    Mar 2003
    Posts
    73
    I like just using 2 spaces to indent. You don't need to use the tab key or deal with any problems with that in general and it's not a hassel to hit the space bar twice.

  5. #5
    Registered User
    Join Date
    Jan 2003
    Posts
    648
    My tab size is 3. Using spaces is a hassle because when indenting, shift-tab, tab doesn't work for spaces

  6. #6
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    my tab is equivalent to three spaces, but is a tab character... i didn't know you could change that option... i'll be looking for that later...
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  7. #7
    Open to suggestions Brighteyes's Avatar
    Join Date
    Mar 2003
    Posts
    204
    In MS Visual Studio, go to Tools...Options...Tabs. Set it up however you like from there.
    p.s. What the alphabet would look like without q and r.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Heapsort
    By xENGINEERx in forum C Programming
    Replies: 2
    Last Post: 03-30-2008, 07:17 PM
  2. Generic heapsort
    By Sephiroth1109 in forum C Programming
    Replies: 15
    Last Post: 12-07-2007, 05:14 PM
  3. Tab order in Tab Control
    By Halloko in forum Windows Programming
    Replies: 2
    Last Post: 05-08-2005, 11:08 PM
  4. Visual C++
    By Golffor1 in forum C++ Programming
    Replies: 1
    Last Post: 08-04-2003, 04:30 PM
  5. Using Tab control to change between dialogs
    By Eado in forum Windows Programming
    Replies: 2
    Last Post: 05-15-2002, 03:43 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21