Use this command to convert all of the (leading) spaces in a file to tabs. This uses the Tab Settings to determine how the tab character/tab stop is to be interpreted.
The leading spaces refers to the space at the beginning of a line. Any spaces after the first non-space character in a line will not be converted. To convert all spaces in a line use the Spaces to Tabs (All) command.
The conversion is performed such that the formatting will remain the same. This will mean that where there are insufficient spaces to replace with a TAB character and retain the same formatting the spaces will be left in place.
If a portion of the file is selected/highlighted only the selected portion is converted, otherwise the complete file is converted.
To convert tabs to spaces use the Tabs to Spaces command.