Strictly speaking, jed uses only fixed column tabs whose size is
determined by the value of the TAB
variable. Setting the TAB
variable to 0 causes jed to not use tabs as whitespace and to display
tabs as CTRL-I. Please note that changing the tab settings on the
terminal will have no effect as far as jed is concerned. The
TAB
variable is local to each buffer allowing every buffer to have
its own tab setting. The variable TAB_DEFAULT
is the tab setting
that is given to all newly created buffers. The default value for this
variable is 8 which corresponds to eight column tabs.
jed is also able to ``simulate'' arbitrary tabs as well through the use
of user defined tab stops. Calling the function edit_tab_stops
allows the user to interactively set the tab stops. That is, one simply
presses ESC X to get the M-x
prompt and enters
edit_tab_stops
. A window will pop open displaying the current tab
settings. To add a tab stop, simply place a T in the appropriate
column. Use the space bar to remove a tab stop.
Here an argument is presented in favor of simulated tabs over real tab
stops. First, consider what a ``tab'' really is. A ``tab'' in a file is
nothing more than a character whose ASCII value is 9. For this reason,
one also denotes a tab as ^I
(CTRL-I). Unlike most other
ASCII characters, the effect of the tab character is device dependent and
is controlled through the device tab settings. Hence, a file which
displays one way on one device may look totally different on another
device if the tab settings do not correspond. For this reason, many people
avoid tabs altogether and others the adopt ``standard'' of eight column
tabs. Even though people always argue about what the correct tab settings
should be, it must be kept in mind that this is primarily a human issue
and not a machine issue.
On a device employing tab stops, a tab will cause the cursor to jump to the position of the next tab stop. Now consider the effect of changing the tab settings. Assume that in one part of a document, text was entered using the first setting and in another part, the second setting was used. When moving from the part of the document where the current tab setting is appropriate to the part where the other tab setting was used will cause the document to look unformatted unless the appropriate tab settings are restored. Wordprocessors store the tab settings in the file with the text so that the tabs may be dynamically changed to eliminate such unwanted behavior. However, text editors such as jed, vi, Emacs, EDT, EVE (TPU), etc, do not store this information in the file. jed avoids this problem by using simulated tabs. When using simulated tabs, tabs are not really used at all. Rather jed inserts the appropriate number of spaces to achieve the desired effect. This also has the advantage of one being able to cut and paste from the part of a document using one tab setting to another part with a different tab setting. This simple operation may lead to unwanted results on some wordprocessors as well as those text editors using real tab stops.