In other text editors (in my pre-mac days), I very commonly used the block editing feature to quickly align code. I would use a regular expression match/replace to insert in a bunch of whitespace where I need it, then block select where I want the column to start and shift- tab to squeeze all of the text back into a nice column.
TextMate does most of the above quite nicely, with the exception of the shift-tab. Shift-tab does not shift everything left, eventually squeezing out the whitespace and leaving a nicely aligned column. Can I do this somehow, and if not could it be added? (I really miss this feature)
Thanks...
Jim Leask
On Jan 31, 2006, at 8:12 PM, Jim Leask wrote:
TextMate does most of the above quite nicely, with the exception of the shift-tab. Shift-tab does not shift everything left, eventually squeezing out the whitespace and leaving a nicely aligned column.
My understanding was that Shift-Tab in TextMate doesn't do anything at all. Does Command-[ do what you want?
Trevor
Command + [ goes left Command + ] goes right
Eric Coleman
http://aplosmedia.com home: 412 399 1024 cell: 412 779 5176
On Jan 31, 2006, at 11:21 PM, Trevor Harmon wrote:
On Jan 31, 2006, at 8:12 PM, Jim Leask wrote:
TextMate does most of the above quite nicely, with the exception of the shift-tab. Shift-tab does not shift everything left, eventually squeezing out the whitespace and leaving a nicely aligned column.
My understanding was that Shift-Tab in TextMate doesn't do anything at all. Does Command-[ do what you want?
Trevor
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On Wed, 01 Feb 2006 04:12:58 -0000, Jim Leask leask@rogers.com wrote:
In other text editors (in my pre-mac days), I very commonly used the block editing feature to quickly align code. I would use a regular expression match/replace to insert in a bunch of whitespace where I need it, then block select where I want the column to start and shift-tab to squeeze all of the text back into a nice column.
TextMate does most of the above quite nicely, with the exception of the shift-tab. Shift-tab does not shift everything left, eventually squeezing out the whitespace and leaving a nicely aligned column. Can I do this somehow, and if not could it be added? (I really miss this feature)
It's under cmd+[ and cmd+] They say it's The Only Proper Mac Shortcut, but I miss tab and shift+tab too...
On 01/02/2006, at 5:12, Jim Leask wrote:
Shift-tab does not shift everything left, eventually squeezing out the whitespace and leaving a nicely aligned column. Can I do this somehow, and if not could it be added? (I really miss this feature)
It's on opt-tab (shift right), and shift-opt-tab (shift left). As other mention, it's also on cmd-] and [ respectively.
-- Sune.
Thanks for the info (to several who responded) This worked fine...
However, I must say, I think this is one thing that the Mac didn't get right. (they got enough other stuff right that I never use my PC anymore though). Using Tab and Shift-Tab to do a shift operation is much more sensible when a block of text is selected. I really don't find it useful at all to have a block of text deleted, then replaced by a tab, which is what happens now.
This is especially true when I select a vertical bar block of text (a block selection that runs vertically without including any characters at all). If you do this, and hit Tab, it (in my opinion) does the right thing of inserting a tab in front of all of the characters in the block, thereby shifting all characters to the right of this vertical block to the right. However, the Shift-Tab doesn't shift them back again....
Is there a way to remap these keys to do this?
Jim
On 1-Feb-2006, at 6:16 AM, Sune Foldager wrote:
On 01/02/2006, at 5:12, Jim Leask wrote:
Shift-tab does not shift everything left, eventually squeezing out the whitespace and leaving a nicely aligned column. Can I do this somehow, and if not could it be added? (I really miss this feature)
It's on opt-tab (shift right), and shift-opt-tab (shift left). As other mention, it's also on cmd-] and [ respectively.
-- Sune.
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 02/02/2006, at 5:58, Jim Leask wrote:
Thanks for the info (to several who responded) This worked fine... However, I must say, I think this is one thing that the Mac didn't get right. (they got enough other stuff right that I never use my PC anymore though). Using Tab and Shift-Tab to do a shift operation is much more sensible when a block of text is selected. I really don't find it useful at all to have a block of text deleted, then replaced by a tab, which is what happens now.
Incidentally, Allan finds that useful. I don't really, but I got used to opt- quick enough :-).
This is especially true when I select a vertical bar block of text (a block selection that runs vertically without including any characters at all). If you do this, and hit Tab, it (in my opinion) does the right thing of inserting a tab in front of all of the characters in the block, thereby shifting all characters to the right of this vertical block to the right. However, the Shift-Tab doesn't shift them back again.... Is there a way to remap these keys to do this?
Well, this isn't really a matter of remapping, but of changing the behaviour in the application. If you just remap tab to do this, you lose the ability to insert normal tabs, as clearly keymaps don't contain info such as "do this if block is selected, this otherwise". So the shorter answer: No, unfortunately it can't really be done :-(.
-- Sune.
On Feb 2, 2006, at 10:10 AM, Sune Foldager wrote:
Well, this isn't really a matter of remapping, but of changing the behaviour in the application. If you just remap tab to do this, you lose the ability to insert normal tabs, as clearly keymaps don't contain info such as "do this if block is selected, this otherwise". So the shorter answer: No, unfortunately it can't really be done :-(.
What's worse, you lose all tab triggers, so half of the commands/ snippets in the bundles can't be executed anymore.
-- Sune.
Haris