Hi,
I'm new to TextMate and have been struggling with a few things. I'm having trouble finding answers on Google etc. and was hoping someone in the forum could help.
1. How to insert a new line above the caret position and move to the start of the new line (in the correct indentation level). Something like Shift-O in vim.
2. How to move to the start of the text on a line. So something like Ctrl-A then Ctrl-LeftArrow
3. I also have a question regarding TextMate's auto-indentation model. Say I have the following ruby snippet:
def foo puts 'hello world' <caret> end
Note the caret is not indented correctly. If I press enter the next line also starts against the margin. Is there a way to have TextMate always put the caret in the correct indentation position when starting a new line? Correct being whatever TextMate thinks is the correct position.
Regards, Liehann
Thanks, but it looks like Command Left Arrow has the same behavior as Ctrl-A
Perhaps my initial description wasn't clear enough.
Say my code is: def foo puts 'hello world'<caret> end
If I press Ctrl-A or Command-Left Arrow I end up with: def foo <caret> puts 'hello world' end
What I'm looking for is: def foo <caret>puts 'hello world' end
Regards, Liehann
On 8/4/07 1:47 PM, "Mark Eli Kalderon" eli@markelikalderon.com wrote:
On Aug 4 2007, at 12:31, Liehann Loots wrote:
- How to move to the start of the text on a line. So something
like Ctrl-A then Ctrl-LeftArrow
command left arrow
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 Aug 4 2007, at 13:00, Liehann Loots wrote:
Thanks, but it looks like Command Left Arrow has the same behavior as Ctrl-A
Perhaps my initial description wasn't clear enough.
Say my code is: def foo puts 'hello world'<caret> end
If I press Ctrl-A or Command-Left Arrow I end up with: def foo <caret> puts 'hello world' end
What I'm looking for is: def foo <caret>puts 'hello world' end
Regards, Liehann
Closer to what you want though still less: option left arrow moves through words.
At 14:00 Uhr +0200 04.08.2007, Liehann Loots wrote:
Perhaps my initial description wasn't clear enough.
Say my code is: def foo puts 'hello world'<caret> end
If I press Ctrl-A or Command-Left Arrow I end up with: def foo <caret> puts 'hello world' end
What I'm looking for is: def foo <caret>puts 'hello world' end
In fact, this is one of the precious few things I knew in my former text editor (called Pepper) that I still miss in TextMate. Pepper had an optional "two-stage jump to start of line": Pressing Command-Left Arrow for the first time would move the caret to the position before the first non-whitespace character of the line, pressing Command-Left Arrow again jumped to the first column of the line.
I'd really like that in TextMate, too -- maybe that's something for TM 2?
Kind regards, Tobias
On 04/08/07, Liehann Loots liehann@iafrica.com wrote:
- How to move to the start of the text on a line. So something like Ctrl-A
then Ctrl-LeftArrow
There was a discussion about this recently. You can write a command to do it. See the archives here:
http://www.nabble.com/Re%3A-smart-home-tf3534392.html#a9881687
Robin
On 04/08/07, Robin Houston robin.houston@gmail.com wrote:
There was a discussion about this recently. You can write a command to do it. See the archives here: [...]
Or, more simply, see the attached command.
Robin
On 4 Aug 2007, at 15:56, Robin Houston wrote:
On 04/08/07, Liehann Loots liehann@iafrica.com wrote:
- How to move to the start of the text on a line. So something
like Ctrl-A then Ctrl-LeftArrow
There was a discussion about this recently. You can write a command to do it. See the archives here:
http://www.nabble.com/Re%3A-smart-home-tf3534392.html#a9881687
Robin
Or, simply, cmd-left arrow, opt-right arrow.
On 04/08/07, Constantinos Neophytou ♎ constantinos@neophytou.net wrote:
Or, simply, cmd-left arrow, opt-right arrow.
If you're proposing that as a macro, it only works if the line is indented. (And if you're proposing it not as a macro then, well, it requires two keystrokes rather than one. :-) )
Robin
On 6 Aug 2007, at 16:16, Robin Houston wrote:
On 04/08/07, Constantinos Neophytou ♎ constantinos@neophytou.net wrote:
Or, simply, cmd-left arrow, opt-right arrow.
If you're proposing that as a macro, it only works if the line is indented. (And if you're proposing it not as a macro then, well, it requires two keystrokes rather than one. :-) )
Robin
It's two keystrokes in vim as well, so it's the same... :)
whatever works for u..
I just did this with a macro:
Bundles > Macros > Start Recording CTRL+A Find: '[^\s]' (with Regular Expression) Left Arrow (deselect the character we just found) Bundles > Macros > Stop Recording Bundles > Macros > Save Last Recording... Assign a keybinding (I did Cmd+LeftArrow)
Corey
On Aug 4, 2007, at 5:56 AM, Robin Houston wrote:
On 04/08/07, Liehann Loots liehann@iafrica.com wrote:
- How to move to the start of the text on a line. So something
like Ctrl-A then Ctrl-LeftArrow
There was a discussion about this recently. You can write a command to do it. See the archives here:
http://www.nabble.com/Re%3A-smart-home-tf3534392.html#a9881687
Robin
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 04/08/07, Corey Jewett ml@syntheticplayground.com wrote:
I just did this with a macro:
The command I sent is a bit more sophisticated: it alternates between the beginning of the text and the beginning of the line.
Robin
On Aug 4, 2007, at 11:29 AM, Robin Houston wrote:
On 04/08/07, Corey Jewett ml@syntheticplayground.com wrote:
I just did this with a macro:
The command I sent is a bit more sophisticated: it alternates between the beginning of the text and the beginning of the line.
About 45 seconds after I sent that I realized how irritatingly useless doing it as a macro is. Thx for the bundle. What is the key combo for the character you have it bound to?
Corey
On 04/08/07, Corey Jewett ml@syntheticplayground.com wrote:
What is the key combo for the character you have it bound to? [ i.e. § ]
On my keyboard (UK layout), it's a key of its own, above the tab key.
Robin