Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently moved to Mac. I am missing my X11 copy-paste style. I can't find a way to exactly emulate X11 behavior "select-to-copy", "middle-click-to-paste" globally on Mac OS X. I am aware that this issue has been around for a long time, yet I can't find any real killer solution.

The best thing I found is in Can I copy by highlighting and paste by middle click on Mac OS X?. All suggested solutions try to find out a way to paste text from the clipboard with a middle click. Yet, nobody has a real solution for automatically copying the highlighted text.

I am wondering if there can be a way to automate the copying of highlighted text. Even if I should write a daemon to do it. Any pointers on where to start thinking will be great.

share|improve this question
    
In which application you want this behaviour? If you want it for terminals just install iTerm2 – number5 Mar 18 '15 at 23:13

This is an example of "lost in translation". "Select" means subtly-different things in X11 and Mac.

Under X11, selecting something is a system-wide event. Ever noticed that when you select something in one window, traditional X11 applications in other windows deselect whatever you had selected?

In the Mac way of thinking, selecting is local to an application. Safari doesn't get notified that you've selected something in Terminal.

More to the point, there's nothing at the system level that gets notified when you select something in any app, so there's no hook to script. The system-level event only happens when you tell the app to Copy what you've selected.

In other words, you're asking the Mac to do things in a way that is contrary to its design. Any solution you find will thus be incomplete and inconsistent... probably worse than just changing your habits.

I made the same transition years ago. I'm happy with the Mac way of copy/paste now (but I still hate the Mac definitions of home/end).

share|improve this answer

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.