问题标签 [clipboard]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
1128 浏览

windows - 将系统剪贴板中的函数粘贴到 gVIM

以下是Windows系统剪贴板的内容

  • :function CurrentLineLength
  • : len = strlen(getline("."))
  • : 返回 len
  • :endfunction

我点击冒号然后控制 r 然后按 shift 8 粘贴系统剪贴板的内容。

我按回车键,vim 用 E488 返回:尾随字符

我在那里看到一些 ^M 字符,删除它们没有帮助。我确实知道我可以将函数粘贴到 .vim 文件中并以这种方式读取它们,因此它不会造成严重后果,但是当我通过一些 vim 脚本示例工作时,这将是很好的。

函数的输入方式是否有什么特别之处,或者是否可以从系统剪贴板中粘贴它们?

谢谢!

0 投票
28 回答
134208 浏览

macos - 如何将选择复制到 OS X 剪贴板

我在 Vim 中选择了一个区域。如何将其复制到 OS X 剪贴板?

(可以通过管道将 OS X 剪贴板写入到/usr/bin/pbcopy

0 投票
3 回答
186 浏览

clipboard - 最喜欢的剪贴板扩展

我在编写代码时使用同上剪贴板扩展,它非常适合复制变量名称、数据等。人们还使用哪些其他剪贴板扩展?

0 投票
4 回答
12386 浏览

linux - 无法将文件快速复制到 Linux 计算机中的剪贴板

我还没有找到一个简单的解决方案来将您的文件复制到 Linux 中的剪贴板,就像在 Mac 中一样

我尝试在 Vim 中使用以下命令失败

复制文件。

如何在 Linux 中快速将文件复制到剪贴板,然后将其粘贴到 dpaste?

0 投票
31 回答
676396 浏览

linux - 在 Bash 脚本中通过管道传入/传出剪贴板

是否可以在 Bash 中与剪贴板进行管道传输?

无论是与设备手柄之间的管道还是使用辅助应用程序,我都找不到任何东西。

例如,如果/dev/clip是一个链接到剪贴板的设备,我们可以这样做:

0 投票
1 回答
2702 浏览

asp.net - Can't paste into web form

A user complains they can't paste into one particular text box on a form and that this is a change in behavior that occurred three months ago. I can't reproduce the error. I've tried long text, short text, plain text, formatted text, everything works. I did fix some poorly formatted HTML, but it didn't change their problem.

The user and I are both using XP/IE7. The application uses a proprietary MVC framework with C# on .NET 1.1. The UI only works reliably in IE. (I tried Opera and the paste works, I can't get logged in with Firefox to get to the screen.)

Any ideas where to start?

Thanks!

Edit - here's dialog I had with the user that didn't bring to light any issues.

You were actually on the right track in asking about the firewall, because you are trying to identify something that is different between me and you. Here's some other potential differences.

Maybe we aren't doing it the same way: Do you use keyboard shortcuts (Ctrl-C, Ctrl V) or the context menu (right mouse click and select copy/paste)?

Maybe our computers are different: What hardware (Windows/Mac), operating system (XP, Vista, etc.), and browser (IE, Firefox, etc.) are you using?

Maybe our understanding of the problem is different: Do you not see the text when you paste it in, or is it not being saved?

Maybe what we are copying from is different: I copied something from Bugzilla and something from notepad. Both are plain text. I need to try formatted text, like from a PDF and from Word. You need to try plain text.

0 投票
4 回答
2342 浏览

delphi - 如何将任意数据作为文件复制到剪贴板?

我们开发了一个数据库应用程序。用户要求一项新功能:将 blob 复制到剪贴板,以便 Windows 资源管理器可以将它们粘贴为新文件。一种解决方案是将 blob 保存到临时文件夹中,并将这些临时文件添加到剪贴板。

但我正在寻找更好的解决方案。是否可以在 Windows 资源管理器中挂钩粘贴操作并自己将 blob 保存到目标路径?

0 投票
1 回答
5040 浏览

javascript - 在javascript中将剪贴板数据作为数组获取

有没有办法在 JavaScript 中操作剪贴板数据?

还有一种方法可以实现视觉工作室***

Ctrl+Shift+V

循环粘贴剪贴板数据的选项?

0 投票
1 回答
393 浏览

java - 有没有办法在 java 中获取 WordprocessingML 剪贴板内容?

我有一个客户管理它将 WordprocessingML 内容粘贴到我们的应用程序中。据我所知,这是从 Word 2000 直接复制和粘贴到我们的 Java 应用程序。我尝试了每个 Word 和 Java 版本的组合,但我无法重现这种行为 - 特别是因为我们的应用程序过滤了 HTML 和 text/plain。

我很确定旧版 Office 有自己的剪贴板并且只导出格式,这些格式应该可供其他程序使用。我知道的每个办公版本(可能除了 2007 年)都导出 HTML、RTF 和纯文本。

有没有办法将 WordprocesingML 内容放入剪贴板,并可能让 Java 混合数据风格

0 投票
1 回答
1461 浏览

vb.net - 如何使用 VB.NET 从压缩文件夹中使用剪贴板复制和粘贴文件

如何使用VB.NET从压缩文件夹中使用剪贴板复制和粘贴文件?

我想从剪贴板粘贴一个文件,该文件已使用 VB.NET 从压缩文件夹中复制。通过检查剪贴板,我看到有一个 FileGroupDescriptorW 似乎包含有关该文件的一些信息。但是我如何使用这些信息来抓取文件并粘贴呢?