# FAQ(39) - Tabs; How to change the tab width ??

[Home] [Commands] [Variables] [Macro-Dev] [Glossary]

## QUESTION (39)

Tabs; How to change the tab width ??

## ANSWER

$tab-width(5) controls the size of the 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>
    $tab-width<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 $tab-width 2

then whenever you start a new session you will always have the $tab-width defined as you want it.

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

[FAQ Index].

(c) Copyright JASSPA 2009
Last Modified: 2009/08/29
Generated On: 2009/10/12

</HMTL>