3

你的笔记本里有几个剪切板?

 2 years ago
source link: http://blog.tangzhixiong.com/post-0036-clipboard.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

你的笔记本里有几个剪切板?

你的笔记本里有几个剪切板?

我也不知道有多少个,但一定比你想得多。

复制粘贴的剪切板

也就是最常用的 Ctrl+C 和 Ctrl+V。

在 Vim 里是 + 寄存器。在 Shell 里可以把 stdin 剪切进 xclip -selection clipboard,也可以从 xclip -selection clipboard -o 获取 Ctrl+C 里的数据。

鼠标选中文字的剪切板

在 Vim 里是 * 寄存器。这就是有道词典划词翻译的根本。1

其他

我只能说很多。比如 Windows 系统上,牛逼闪闪的 OneNote 可以把网页完美地粘贴,就一定用了什么黑科技。

我猜测是有一个普通的剪切板记录复制了的 plain text,但还有一些剪切板可以记录 Ctrl+C 时所处的软件。方便系统把网页片段转化成 Word 能识别的格式,保证样子不走形。

话说换回了 Ubuntu 现在又可以快乐地记录 log 了~可以把命令的输出返回到剪切板才是真好:

alias clip="xclip -selection clipboard"

Windows 系统在一点上超越了 Linux,那就是提供了一个自带的 clip 可以用 pipe 往 Ctrl+C 传数据。

CLIP

描述:
    将命令行工具的输出重定向到 Windows 剪贴板。这个文本输出可以被粘贴
    到其他程序中。

参数列表:
    /?                  显示此帮助消息。

示例:
    DIR | CLIP          将一份当前目录列表的副本放入 Windows 剪贴板。

    CLIP < README.TXT   将 readme.txt 的一份文本放入 Windows 剪贴板。

Refs and see also


  1. 最近发现 Vim 的两个剪切板在 Windows 是没有区别,*+ 都是 *。不知道是不是我没有配置好。

    顺便说说这两个剪切板怎么记。* (star) 存的是 selection 的内容,+ (plus) 存的是 primary clipboard 的内容。


TANG ZhiXiong, 2018. Generated by Pandoc on Travis CI. Fork Me on GitHub.

Related Issues not found

Please contact @district10 to initialize the comment


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK