Tabs; How to change the tab width ??
There are two variables that change the width of the tab $tabwidth(5) and $tabsize(5) they control the size of a displayed tab character (number of spaces) and the simulated tab character size, where the user entered tab character is replaced by a number of space characters. The latter is only used when tab(2m) mode is enabled (it is typically enabled by default).
To change the tab character width then the set-variable(2) command is used:
esc x set-variable
You will then be prompted for the remaining arguments. <TAB> is the completion so:-
esc x set-v<TAB> $tabw<TAB> 2
If this is the setting that you always want to use then it is easier if you put this in your <user.emf> as:-
set-variable $tabwidth 2
then whenever you start a new session you will always have the $tabwidth defined as you want it.
We would recommend that $tabwidth(5) is not modified because it turns the all tab's to 2 so when you read it into something like Microsoft notepad the indentation is not as you like it because it displays tabs as 8 characters.
Instead, set the $tabsize to 2, and run with tab(2m) enabled (this is the default). This turns <TAB>'s to spaces, hence the layout is retained. This makes the file slightly larger, but the presentation is maintained.
If you are reading in a file with TAB's embedded then you can convert all of the <TAB>'s to spaces using tabs-to-spaces(3):
esc x tabs-to-spaces
If these TAB's are 8 characters, and they should be displayed as 2, then prior to conversion change the tabwidth, convert and then restore.
(c) Copyright JASSPA 2001
Last Modified: 2001/07/14
Generated On: 2001/08/15