Beautify/Format blocks of code
Submitted by Friday, 2 April, 2004 - 20:21
on
Does anyone know of a way to beautify/format the following code using a search/replace with a regular expression?
I'd like to format the code from this:
set north [lindex $string_list 0]
set east [lindex $string_list 1]
set elevation [lindex $string_list 2]
set arsenic [lindex $string_list 3]
set sulph [lindex $string_list 4]
to this:
set north [lindex $string_list 0]
set east [lindex $string_list 1]
set elevation [lindex $string_list 2]
set arsenic [lindex $string_list 3]
set sulph [lindex $string_list 4]
In other words, I'd like the different parts each line of the code block to line up vertically.
Thanks for any insight.
I'd like to format the code from this:
set north [lindex $string_list 0]
set east [lindex $string_list 1]
set elevation [lindex $string_list 2]
set arsenic [lindex $string_list 3]
set sulph [lindex $string_list 4]
to this:
set north [lindex $string_list 0]
set east [lindex $string_list 1]
set elevation [lindex $string_list 2]
set arsenic [lindex $string_list 3]
set sulph [lindex $string_list 4]
In other words, I'd like the different parts each line of the code block to line up vertically.
Thanks for any insight.