[TxMt] Block indent, bracket matching, bracket typing

Steven Wittens steven at acko.net
Fri Dec 16 07:43:11 UTC 2005


Arrr mateys!

I'm a recent TextMate convert, and I absolutely love it ;). Still, I 
have a couple of requests... I searched the archives and couldn't find 
much about the first two:

1) On my (Belgian) keyboard, typing a [ or ] requires option+shift+( or 
). This makes the block indent shortcuts very cumbersome to use because 
the command key is also required, meaning it's a 4-key chord each. One 
solution would be to add e.g. command+( and command+) as extra shortcuts 
for this (which are 2-key chords for anyone else on a Belgian and French 
keyboard).

But in many other editors, there is a much easier and intuitive way to 
block-indent: just select multiple lines of text, and press Tab or 
Shift-Tab. In TextMate, the first just replaces the selection with a tab 
(not so useful IMO), and the second does nothing. So, please consider 
adding this feature.

2) The bracket matching seems clumsy. The highlighting is only a short 
flash, so you need to move the cursor back and forth to see it again. 
And because it only highlights the opening bracket, it is often hard to 
see which is the matching closing bracket. Especially when you are 
around multiple nested parentheses, and you are doing the 'back and 
forth' thing to see it flash again. Finally, it does not work in reverse 
(highlight the closing bracket when you are at the opening bracket).

I think it would be a much more usable feature if it highlighted both 
brackets in a pair, when you are at either of them and did so 
permanently (i.e. based on cursor position) rather than just when moving 
over a bracket from left to right (i.e. based on cursor movement). It 
would also get rid of the artificial pause it has now.

3) I'd like to voice my support for smarter insertion of bracket pairs 
in the middle of text (as has been requested before). All too often, I 
get 'foo()bar(...)' when I want to wrap 'bar(...)'. Selecting the text 
to wrap first (what was suggested before on the list) just doesn't feel 
right to me. My instinct groups the bracket with the keyword in front of 
it, so doing keyword -> highlight -> bracket is icky. I'd much rather 
have no closing bracket inserted when the next character is not an 
operator/whitespace/end-of-line.

I hope having a license gives me at least some nag credits ;).
Steven Wittens



More information about the textmate mailing list