Top
Best
New

Posted by willm 6 hours ago

Ghost Cut – or why Cut and Paste is broken everywhere(ishmael.textualize.io)
93 points | 62 comments
throwawayffffas 3 hours ago|
Cut and Paste is three operations.

Cut is two operations copy and delete, copy is never undone by undo it should not be undone when you cut either. I cut, undo, ..., undo, and paste multiple times a day. It's a feature not a bug.

> Cut & Paste is not atomic

Yes because it's two different actions.

What does "Ghost Cut" do if you paste multiple times? Paste the cut text first and then what? The previous thing in your clipboard? Why does my editor need to read my clipboard if I am not pasting (to implement the rollback)? What if there was a secret key in there do we just hand it to copilot or whatever extension is running?

Cut is copy and delete plain and simple.

Cut and paste is a poor analogy in the file explorer, what the file explorer does is a move, "cutting" fills the first parameter and "pasting" fills the second. Hence the greying out and not doing anything until you paste. There is no clipboard for the filesystem. Also in the file browser it's extremely unlikely you would want to paste into multiple places, something not true in text editors.

EDIT:

Now listen I am not saying the proposed semantics are bad, to each their own, but it's a different operation all together the clipboard is not even required you could have a separate short cut that grays out the text and then moves it to where you want. The whole thing would be atomic called a move and be cleaner in all ways.

windward 2 hours ago||
>paste multiple times

Because you're trying to 'copy' it?

This feels baby-duck-y. No given mental model is more right than another. There's already not even a consistent model, because:

>Cut is copy and delete

So copy and delete! Or, in Vim and Emacs, just delete!

arijun 4 minutes ago||
> Or, in Vim and Emacs, just delete!

Off topic, but that’s actually my biggest pet peeve vim. You copy text one place to overwrite some other text, you delete the existing text and they you go to paste and… the buffer has been overwritten. It makes so much more sense to require users to hit the obvious, composable ‘yd’ in the cases they want to copy than an arcane incantation in the cases they want to overwrite text.

Mogzol 2 hours ago||
> I cut, undo, ..., undo, and paste multiple times a day.

Why would you cut + undo as opposed to just copy? Are they not the same operation at that point?

sharkjacobs 2 hours ago|||
I often cut + undo because seeing the cut is feedback which tells me the operation successfully put the content into clipboard. This is not always a guarantee especially in web apps, and sometimes I just have focus on the wrong window.
mjmsmith 1 hour ago|||
How can you be sure that the undo stack is in sync with the clipboard? Wouldn't cut+paste be a more reliable pseudo-copy than cut+undo?
jubilanti 2 hours ago|||
Have you used a clipboard manager? There are tons that you can configure with notifications and indicators, so you don't have to that.
nkrisc 1 hour ago|||
Having to install yet more software seems worse than the problem you’re suggesting it should solve.
vjulian 2 hours ago||||
I feel as though I’m reading the script to a Monty Python sketch.
croes 2 hours ago|||
Have you never copied, tried to paste and you pasted the wrong thing because copy failed?

Cut + undo, is copy with visual feedback

Diogenesian 4 hours ago||
This reads to me as the default behavior of "cut" makes certain usability choices that don't gel with the author's personal mental model and workflow, which is of course totally valid. But it is odd to see things described as a "flaw" instead of a choice.

The most glaring example seems to be the first: typically an accidental cut was intended to be a copy, not a delete, so leaving the text in your clipboard is a sensible design. I understand the author's perspective, and maybe OSes should have configurable "cut." But I think most people understand "undo" as "undo change to file" and not "undo change to file + OS state." In that sense the default behavior is not a flaw.

Again - the author's points about an alternative cut are reasonable, but they seem to appeal to a minority of users.

VerifiedReports 3 hours ago|
Yes, I disagree that the cited behavior is defective. But I respect his pointing-out of the shortcomings and offering other options.

I find myself using the clipboard-erasure "defect" somewhat frequently to cut something to the clipboard, and then undoing the change and using the clipboard contents. And this is specifically useful in a way that merely copying isn't... but at the moment I can't remember why, or whether I use this when programming or working around InDesign's many defects.

blt 3 hours ago||
It's really natural!

- make a bunch of edits

- decide I don't like all of them

- copy the part I want to keep

- undo a bunch

- paste the good part

This is copy, not cut, but it wouldn't work if the clipboard state was part of the undo system.

