Convert|Tabs

The Tabs submenu of the Convert menu has several commands for converting between spaces and tabs. The conversions use the tab size that you specified in the Appearance Preferences. These commands only have their desired effect when using a monospaced text layout. If you select some text first then only the selected lines are converted. If there is no selection then the conversion affects the entire clip.

Convert|Tabs|Indentation Spaces ⇒ Tabs

Convert as many spaces at the start of each line into tab characters as possible, without changing the layout of the clip. Spaces that occur after a non-whitespace character on a line are not converted.

Convert|Tabs|Spaces ⇒ Tabs

Convert as many spaces into tab characters as possible, without changing the layout of the file.

Convert|Tabs|Tabs ⇒ Spaces

Convert all tab characters in the active file into spaces.

Each tab in the file is replaced with the same number of spaces as the number of columns between the tab’s position and the next tab stop. If the text is monospaced and thus the width of a space is the same as the width of any other character, then the result is that after the conversion, the layout of the text remains exactly the same. You would only see a difference when visualizing spaces.

You can also find the tab conversion items in the drop-down menu of the Visualize Spaces button on the collection toolbar.