Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

3 Answers 3

up vote 4 down vote accepted

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

share|improve this answer
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 '10 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 '10 at 14:46
    
+1 for key symbols! –  Wuffers Apr 3 '11 at 21:32
add comment

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.

share|improve this answer
    
Very cool. Helpful indeed! Thank you sir. –  mkelley33 Apr 1 '11 at 22:14
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.