I'm using ultraedit to write a text like following:
key1: value1
key2 with different length: value2
key3 with other length: value3 with other length
key4: guess what? value4
And I would like to have a way (probably via a Macro but not necessarily) to align values to the same column, resulting in a text like this:
key1: value1
key2 with different length: value2
key3 with other length: value3 with other length
key4: guess what? value4
Is there a way to do this using UltraEdit? Ideas of how to achieve this same goal in other text editors are also appreciated.
UltraEdit macros do not support variables which makes this alignment task difficult to code. It is possible with an UltraEdit macro as demonstrated for example by Column Align Macro. But an UltraEdit script is much better for this task as it can be coded to do the alignment in memory and output the result into the file producing just one undo record if the file respectively the selected block is not too large.
Here is a commented UltraEdit script for this right alignment task on first colon in selected lines or all lines of active file.