I cannot find where in the TextMate documentation it explains how to go to the end of a line or to the start of a line. It must be very simple, but I don't know what the keyboard shortcuts are because I can't find any reference to this in the Help System.
On Sat, Apr 24, 2010 at 8:03 PM, Robert G Jr robertgloverjr@gmail.comwrote:
I cannot find where in the TextMate documentation it explains how to go to the end of a line or to the start of a line. It must be very simple, but I don't know what the keyboard shortcuts are because I can't find any reference to this in the Help System.
End of line: control - e Start of line: control - a
Good luck,
-Conrad
-- View this message in context: http://old.nabble.com/how-do-I-go-to-end-of-line-and-or-go-to-start-of-line-... Sent from the textmate users mailing list archive at Nabble.com.
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On Sat, Apr 24, 2010 at 11:23 PM, Conrad Taylor conradwt@gmail.com wrote:
On Sat, Apr 24, 2010 at 8:03 PM, Robert G Jr robertgloverjr@gmail.com wrote:
I cannot find where in the TextMate documentation it explains how to go to the end of a line or to the start of a line. It must be very simple, but I don't know what the keyboard shortcuts are because I can't find any reference to this in the Help System.
End of line: control - e Start of line: control - a
FWIW, these are standard emacs movements and will work by default in nearly every text field in a cocoa application on Mac OS X.
Geoff
On 25/04/2010, at 1:37 PM, Geoff Beier geoff@mollyandgeoff.com wrote:
On Sat, Apr 24, 2010 at 11:23 PM, Conrad Taylor conradwt@gmail.com wrote:
On Sat, Apr 24, 2010 at 8:03 PM, Robert G Jr <robertgloverjr@gmail.com
wrote:
I cannot find where in the TextMate documentation it explains how to go to the end of a line or to the start of a line. It must be very simple, but I don't know what the keyboard shortcuts are because I can't find any reference to this in the Help System.
End of line: control - e Start of line: control - a
FWIW, these are standard emacs movements and will work by default in nearly every text field in a cocoa application on Mac OS X.
An alternative is Cmd-Left and Cmd-Right for start and end of line, respectively, which will also work in any text field. Likewise, Cmd-Up and Cmd-Down move to the beginning and end of the document.
Thanks! Armed with this new tantalizing clue, I have just discovered at the following link a huge treasure chest of useful key bindings, of which your two were just the tip of a giant iceberg. :jumping: http://www.hcs.harvard.edu/~jrus/site/system-bindings.html Default Mac OS X System Key Bindings
Adam Sharp wrote:
An alternative is Cmd-Left and Cmd-Right for start and end of line, respectively, which will also work in any text field. Likewise, Cmd-Up and Cmd-Down move to the beginning and end of the document. -- Adam
On 25/04/2010, at 2:09 PM, Robert G Jr robertgloverjr@gmail.com wrote:
Thanks! Armed with this new tantalizing clue, I have just discovered at the following link a huge treasure chest of useful key bindings, of which your two were just the tip of a giant iceberg. :jumping: http://www.hcs.harvard.edu/~jrus/site/system-bindings.html Default Mac OS X System Key Bindings
No worries. And on that note, another helpful key binding when stuck with a laptop keyboard (which I usually am) is Fn-Delete, which is forward delete. There's a couple of bindings on that page (at least, notably, backtab) which may also be available through use of the function key, though I haven't tested them.
As a point of interest, it seems that the Fn key doesn't behave like the standard modifier keys, Cmd, Option and Ctrl. For example, forward delete doesn't appear as Fn-Delete on that list you linked to, but has its own glyph; whereas, the other modifier keys all appear explicitly. Anyone know if this behaviour is global for the Fn key, or whether it is special for delete? I'm just curious :)
PS Not sure if I explained myself very well there!
-- Adam Sharp
i have just now emailed the author of that page to point this out and to request he update http://www.hcs.harvard.edu/~jrus/site/system-bindings.html this page to include a keyboard layout for the MacPro.
Incidentally, I was trying out section 4.8 of the TextMate documentation (Column Movement / Typing) and while it was very interesting, it did not answer the question that I was trying to get answered. Namely, how to put the editor into "column mode". There are no hits in the TextMate documentation for this keyword ("column mode").
What I would like to do is select a few lines of source code and then shift all of it to the right. Another thing I would like to do is take section 4.8 one step further. There it shows how to type "<li>" and have it prepend to the start of three selected rows in unison. I would like to then type "</li>" and have it appear as the suffix to the contents of those three rows in unison.
Adam Sharp wrote:
As a point of interest, it seems that the Fn key doesn't behave like the standard modifier keys, Cmd, Option and Ctrl. For example, forward delete doesn't appear as Fn-Delete on that list you linked to, but has its own glyph;
On Sat, Apr 24, 2010 at 10:25 PM, Robert G Jr robertgloverjr@gmail.com wrote: <snip>
What I would like to do is select a few lines of source code and then shift all of it to the right.
Press cmd+] with the lines highlighted.
Cheers, Chris -- http://blog.rebertia.com
On Apr 24, 2010, at 11:50 PM, Robert G Jr wrote:
[C-t] transpose two characters
This works system wide, but TextMate will additionally let you “transpose” a longer string of characters, reversing the selected string.
On Apr 25, 2010, at 1:25 AM, Robert G Jr wrote:
i have just now emailed the author of that page to point this out and to request he update http://www.hcs.harvard.edu/~jrus/site/system-bindings.html this page to include a keyboard layout for the MacPro.
I'm pretty sure he's on this list and will eventually see this thread. :)
Another thing I would like to do is take section 4.8 one step further. There it shows how to type "<li>" and have it prepend to the start of three selected rows in unison. I would like to then type "</li>" and have it appear as the suffix to the contents of those three rows in unison.
In the general case, you can insert before several lines using column selection and append to them using “Edit Each Line in Selection” (select and hit ⌥⌘A). But in the case of HTML, there's an easier way. Use the “Wrap Each Selected Line in Open/Close Tag” command (select the lines and hit ⌃⇧⌘W). The default will be `<li>`, but you can type something else.
On Apr 24, 2010, at 11:50 PM, Robert G Jr wrote:
[C-t] transpose two characters
This works system wide, but TextMate will additionally let you "transpose" a longer string of characters, reversing the selected string.
Just thought I'd chime in and say this is one of my favorite shortcuts. I've never had a need for the reversal of more than two characters, but MAN I can't tell you how many times I've mistyped something by simply transposing two characters...control-T is so much faster at fixing that than delete, move, type. I found out about it through TextMate, and then discovered it works in most Cocoa text fields. I've saved seconds; SECONDS, I tell you. I'll be able to retire a few minutes early, I estimate. I joke...but seriously I love that shortcut.
On Apr 26, 2010, at 1:09 PM, Dru Kepple wrote:
Just thought I'd chime in and say this is one of my favorite shortcuts. I've never had a need for the reversal of more than two characters, but MAN I can't tell you how many times I've mistyped something by simply transposing two characters...control-T is so much faster at fixing that than delete, move, type. I found out about it through TextMate, and then discovered it works in most Cocoa text fields.
There are many reasons why I dislike Firefox and other non-Cocoa apps, but I'd have to say not having these standard keyboard shortcuts is at the top of the list.
I wonder what shortcut TextMate has that *isn't* system wide that people miss the most. For me, it's definitely ⌃W to select the current word.
There are many reasons why I dislike Firefox and other non-Cocoa apps, but I'd have to say not having these standard keyboard shortcuts is at the top of the list.
I concur.
I wonder what shortcut TextMate has that *isn't* system wide that people miss the most. For me, it's definitely ⌃W to select the current word.
Control-Arrows to jump through partial words. Hands down.
I wonder what shortcut TextMate has that *isn't* system wide that people miss the most. For me, it's definitely ⌃W to select the current word.
Control-Arrows to jump through partial words. Hands down.
Actually, I take that back...Command-E is common for using selection as "find", and Command-G for finding next, but Command-Shift-E to use selection as replacement and Command-Option-F to replace and find is probably even more wished-for outside of textmate than Control-Arrows. For me, at least.
+dru
On Apr 26, 2010, at 3:04 PM, Dru Kepple wrote:
Actually, I take that back...Command-E is common for using selection as "find", and Command-G for finding next, but Command-Shift-E to use selection as replacement and Command-Option-F to replace and find is probably even more wished-for outside of textmate than Control-Arrows. For me, at least.
Huh. I always thought those were system-wide. I guess I've never have a need to find and replace outside my text editor.
Speaking of shortcuts…
Is there a keystroke to extend the bounds of a selection? I realize you can use the shift+movement keys for adjustments but if you go forward and then back, it restarts your selection from the initial cursor point. I'm wondering if there's a way to lock one side of the selection and extend the other. Perhaps something similar to hitting 'o' in vim's visual mode?
Sorry if I'm not making any sense!
Will
On 27 Apr 2010, at 04:03, Will wrote:
Is there a keystroke to extend the bounds of a selection? I realize you can use the shift+movement keys for adjustments […]
Not possible — is this something you need a lot? if so, can you perhaps give some use cases?
What I could do is introduce a “swap end points”, but selection is a tad more complex in 2.0 (discontinouos), so I’m hesitant to make my code base more complex than need be w/o good reason.
On Apr 25, 2010, at 0:58, Adam Sharp wrote:
As a point of interest, it seems that the Fn key doesn't behave like the standard modifier keys, Cmd, Option and Ctrl. For example, forward delete doesn't appear as Fn-Delete on that list you linked to, but has its own glyph; whereas, the other modifier keys all appear explicitly. Anyone know if this behaviour is global for the Fn key, or whether it is special for delete? I'm just curious :)
The Fn key is best thought of not as a Modifier Key but rather as a low-level switch to a virtual alternate set of keyboard keys. Applications generally don't (can't?) make distinctions based on it; the alternate functions (return/enter, delete/fwd delete, arrows/page keys, F-keys/special functions) are selected at the operating system level.
At least, that's how it feels based on using it; I haven't looked into the actual technical details.
By the way, a useful difference between ⌘← ⌘→ and ⌃A ⌃E:
⌃A ⌃E go to the ends of the text line: "stop before the newline". They ignore soft wrapping.
⌘← ⌘→ go to the left and right ends of the *screen display*. They treat soft wrapping just like hard wrapping.
I find that ⌃A ⌃E are more often what I want, but ⌘← ⌘→ can be useful when the problem is less "navigate to a significant point in the text" than "how can I get the cursor to *that spot right there* with the fewest keystrokes?"
On Apr 25, 2010, at 8:51 AM, Kevin Reid wrote:
The Fn key is best thought of not as a Modifier Key but rather as a low-level switch to a virtual alternate set of keyboard keys.
At least, that's how it feels based on using it; I haven't looked into the actual technical details.
That's been my experience.
Keycodes:
http://manytricks.com/keycodes/
Doesn't report the pressing of the function key as a modifier, so you get the "code" of a function key, but can't create a keypress like "Function-H" for example.
Charles
Wow! Thank you so much. I had no idea. A new world opens up knowing this. Armed with this knowledge I now know these commands will all work (see list below). Thanks again. :-)
[C-a] go to start of line [C-e] go to end of line [C-f] move to the next character [C-b] move back one character [C-p] move to the previous line [C-n] move to the next line [C-m] insert new line (return) [C-t] transpose two characters [C-k] cut from cursor to end of line [C-y] paste [C-d] delete forward [C-h] delete backward
Geoff Beier-2 wrote:
End of line: control - e Start of line: control - a
FWIW, these are standard emacs movements and will work by default in nearly every text field in a cocoa application on Mac OS X.