2

I would like to be able to click on a line of text without selecting it, and use a keyboard shortcut to copy all text on the current line. Is this possible? If so how?

0

4 Answers 4

4

Closest thing to that is ⇧⌘L followed by ⌘C.

2
  • 1
    You could use the Macro Editor to save this sequence (Bundles > Macros > Start Recording) and give it a key combination. Works like a charm. (Just make sure you uncheck the "use local clipboard while executing macro" option at the bottom of the macro in the Bundle editor.)
    – ghoppe
    Jul 10, 2010 at 6:46
  • Thanks to the macro tip! Given the awesomeness of TextMate, I can't say that one simple macro inconveniences me!
    – mkelley33
    Jul 11, 2010 at 14:46
3

Don't know if this helps but another useful one is Ctrl+Shift+D which will take the current line and duplicate it right below.

0
0

To have that in all standard text views, create ~/Library/KeyBindings/DefaultKeyBinding.dict that looks like:

{
    "^~c" = ("selectParagraph:", "copy:"); // ⌃⌥C
}

For more info, see Cocoa Text System.

Some of TextMate's text editing shortcuts are defined in a similar property list file at /path/to/TextMate.app/Contents/Resources/KeyBindings.dict. Modifications should be made to a copy in Application Support as usual.

0

You can use the emacs bindings. Most Mac apps support them. Control-k (kill) cuts the line to the emacs equivalent of a pasteboard and control-y (yank) pastes the results back. This pasteboard is different from the regular Mac pasteboard and with TextMate only appears to work with one window. If you control-k then control-y it is the equivalent of copy.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .