如何在 gVim 中关闭自动复制到剪贴板

发布于 2024-09-27 13:50:52 字数 297 浏览 0 评论 0原文

当在(我的)gVim 中选择文本时,它会自动复制到剪贴板(X11 行为)。虽然这在 X11 下还可以,但在 Windows 和 Mac OS 中却开始让我烦恼。我确信这可以在某个地方关闭。但我就是找不到合适的帮助页面。可能使用了错误的 Google 搜索词和 :help

问题:我需要切换哪个 :set 设置才能使 Vim 表现得像 OS X 或 Windows,并且仅通过 Ctrl-C 复制到剪贴板。 (映射已经到位)

PS:在一家提供 IE 的公司工作,没有拼写检查 - 对此感到抱歉。

When a text is selected in (my) gVim then is copied automaticaly into the clipboard (X11 behavior). While this has been ok under X11 it starts to anoy me in Windows and Mac OS. I am sure this can be switched off somewhere. But I just can't find the propper help page. Probably using the wrong search term for Google and :help.

Question: Which :set setting do I need to toggle to make Vim behave like an OS X or Windows and copy to the clipboard only on Ctrl-C. (Mapping are already are place)

PS: Working from a company provided IE without spell check - sorry about that.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

暖风昔人 2024-10-04 13:50:52

必须有类似的内容

set clipboard=unnamed

您的 rc 文件之一中 。删除该行。欲了解更多信息:(

:help 'clipboard'

包括引号)

另请参阅:

:help x11-selection

You must have something like

set clipboard=unnamed

In one of your rc files. Remove that line. For more information:

:help 'clipboard'

(including the quotes)

See also:

:help x11-selection
花桑 2024-10-04 13:50:52

我在寻找这个问题的答案时遇到了你的问题。

将其添加到你的 .gvimrc 以禁用 VIM 中的自动复制

  " Following three lines remove the auto copy function from VIM
  set guioptions-=a
  set guioptions-=A
  set guioptions-=aA

I came across your question on the search for the answer to this problem..

Add this to your .gvimrc to disable autocopy in VIM

  " Following three lines remove the auto copy function from VIM
  set guioptions-=a
  set guioptions-=A
  set guioptions-=aA
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文