Mogzol 2 hours ago|||
The article isn't arguing that clipboard state should be part of the undo system, it is arguing that cut shouldn't touch clipboard state. In the "Side effects" section they mention if you want the contents to go to the clipboard, then you should use copy instead of cut.
VerifiedReports 30 minutes ago|||
Exactly, you've nailed it.
nlawalker 4 hours ago||
This is what Windows Explorer does when you cut a file, except it does also place it on the clipboard.

>pressing ctrl+x fades the selected text and makes it inert [...] Nothing is placed in the clipboard at this point

>What if you want the original semantics of cut? Ghost cut makes that two keys rather than one: copy to clipboard (control-C or command-C) followed by Backspace to remove it from the original document. I so rarely use cut without paste, that this is a clear win for me.

This is just as "broken" as the existing functionality, just in a way that the author prefers. It's a neat idea though, I like it, makes you wonder what would have happened in other apps if cut/paste was never developed as a system-wide, cross-app capability.

tectec 4 hours ago||
I don't think I would like this. He mentions Excel does something similar and Excel is my least favourite app to cut/copy/paste in.
varispeed 3 hours ago|
Half of the time it doesn't work as well.
kps 3 hours ago||
Star didn't have cut/copy/paste. Instead it had ‘copy to’ and ‘move to’ operations on the current selection, more like today's drag-and-drop. Some influential people decided that invisible fragile clipboard state was better than a copy/move-in-progress state.
panic 1 hour ago||
A 2012 historical retrospective on the subject from Larry Tesler (the NOMODES man himself): https://www.lri.fr/~mbl/ENS/FundHCI/2013/papers/Tesler-CutCo...

The issue he had with the “move to” operation is that it forced you into a mode where you had to pick a destination right away. I wonder if OP’s proposal was ever brought up at the time—it does seem like a promising middle ground!

QuercusMax 3 hours ago||
Probably was seen as too modal. Modal UI was very unfashionable for a while.
atq2119 4 hours ago||
I sort of see the point about undoing the changes to the clipboard, although it's not actually so simple. The clipboard is system-wide shared state -- what if another application changed the clipboard between the cut and the undo?

The other part of it ("ghosting" the cut) just seems like a matter of taste, and at some point you have to consider whether going against decades of established muscle memory in the users of your software is really worth it.

That said, it is a good idea to re-examine our assumptions every once in a while, so kudos for that.

layer8 2 hours ago||
> anything more than you are doing already. I call it "Ghost Cut", and it works like this: pressing ctrl+x fades the selected text and makes it inert—you can't click on the cut text and the cursor just kind of leaps over it, but it is still present in the document. Nothing is placed in the clipboard at this point and there is nothing to undo. If you decide you don't want to paste then hitting escape will restore the text to its active editable state.

What if you press Ctrl+X twice on separate regions and then press Escape (once)? Does it restore the state after the first Ctrl+X? So Ctrl+X pushes on a to-be-cut stack and Escape pops? Probably not.

Anyway, this looks like it means that the inability to undo the change in clipboard state is replaced by the inability to return to an earlier to-be-cut state. Or maybe the editor includes a Vim-like time-travel history that includes the to-be-cut state?

Regarding the clipboard state, given that the clipboard is an OS-level object, for me it makes sense that an application-level or document-level undo doesn’t undo changes in the OS object. Similarly, undo after Save doesn’t undo the change in the file system state. Of course, it’s fine to provide alternative editing operations in addition.

jerf 2 hours ago||
Cut and paste is broken everywhere because of the number of apps that think they know better and "fix" it.

My bitterness is compounded by being on Linux, where this is probably even more encouraged in GUI apps then in other OSes. But I still have enough independent arguments with web sites, on my phone, and even in the context of the same application at times to have valid complaints just based on those.

Clipboards don't get an independent undo dimension because most users can't handle it. They're pretty full up on dimensions. Clipboard managers at an OS level are the better solution for those who can than another app "fixing" the problem in some unique way.

dec0dedab0de 2 hours ago|
I wish the OSes wouldn't even expose to the applications anything about copy, cut, and paste. From the applications perspective it should be indistinguishable from any other io.
Y444 35 minutes ago||
>hitting escape will restore the text to its active editable state

This is the fatal flow of the whole thing, with this it stops being a drop-in replacement.

trgn 1 hour ago|
I consider myself reasonably competent, reached conventional milestones in a career in tech, did a thing here and there, and I'm reading this, sort of nodding along, and barely understand what's the issue again with cut&paste, there was one, which one ?, anyway, middle age you guys, it's real.
More comments...