Defining tab stops

The tab stops are defined with the command:

    t [ColumnNumber] [Number*ColumnIncrement] ....
If a column number is specified, a tab stop is placed at that position. In the second argument an entry n*i generates n tab stops each i columns to the right of the previously defined stop. There may be any number of the above parameters in any order as long as the column numbers of the tab stops that are generated are in ascending order. A tab stop that has a column number that is to the left of its predecessor is ignored. The buffers allow for 100 tab positions. Any additional tab positions will be ignored. This would be very rare as there are only 255 character positions on one line. Any tab stop beyond column 255 is irrelevant and will be ignored. It is also impossible to put a tab stop in column 0. If a tab stop is put at position 0, all tab stops after it are ignored.



Examples:

    t 100*8
This is the default tab setting on most computers. Actually many computers and/or compilers can become very confused if you use any other tab setting. Note that only 255/8 = 33 tabs are relevant. We could of course also have used 33*8 to get the same effect but the 100 or any other big number avoids having to do arithmetic. This mode is often used in assembler programs.
    t 100*4
Often used in C.
    t 7 10*4 73
A good setting for Fortran. Alas many Fortran compilers get confused by it and move parts of the code beyond column 72 if there are too many tabs. The UNIX fortran compilers have no problem with it.



Warning: There are many compilers and assemblers that don't know what to do with tabs. Some assemblers will not even allow tabs. Other compilers may interpret them as being at the fixed positions 8,16,24,32,... so that the next character is taken at the positions 9,17,25,33,..., even if this is very unnatural for the language involved. Some experimenting should show the tab sensitivity of the compilers involved. If a compiler/assembler will not accept any tabs, they can be removed during the writing of the text to file with the use of the printer mode for the write command (p. [*]).

The tab positions defined in the above way hold only for the current buffer. If you like to set the tabs for all buffers simultaneously you should put the character g after the t (indicates global). The tab positions can be stored in the default file with the DW command. This way they may be used in a future editor session.