Contents of Article


Tabs

Column markers

Defining tabs and column markers

Treatment of undefined codes on TABS and MARK lines

Affect of tab positions on the COLS line

Using the + code to define virtual tabs

Using the < and > codes for column markers


Introduction



Tabs and column markers are aids to help you position text horizontally when data position is important or desirable. This may be for language syntax indenting, for standard positioning of comments, or for any other reason where fixed column positions for data is desirable.


Tabs


Tabs are markers indicating the horizontal positions to which the TAB key will successively position the cursor on a line. This enables you to quickly and accurately move the cursor to predefined column locations.


Column markers


Column markers are faint vertical lines visible on the screen at specified columns. They have no effect on Tabs or the use of the TAB key; the two are independent of each other. They are intended to provide visual guidance only. However, a tab column is typically aligned at a column marker because it's usually convenient to combine them that way. Most users having many tab stops will only have a few column marker lines defined, but they probably would place those column markers where tab columns are defined.


Defining tabs and column markers


The methods for defining these two items are similar.


To define Tabs or Column Markers, first obtain a visible copy of the definition line as follows:  


Type TABS or MARK on any Line command area, a Definition line will be inserted.


         000010 Data text here

         =TABS>      *    *

         000011 More Data text here  

or

         000010 Data text here

         =MARK>        *       *

         000011 More Data text here  


will appear.


Enter an * asterisk character at each position you wish to be a Tab Stop or Column Marker. To ensure you have the correct column, you may wish to insert a COLS line for reference, or the Status line displays the column number.


Note that SPFLite will remember the Tabs and Mark lines and associate them with the type of file being edited. The next time this file type is edited, the Tabs and Mark lines will be re-established when the file is loaded into the editor. This will enable you to have different 'favorite' tabs definitions for each type of file you edit. 


The editor can also be told to temporarily ignore the tabs line without altering its definition by issuing the primary command TABS OFF; normal tab operation can be resumed later with a TABS ON command. 


Similarly, the MARK OFF Primary command can be used to temporarily suppress the display of the MARK lines without actually modifying the MARK line itself. Display of the MARK lines can be resumed with a MARK ON command.


The color used to draw the Column Marker line may be specified in the Options - Screen settings.


Treatment of undefined codes on TABS and MARK lines


The TABS line uses code * and + to define tab positions, and the MARK line uses * < and > to define column markers. Any nonblank characters on these lines, other than the defined codes, are ignored and treated as comments.


Affect of tab positions on the COLS line


When TAB positions are set, either by the * code for standard tab positions or by the + code for virtual tab positions, the COLS line will show underscores for every effective tab location, such as this:


=COLS>  ----+----1----+----2----+----3----+----4---



Using the + code to define virtual tabs


If you need to define tabs for repetitive column positions, you do not have to manually enter every single tab stop. For example, if you wanted tab stops in columns 1 and 10, and every 5 columns starting in column 16, entering the repetitive stops for a file with very long lines would be a lot of work.


=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+

=TABS> *        *     *    *    *    *    *    *    *    *    *    *    *


SPFLite supports defining virtual tab stops using a + code instead of an * code. Virtual tab stops work as follows:


    • The + code must be the last code on the =TABS> line
    • There may be at most one + code
    • The + code must be preceded on the left by at least one * code


When a =TABS> line is defined in this way, the distance in columns between the + code and the last * code defines a virtual tab step, which is the number of columns between each subsequent virtual tab stop.


Let us define the tabs above using the virtual tab code +. The + code will code in column 21, and the * code in column 1, 10 and 16. Because the distance between column 21 (where the + code is located) and column 16 (where the last * code is located) is 5, the virtual tab step is 5, and so the repeating virtual tab stops will appear every 5 columns, starting at column 21. The =TABS> line now looks like this:


=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+

=TABS> *        *     *    +


Now, no matter how far to the right you may scroll, there will always be a tab stop at every 5 columns, whether that be at column 101 or 1006. 


Using the < and > codes for column markers


SPFLite also supports two alternate codes of < and >.


When a < code is used on the MARK line, the faint vertical line appears to the left of the < sign, like this:    |<

When a > code is used on the MARK line, the faint vertical line appears to the right of the > sign, like this:  >|


It may be seen that the < and > codes “point” to the side of the column where the column marker line is to appear, and thus are easy to remember. 


It is legal to have > and < next to each other as in >< on the same MARK line, and you will see this:  >|<


The * code from prior versions of SPFLite remains available, and works the same as the < code.


Here is a sample of how these lines actually appear. Note that the MARK lines were made somewhat dark on this sample screen to be sure they were visible in this Help document. In practice, it is helpful to make these very faint so you can just barely see them; that way they can act as a guide but not be a distraction. The exact color for the MARK lines is set in the Screen tab of Global Options under Column Marker Line. As can be seen, the Mark lines appear on actual data text lines, not on special lines such as the =TABS> and =MARK> lines themselves.


Created with the Personal Edition of HelpNDoc: Enhance Your Documentation with HelpNDoc's Advanced Project Analyzer