Ishmael文本编辑工具的开发者推出了一项名为"Ghost Cut"的功能,试图解决困扰文字处理器、代码编辑器和浏览器数十年的剪切粘贴问题 [1]。
传统剪切粘贴存在三大缺陷 [1]:剪切操作无法完全撤销、剪切会导致文档重排、以及剪切和粘贴的组合不构成原子操作。Ghost Cut通过改变工作流程来规避这些问题 [1]。在这套新机制中,用户按下Ctrl+X后,被剪切的文本不会进入剪贴板,而是在文档中显示为灰显状态并变为惰性 [1]。随后按Ctrl+V会将灰显文本从原位置移除并粘贴到光标处,整个操作可通过一次撤销完成 [1]。若用户按下Escape,灰显的文本将恢复正常 [1]。
这种设计使文本移动变为原子操作,既不污染剪贴板,也避免了传统剪切粘贴的中间态问题 [1]。有使用者表示:"我很少在不紧接着粘贴的情况下使用剪切,所以这对我来说是明显的改进" [1]。
类似的灰显剪切机制在Excel等应用中已存在,但在文本编辑器中较为少见 [1]。
A developer has introduced "Ghost Cut," a new feature in the text editor Ishmael designed to address longstanding problems with cut-and-paste operations that have plagued word processors, code editors, and browsers for decades. [1]
The feature works by rendering cut text in a grayed-out state within the document rather than immediately moving it to the clipboard. [1] When users press Ctrl+X, the selected text becomes inactive and visually dimmed; pressing Ctrl+V then removes the grayed text from its original location and pastes it at the cursor position, while pressing Escape restores it. [1] This approach transforms the cut-and-paste operation into an atomic action that can be undone in a single step without contaminating the clipboard. [1]
The traditional cut-and-paste mechanism suffers from three primary deficiencies: cut operations cannot be fully reversed, cutting causes document reflow, and cut-and-paste lacks atomicity as distinct operations. [1] Ghost Cut addresses these issues by keeping cut content within the document until it is explicitly moved or discarded.
Similar functionality already exists in applications like Excel, where cut cells display in a grayed state. [1] However, such approaches remain uncommon in text editors. One user noted the appeal of the innovation, stating: "I so rarely use cut without paste, that this is a clear win for me." [1]