跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[macOS] 文本编辑时, 如何恢复(或粘贴) Ctrl-U 删除的内容

发表于
因为公司要求, 也换到 Mac 有 2 年了可一直是稀里糊涂地按照 Linux 的方法用 Mac, 边用边学. 有个简单问题请教下.
我发现 Mac 在文本编辑时, 那些命令行 emacs binding 的快捷键都可以用, 比如 Ctrl-k 删除光标到行尾, 还有 ctrl-u 删除光标到行首.

在命令行里,我们还可以 ctrl-y 粘贴 ctrl-u/y(还有其它一些)快捷键删除的内容. 但是这个 ctrl-y 在 Mac 的编辑器里, 好像只对 ctrl-y 有效, 对 ctrl-u 无效.

这个有时候有点烦人, 特别是一行相对较长的情况, ctrl-u 后又后悔, 但回不去了.有些地方可以用 cmd-z 恢复, 但有时候又不行, 也不知道区别是什么.

如果想测试,v2ex 的回复文本框就可以. c-y 可以粘贴 c-k 删除的内容, 但 c-u 删除的却不行.(cmd-z 也不行)

所以, Mac 里恢复 c-u 删除到行首的内容的快捷键是?

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.