I've had a lot of time to get use to TextMate now and we're getting along quite well. However, I have a couple of things I haven't managed to get use to, so I thought I would ask for some help.
1. Is there an easy way to PREpend something to each line in a selection, using just the keyboard? Let's say I have the following:
Line one. Line two. Longer line three.
I know I can select them using shift and the up arrow, strike option-apple-A to edit each line, strike control-left-arrow to get to the beginning of the first line and then type, but in this case that yields:
This is Line one. This is Line two. Longer liThis is ne three.
Not good. Am I missing a trick here?
2. Semi-related: Can you make a column selection without the mouse?
3. I've managed to shake most of my BBEdit habits, but I can't seem to conquer one. Option-down/up-arrow to scroll a page. That's really handy when I'm hunting through code for something. That key combination has a different purpose in TextMate and to be honest, I can never make it go where I want. :( Does TextMate have any scroll up/down key-bindings?
Thanks in advance for any tips shared.
James Edward Gray II
On 01-04-2005, at 16:40, James Edward Gray II wrote:
- Is there an easy way to PREpend something to each line in a
selection, using just the keyboard?
Hmm.. select all the lines (except the bottom one), press the Option key to switch into column mode; the position should be all left and: Type the text. Should work I think. I do that all the time.
- I've managed to shake most of my BBEdit habits, but I can't seem
to conquer one. Option-down/up-arrow to scroll a page. That's really handy when I'm hunting through code for something. That key combination has a different purpose in TextMate and to be honest, I can never make it go where I want. :( Does TextMate have any scroll up/down key-bindings?
Try ctrl+page-up/down
-steve
On 1 Apr 2005, at 15:40, James Edward Gray II wrote:
- Semi-related: Can you make a column selection without the mouse?
Since the others answered the other questions I'll answer this one ;-)
Yes, within certain limitations, just press the Alt (option) key and then use the mouse to drag the area you want, and with the selection still there just start typing.
Kind regards,
Mats
---- "TextMate, coding with an incredible sense of joy and ease" - www.macromates.com -
On Apr 1, 2005 10:17 AM, Mats Persson mats@imediatec.co.uk wrote:
On 1 Apr 2005, at 15:40, James Edward Gray II wrote:
- Semi-related: Can you make a column selection without the mouse?
Since the others answered the other questions I'll answer this one ;-)
Yes, within certain limitations, just press the Alt (option) key and then use the mouse to drag the area you want, and with the selection still there just start typing.
Kind regards,
Mats
Um, I think the point was *not* to use the mouse. I would like to know that trick as well.
Patrick
On Apr 1, 2005, at 17:40, Patrick Burleson wrote:
Um, I think the point was *not* to use the mouse. I would like to know that trick as well.
Make your selection, press and release the option modifier key once, and the selection turns into column-mode. You can keep extending the selection with shift + arrows, and it'll stay as a column selection (and allows the selection to go past newlines/inside tabs etc.).
hi Allan
On Apr 1, 2005, at 7:46 PM, Allan Odgaard wrote:
Um, I think the point was *not* to use the mouse. I would like to know that trick as well.
Make your selection, press and release the option modifier key once, and the selection turns into column-mode. You can keep extending the selection with shift + arrows, and it'll stay as a column selection (and allows the selection to go past newlines/inside tabs etc.).
Regarding selection, what do you think about an additional modifier (Ctrl or Shift), that selects only whole lines, regardless of the cursor position in this lines? Vim has such a feature and I use it a lot (v vs. Shift-v vs. Ctrl-v in command mode, if you want to test it).
On Apr 1, 2005, at 4:21 PM, Frank Schönmann wrote:
hi Allan
On Apr 1, 2005, at 7:46 PM, Allan Odgaard wrote:
Um, I think the point was *not* to use the mouse. I would like to know that trick as well.
Make your selection, press and release the option modifier key once, and the selection turns into column-mode. You can keep extending the selection with shift + arrows, and it'll stay as a column selection (and allows the selection to go past newlines/inside tabs etc.).
Regarding selection, what do you think about an additional modifier (Ctrl or Shift), that selects only whole lines, regardless of the cursor position in this lines? Vim has such a feature and I use it a lot (v vs. Shift-v vs. Ctrl-v in command mode, if you want to test it).
shift + cmd + right arrow selects the rest of line starting at your cursor. if you want to select the whole line: 1. cmd + left 2. shift + cmd + right [that of course could be turned into a macro mapped to your vi key sequence]
k
-- bye, Frank!
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 Apr 2, 2005, at 1:16, kumar mcmillan wrote:
shift + cmd + right arrow selects the rest of line starting at your cursor. if you want to select the whole line:
- cmd + left
- shift + cmd + right
[that of course could be turned into a macro mapped to your vi key sequence]
There's actually a key for this :) It used to be option-L, but it got changed to cmd-shift-L (and in beta 6 there's also cmd-ctrl-L to select a “real” line, ignoring soft wrap).
Though I think what Frank wants is e.g. clicking and releasing e.g. ctrl, and then move the arrow up/down to have full lines selected automatically.
What you (Frank) can do is use shift-up/down and afterwards press the cmd-shift-L key to extend the selection to full lines. But I'll consider the 'full line switch'.
On Apr 1, 2005, at 16:40, James Edward Gray II wrote:
- I've managed to shake most of my BBEdit habits, but I can't seem
to conquer one. Option-down/up-arrow to scroll a page. That's really handy when I'm hunting through code for something. That key combination has a different purpose in TextMate and to be honest, I can never make it go where I want. :( Does TextMate have any scroll up/down key-bindings?
It has page up/down -- if you really want option up/down to behave like that, it is possible to change the key bindings. In fact you can make that change “global” so that all Cocoa applications will scroll page up/down on option up/down.