|
|
Hack for Linux style copy/paste?
|
|
|
|
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status:
Offline
|
|
Does anybody know of any hack to get Linux style copy/paste behavior* on the Mac? Not just within the X11 environment, but throughout all of OS X. I've been looking for some kind of hack that does that, but couldn't find anything. All I've come up with are the shell command pbcopy and pbpaste. Any ideas?
*) selection = copy, middle-click = paste
|
•
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Aug 2004
Location: FFM
Status:
Offline
|
|
How would it know which selection to paste?
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status:
Offline
|
|
Originally Posted by TETENAL
How would it know which selection to paste?
The last one maybe?
|
•
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Jun 2002
Location: UK
Status:
Offline
|
|
sorry?
whats different about them?
someone might have tips to recreate it if you describe it
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Apr 2005
Status:
Offline
|
|
Originally Posted by Simon
The last one maybe?
So you select some text to copy.
Then you select some more text that you want to paste over.
How does it know to copy the text that was selected first and not the second selection (which is what you were trying to paste over)?
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status:
Offline
|
|
Originally Posted by El Gato
How does it know to copy the text that was selected first and not the second selection (which is what you were trying to paste over)?
It doesn't. You can not copy one thing and paste over another selection that way.
But that's entirely not the point. I'm not here to argue if it's better or worse than OS X's copy/paste. All I'm asking for is if anybody knows of an app/hack/whatever that enables that copy/paste behavior on a Mac.
|
•
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status:
Offline
|
|
Originally Posted by sushiism
sorry?
whats different about them?
someone might have tips to recreate it if you describe it
If you read my very first you will see that I describe how Linux style copy/paste works. It's explained at the bottom of the post.
|
•
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Oct 2001
Location: Yokohama, Japan
Status:
Offline
|
|
Originally Posted by El Gato
So you select some text to copy.
Then you select some more text that you want to paste over.
How does it know to copy the text that was selected first and not the second selection (which is what you were trying to paste over)?
Uh, you know you can paste without having selected something to paste over, right?
|
|
|
|
|
|
|
|
|
Moderator
Join Date: Apr 2000
Location: Gothenburg, Sweden
Status:
Offline
|
|
The Mac OS equivalent is to drag and drop text. Combine this with Exposé and Command-Tab to drag to windows that you can't see. It has the advantage of letting you cut as well - in fact, that is the default unless it's a write-protected page, and you have to hold option to copy - and even delete, by dragging to the trash. I know that it's hard to relearn (because you don't remember that you should have dragged until you're in the window you want to paste to) but it isn't any slower and it's more flexible. I'm not aware of any hacks that will implement the X11-style on OS X.
(ObNitpick: That behaviour is much older than Linux, and works on many other operating systems besides. It's more correct to call it X11 cut-n-paste, because that's where it comes from.)
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
It would be nice to have this feature, I'd setup my middle click on my Mighty Mouse to do this.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Jun 2003
Location: Newport News, VA USA
Status:
Offline
|
|
Originally Posted by wataru
Uh, you know you can paste without having selected something to paste over, right?
I'm sure he was just providing an example in which the proposed copy/paste mechanism wouldn't be ideal.
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Jun 1999
Location: Las Vegas, NV, USA
Status:
Offline
|
|
Originally Posted by Simon
If you read my very first you will see that I describe how Linux style copy/paste works. It's explained at the bottom of the post.
Sorry. Still not clear. What does "selection=copy" mean?
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status:
Offline
|
|
Originally Posted by P
(ObNitpick: That behaviour is much older than Linux, and works on many other operating systems besides. It's more correct to call it X11 cut-n-paste, because that's where it comes from.)
True, good point.
|
•
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status:
Offline
|
|
Originally Posted by chabig
Sorry. Still not clear. What does "selection=copy" mean?
I guess I was being to brief.
In X11 whenever you select some characters they are automatically copied to your clipboard. So to 'copy' you just select. A middle click then 'pastes' that selection. You don't need to use the keyboard or menus, it's all done with the mouse. There are many situations where I prefer OS X's cmd-c and cmd-v, but there are occasions where X11 style copy/paste is much faster. It would be nice if there were a hack that would allow you to use X11 style behavior for those occasions.
|
•
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Jun 1999
Location: Las Vegas, NV, USA
Status:
Offline
|
|
Simon,
Thanks for that clarification. I have never experienced that behavior. Automatic copy...interesting. But doesn't that mean that once you've got a desired selection on the clipboard that you can't select anything else in the interim? Isn't that somewhat limiting?
|
|
|
|
|
|
|
|
|
Moderator
Join Date: Apr 2000
Location: Gothenburg, Sweden
Status:
Offline
|
|
The idea behind the middleclick paste is to not have regular copy/paste at all. The way OS X and most X11-based interfaces do cut and paste is to run a pasteboard server application - on OS X, it's called "pbs", you can find it with Activity Monitor. When you hit Cut or Copy, something is sent to the pasteboard. When you hit Paste, whatever is on the pasteboard is fetched. The downside to this is that running this pasteboard server is somewhat expensive, memory and CPU-wise. The middleclick thing avoids this - nothing is ever copied until you hit middleclick, then you copy directly to the receiving app. Technically, it's quite ingenious.
(Classic Mac OS did Copy/Paste in a different way. Without Multifinder, copied information was kept in the application memory space until an application was quit and then kept around in the system heap until a new app was launched. The new app then inherited this old pasteboard. With Multifinder, this little magic had to happen every time you switched applications, except it was copied directly to the other app. A system with protected memory can't work this way.)
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Jun 1999
Location: Las Vegas, NV, USA
Status:
Offline
|
|
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status:
Offline
|
|
Originally Posted by chabig
But doesn't that mean that once you've got a desired selection on the clipboard that you can't select anything else in the interim? Isn't that somewhat limiting?
Actually it's quite the opposite. As soon as you select something else what you lose what you had in the 'clipboard'. You always paste the last things that was selected. That may sound confusing, but when I'm editing code and need to shuffle stuff around nothing is faster than select and middle-click.
In the meantime I've stopped using the OS X shells (Apple's Terminal.app as well as others). I'm using the ultra-primitive xterm through X11 instead just so I get this copy/paste behavior.
|
•
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Aug 2004
Location: FFM
Status:
Offline
|
|
Originally Posted by P
When you hit Cut or Copy, something is sent to the pasteboard. When you hit Paste, whatever is on the pasteboard is fetched. The downside to this is that running this pasteboard server is somewhat expensive, memory and CPU-wise. The middleclick thing avoids this - nothing is ever copied until you hit middleclick, then you copy directly to the receiving app.
Mac applications can "promise" data to the pasteboard and the actual copying is then delayed till something is actually pasted.
Technically, [middle-click pasting is] quite ingenious.
I don't know. If lazy copying is really the reason for this then promises look cleverer to me and without the usability issues.
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Jun 1999
Location: Las Vegas, NV, USA
Status:
Offline
|
|
Originally Posted by Simon
As soon as you select something else you lose what you had in the 'clipboard'.
That was the point of my question. I think anything that can result in data loss should require user action. I would not try to deny you your choice of operating methods, it seems entirely appropriate that this is not the way most computers work.
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
Originally Posted by Simon
Actually it's quite the opposite. As soon as you select something else what you lose what you had in the 'clipboard'. You always paste the last things that was selected. That may sound confusing, but when I'm editing code and need to shuffle stuff around nothing is faster than select and middle-click.
In the meantime I've stopped using the OS X shells (Apple's Terminal.app as well as others). I'm using the ultra-primitive xterm through X11 instead just so I get this copy/paste behavior.
Simon, the new version of iTerm will allow you to middle click to paste. I use it for all of my Terminal work (which is a lot), it's FAR better than Terminal, even without this feature.
Now that I know this feature exists though, I might try it (it would require disabling the existing middle click function in the Mouse panel though)
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Aug 2004
Location: FFM
Status:
Offline
|
|
Did you guys ever even try Apple's Terminal application? Because I just did, and it does support this middle-click pasting.
(
Last edited by TETENAL; Feb 9, 2007 at 12:00 PM.
Reason: Fixed grammar (hopefully))
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status:
Offline
|
|
Originally Posted by TETENAL
Did you guys every even tried Apple's Terminal application? Because I just did, and it does support this middle-click pasting.
Mine doesn't.
|
•
|
|
|
|
|
|
|
|
Moderator
Join Date: Apr 2000
Location: Gothenburg, Sweden
Status:
Offline
|
|
Originally Posted by TETENAL
Mac applications can "promise" data to the pasteboard and the actual copying is then delayed till something is actually pasted.
Just marking the page copy on write or something fancy with the Notification Center?
Originally Posted by TETENAL
I don't know. If lazy copying is really the reason for this then promises look cleverer to me and without the usability issues.
Middle-click pasting is quicker than Cut-n-Paste. The only thing the Mac has that is as fast is drag-n-drop, and that wasn't developed until much later. And a Notification Center hack? Sure, that's pretty, if you have a Notification Center up and running. Slightly overkill for a pasteboard though, and it still uses more RAM than the other option.
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Aug 2004
Location: FFM
Status:
Offline
|
|
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status:
Offline
|
|
Originally Posted by TETENAL
It does for me. I have a regular 3 button mouse. Maybe you have a Mighty-Mouse and the fancy button assignments make it not work? Did you try to set the nipple to tertiary click?
Bingo. I owe you a beer. Thanks man!
|
•
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|