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

11,962

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.

Share:
11,962

Related videos on Youtube

user1323995
Author by

user1323995

Updated on September 18, 2022

Comments

  • user1323995
    user1323995 over 1 year

    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.

    • Chris Page
      Chris Page almost 12 years
      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.
    • HikeMike
      HikeMike almost 12 years
      @ChrisPage Stop it.
    • Chris Page
      Chris Page almost 12 years
      @DanielBeck Could you elaborate?
    • HikeMike
      HikeMike almost 12 years
      @ChrisPage My comment was referring to your deleted comment (moderators seem to agree) urging the user to ask this question on a different site.
    • Chris Page
      Chris Page almost 12 years
      @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?
    • HikeMike
      HikeMike almost 12 years
      @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.
    • Aron Curzon
      Aron Curzon about 7 years
      There was a feature in Mac OS X 10.4 to select text with the keyboard. macworld.com/article/1059321/termtext.html
  • user1323995
    user1323995 almost 12 years
    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?
  • ClarkGoble
    ClarkGoble almost 12 years
    Your best alternative is to use iTerm2 instead of Terminal. It does allow mouse less copy. link
  • user1323995
    user1323995 almost 12 years
    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 ...