On Thu, 12 Nov 1998, Leon Breedt wrote:

-is it better to indent my source using real (\t) tabs, or should i configure
-my editor to expand tabs into spaces?  i can't decide which is best :)

use tabs because when deleting the tab character (i.e you press tab in the
middle of a line by accident) the gap disappears in one, you don't have to
bash backspace 4 times.
use spaces if you are going to edit/read the file in different editors with
different tab settings, it'll ensure that the file looks the same

-and secondly, what tab stop length is recommended? 2/4/8?

2 is too small, 4 is just right, 8 is too big:

set tabstop=2:

int foo()
{
  printf ("Some stuff here\n");
  for (banana = 0; banana < cherry; banana++)
  {
    printf ("more stuff");
  }
}

tabstop=4:

int foo()
{
    printf ("hello\n");
    for (stuff...)
    {
        hello;
    }
}

and tabstop = 8;

int foo()
{
        printf ("this eats up too much space");
                printf ("go any more than about");
                        printf ("this number of levels and it gets hard to \
                                fit text on one line without wrapping it");
}

-- 
+++ Divide By Cucumber Error, Please Re-Install Universe And Reboot +++
[EMAIL PROTECTED]      [Website undergoing re-design...]l.org

Reply via email to