1

Am I missing something? I have a 1000-line file which contains space-separated rows of two fields. I selected menu Format -> Spaces to Tabs (All) and nothing happened. I tried several times.

This is the Mac version of UltraEdit on OS X Mavericks (10.9).

1 Answers1

0

The name Spaces to Tabs is perhaps a little misleading. The function maintains the absolute positions of the existing text, inserting as many TABs as possible and padding with space to maintain the position of the existing text. This leads to TABs being present in perhaps unexpected places and no TABs in other places.

Example

Consider the following three lines of text (there are two leading spaces in each line, and I have added position and tab stop indications above and below for a tab stop setting of four):

12345678901234567890123456789012345678901234567890
         1         2         3         4
    *   *   *   *   *   *   *   *   *   *   *   *
--------------------------------------------------
  Stack Overflow          169  (no change)
  Server Fault            246  (no change)
  Meta Stack Overflow      269
--------------------------------------------------
    *   *   *   *   *   *   *   *   *   *   *   *

After menu command Spaces to Tabs is run, the text appears in exactly the same positions. But there is now a TAB between Stack and Overflow (as there is a tab stop at position 9). There are two TABs and two spaces between Overflow and 169 (two TABs to get to the tab stop position at 25 and then two spaces to get to position 27 where 169 starts). There aren't any TABs between 169 and ( as there aren't any tab stops at position 30, 31 and 32. And so on.

Resolution?

Depending on your data you may be able to make it work by adjusting the tab stop number to something other than 4. If you set it to 1 you will get some TABS, but perhaps too many. It is set by menu command Advanced -> Configuration -> Editor -> Word Wrap / Tab Settings -> Tab Stop Value:

Screenshot of UltraEdit's configuration dialog

Or you may be better off using the search/replace function and, if needed, a regular expression.