Tabs to Spaces

Contents  Previous  Next

 

Menu: Block > Convert Other > Tabs to Spaces

 

Default Shortcut Key: none

 

Macro function: TabsToSpaces()

 

The Tabs to Spaces command can be used to convert the Tabs within a selected area of text into an equivalent number of Spaces.  In doing so, Boxer uses the current display value of a Tab (View | Tab Display Size) to determine how many Spaces should be used.

 

bm2No attempt is made to determine whether the Tabs being changed reside within a quoted string.  Programmers should be careful when using this command, as changing Tabs within a quoted string my yield undesirable results if the string was to be displayed in a message on-screen.

 

bm2The Spaces to Tabs and Tabs to Spaces commands are not opposites.  If the Tab Display Size is 4, the sentence:

 

The<tab>dog<tab>ran<tab>wild.

 

would be converted by the Tabs to Spaces command to:

 

The<space>dog<space>ran<space>wild.

 

Running the Spaces to Tabs command on this sentence would not yield the original sentence.  A sequence of two or more spaces is required before a tab character is considered for placement into the converted text.

 

bm1If the Tab Display Size command has been used to designate an additional tab character for display purposes, the Tabs to Spaces command will treat that character as a tab when performing its conversion to spaces.  This makes it possible to convert a data file that uses a character-separated field format into a fixed width field format.