How can I select text in the Mac OS X Terminal without a mouse (for copy and paste, emacs)

5

1

I am using Mac OS X Snow Leopard 10.6.8 and emacs 23.3.1. In the Terminal I can mark text with the mouse, copy it with CMD-C and paste it with CMD-V. This is all I need and it works great, even within emacs. Which is important for me, since I'm still not very comfortable with it.

The only problem is, I have to use the mouse! How can I select the text with keyboard only? Is there really no solution?

It seems like someone else had a similar question, though the unsatisfying answers (for me) suggest otherwise.

user1323995

Posted 2012-07-03T13:13:53.877

Reputation: 205

There was a feature in Mac OS X 10.4 to select text with the keyboard. http://www.macworld.com/article/1059321/termtext.html

– Aron Curzon – 2017-03-15T20:45:03.503

You could use Emacs, as suggested in that answer, or screen or tmux, which both provide a layer between the terminal and the programs running within, and support keyboard commands for navigating/searching the terminal contents. – Chris Page – 2012-07-04T03:21:30.877

@ChrisPage Stop it.

– Daniel Beck – 2012-07-05T05:38:37.860

@DanielBeck Could you elaborate? – Chris Page – 2012-07-09T00:35:14.163

@ChrisPage My comment was referring to your deleted comment (moderators seem to agree) urging the user to ask this question on a different site. – Daniel Beck – 2012-07-09T06:45:45.390

@DanielBeck Is there some way for me to see the deleted comment so I can figure out exactly what this is about? Also, is there a way to send messages to users—say, you—without using this question’s comments to do it? – Chris Page – 2012-07-12T05:57:37.777

@ChrisPage deleted comments are only visible to diamond moderators. I don't remember the exact wording of your comment, but you suggested this question should be asked on apple.se, something that's frowned upon here. There is no private messaging or anything like that, either respond via comments or try chat. @danielbeck will work in the root access room of su chat even if I'm not there. – Daniel Beck – 2012-07-12T08:06:42.840

Answers

3

Short of using some fancy scripting you can't select text without the mouse. Alternatively you could use a terminal command like screen but then that isn't interacting with Mac clipboard.

ClarkGoble

Posted 2012-07-03T13:13:53.877

Reputation: 46

Thank you for the answer ClarkGoble. I was afraid this would be the case. Isn't that something that thousands of OS X users want? – user1323995 – 2012-07-05T07:05:01.120

Your best alternative is to use iTerm2 instead of Terminal. It does allow mouse less copy. link

– ClarkGoble – 2012-07-09T01:42:01.183

Thank you so much ClarkGlobe!

iTerm2 seems to be very nice, and yes you can copy&paste text without the mouse, though only one line max and its a bit clumsy. Still better than nothing. Plus, I love full screen mode!

Still, it bugles my mind, that this is even an issue ... – user1323995 – 2012-07-11T07:20:15.250