[TxMt] Features request: columnar editing mode and fixed/delimiter conversion
Luc Heinrich
lucsky at mac.com
Fri Jul 22 11:23:20 UTC 2005
On 22 juil. 05, at 10:31, Allan Odgaard wrote:
> Yes, I think you're overlooking that TextMate supports column
> selections of arbitrary size, the 0-width version is just one size.
Right. The question is: is supporting column selections of arbitrary
size really a good choice as opposed to SubEthaEdit's block editing ?
Can you enumerate any advantage ?
I've already showed why I think that a 0-width column is a bad thing
visually. Here are two more examples.
Consider this (not so) contrived text sample (with line numbers shown
for convenience):
[1] foo ba baz
[2] foo ba baz
[3] # a comment line
[4] foo ba baz
[5] foo ba baz
[6] # a comment line
[7] foo ba baz
[8] foo ba baz
The goal now is to:
- add the 'r' at the end of each 'ba' to make 'bar'.
- add 'qux' after each 'baz'.
With TextMate column selection:
1. create a 0-width column after 'ba' in lines 1-2
2. type 'r'
3. create another 0-width column after 'qux' in lines 1-2
4. type ' qux'
5. create a 0-width column after 'ba' in lines 4-5
6. type 'r'
7. create another 0-width column after 'qux' in lines 4-5
8. type ' qux'
9. create a 0-width column after 'ba' in lines 4-5
10. type 'r'
11. create another 0-width column after 'qux' in lines 4-5
12. type ' qux'
13. Done
With SubEthaEdit block editing:
1. create a non-contiguous block for lines 1-2, 4-5 and 7-8 (yes,
that's possible)
2. move cursor after any 'ba'.
3. type 'r'
4. move cursor after any 'baz'.
5. type ' cux
6. Done
This shows two more things:
A. In TextMate, if I want to make several transformations on multiple
lines, I'll have to create a column selection for each transformations.
B. In TextMate, if I want to make transformations on multiple non-
contiguous lines, I'll have to repeat each of them for each blocks of
contiguous lines.
Multiply the number of steps in A by the number of steps in B by the
number of transformations, and you'll see how fast this can become
tedious :)
No really, if you haven't already did, try the SubEditEdit block
editing mode to see how it works, it will probably be a thousand
times more explicit than my poor explanations... ;)
--
Luc Heinrich - lucsky at mac.com - http://www.honk-honk.com
More information about the textmate
mailing list