[vim/vim] Expose clipboard formats to vimscript (PR #20151)

9 views
Skip to first unread message

Foxe Chen

unread,
May 6, 2026, 3:26:46 PM (yesterday) May 6
to vim/vim, Subscribed

Expose available formats of the clipboard registers to Vimscript. getreginfo() now has an entry called "formats" listing the formats of the clipboard register. getreg() can request arbitrary formats as blobs.

The naming scheme of formats is system dependent, on X11/Wayland it is generally mime types, Windows seems to have standard formats + custom formats, so there should be a way to expose the standard formats to the user. MacOS uses a Uniform Type Identifiers. I don't think the API should handle juggling different format naming schemes, other than maybe providing some generic format names that map to platform specific formats.

setreg() should be able to set formats to be copied to the clipboard, although that maybe is better off in its own PR.

  • Wayland
  • X11
  • Windows
  • GTK

Unfortunately I don't have a MacOS machine nor do I have experience with objective C, so I'll just have this feature not supported for MacOS until someone implements its.

Somewhat relevant Neovim issue: neovim/neovim#24164


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/20151

Commit Summary

File Changes

(4 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20151@github.com>

Foxe Chen

unread,
May 6, 2026, 9:51:10 PM (23 hours ago) May 6
to vim/vim, Push

@64-bitman pushed 1 commit.

  • f317e4f fix build warnings for now


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20151/before/a4d443ced99b900f7194a9e355cdd8b1be09a321/after/f317e4fd433354cc27d1601a230e400bd88bac74@github.com>

Foxe Chen

unread,
May 6, 2026, 11:04:03 PM (22 hours ago) May 6
to vim/vim, Push

@64-bitman pushed 1 commit.


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20151/before/f317e4fd433354cc27d1601a230e400bd88bac74/after/c699c5f0f350ff393a4e79b97af25f5c9665d887@github.com>

Foxe Chen

unread,
May 6, 2026, 11:05:38 PM (22 hours ago) May 6
to vim/vim, Push

@64-bitman pushed 1 commit.


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20151/before/c699c5f0f350ff393a4e79b97af25f5c9665d887/after/1274dcaae21f993d0cd6676ffe1bc9dd9b149e9e@github.com>

Foxe Chen

unread,
May 6, 2026, 11:08:05 PM (22 hours ago) May 6
to vim/vim, Push

@64-bitman pushed 1 commit.


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20151/before/1274dcaae21f993d0cd6676ffe1bc9dd9b149e9e/after/96d7eea3c65bdf1916809e6e90c84cf974ccc04f@github.com>

Foxe Chen

unread,
May 6, 2026, 11:11:32 PM (21 hours ago) May 6
to vim/vim, Push

@64-bitman pushed 1 commit.


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20151/before/96d7eea3c65bdf1916809e6e90c84cf974ccc04f/after/2ba6fd0aa71e25d964d2f49965a9e0a02f29b0de@github.com>

Foxe Chen

unread,
May 6, 2026, 11:16:16 PM (21 hours ago) May 6
to vim/vim, Push

@64-bitman pushed 1 commit.


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20151/before/2ba6fd0aa71e25d964d2f49965a9e0a02f29b0de/after/32e3b8ad6cc8f87fa74fb59822630f38f1d85a65@github.com>

Foxe Chen

unread,
May 6, 2026, 11:17:36 PM (21 hours ago) May 6
to vim/vim, Push

@64-bitman pushed 1 commit.


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20151/before/32e3b8ad6cc8f87fa74fb59822630f38f1d85a65/after/e8fa99bc5005e8495776bec3742f65da2a9f2dd2@github.com>

Foxe Chen

unread,
May 6, 2026, 11:22:38 PM (21 hours ago) May 6
to vim/vim, Push

@64-bitman pushed 1 commit.


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20151/before/e8fa99bc5005e8495776bec3742f65da2a9f2dd2/after/7cc895e8b77329f36e4b284f825b03a1d1fc8515@github.com>

Foxe Chen

unread,
May 6, 2026, 11:23:26 PM (21 hours ago) May 6
to vim/vim, Push

@64-bitman pushed 1 commit.


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20151/before/7cc895e8b77329f36e4b284f825b03a1d1fc8515/after/1ca471fb7a72c24f97f1d8bc3990b8a233e591b1@github.com>

Foxe Chen

unread,
May 6, 2026, 11:40:39 PM (21 hours ago) May 6
to vim/vim, Push

@64-bitman pushed 1 commit.


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20151/before/1ca471fb7a72c24f97f1d8bc3990b8a233e591b1/after/d563a1a1a9c91864bbd12f559f40d61db3938b32@github.com>

Foxe Chen

unread,
May 6, 2026, 11:59:18 PM (21 hours ago) May 6
to vim/vim, Push

@64-bitman pushed 1 commit.


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20151/before/d563a1a1a9c91864bbd12f559f40d61db3938b32/after/fd4f492e6414d566370ce7e0e87146326b849ec6@github.com>

Foxe Chen

unread,
12:02 AM (21 hours ago) 12:02 AM
to vim/vim, Push

@64-bitman pushed 1 commit.


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20151/before/fd4f492e6414d566370ce7e0e87146326b849ec6/after/e5f90e22fdff32e0c4248a9ce1cb59b33e181914@github.com>

Foxe Chen

unread,
1:01 PM (8 hours ago) 1:01 PM
to vim/vim, Push

@64-bitman pushed 1 commit.


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20151/before/e5f90e22fdff32e0c4248a9ce1cb59b33e181914/after/0a26813982d29d06f7228f88c906a3269c8e8886@github.com>

Foxe Chen

unread,
1:48 PM (7 hours ago) 1:48 PM
to vim/vim, Push

@64-bitman pushed 2 commits.

  • c5b2b69 support gtk gui
  • 6fa18f9 put stuff under +clipboard_formats feature


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20151/before/0a26813982d29d06f7228f88c906a3269c8e8886/after/6fa18f9a3f67cc921fb8a4496805525e696203e5@github.com>

Foxe Chen

unread,
1:50 PM (7 hours ago) 1:50 PM
to vim/vim, Push

@64-bitman pushed 1 commit.

  • a9eb761 put stuff under +clipboard_formats feature


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20151/before/6fa18f9a3f67cc921fb8a4496805525e696203e5/after/a9eb7610f7608041c4f50ee623cbc06773c5d6d4@github.com>

Foxe Chen

unread,
1:59 PM (7 hours ago) 1:59 PM
to vim/vim, Push

@64-bitman pushed 1 commit.

  • 4c42db3 put stuff under +clipboard_formats feature


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20151/before/a9eb7610f7608041c4f50ee623cbc06773c5d6d4/after/4c42db3a95b5298c7c50d8982e97fd42d6237ddd@github.com>

Foxe Chen

unread,
4:04 PM (5 hours ago) 4:04 PM
to vim/vim, Push

@64-bitman pushed 1 commit.


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20151/before/4c42db3a95b5298c7c50d8982e97fd42d6237ddd/after/5b50c553aa2ba8db7221c0702018a9c05e6c00a3@github.com>

Foxe Chen

unread,
4:27 PM (4 hours ago) 4:27 PM
to vim/vim, Push

@64-bitman pushed 1 commit.


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20151/before/5b50c553aa2ba8db7221c0702018a9c05e6c00a3/after/b73f3f1fb0071e08d528ab478aac9954839e76ee@github.com>

Foxe Chen

unread,
4:31 PM (4 hours ago) 4:31 PM
to vim/vim, Push

@64-bitman pushed 1 commit.


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20151/before/b73f3f1fb0071e08d528ab478aac9954839e76ee/after/be73c02762e3a68139abffd70bc098dfba0b7e39@github.com>

Foxe Chen

unread,
4:42 PM (4 hours ago) 4:42 PM
to vim/vim, Push

@64-bitman pushed 1 commit.


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20151/before/be73c02762e3a68139abffd70bc098dfba0b7e39/after/79d2294978e9b92818039a9e2f0c3ecb5d8e4f86@github.com>

Foxe Chen

unread,
4:56 PM (4 hours ago) 4:56 PM
to vim/vim, Push

@64-bitman pushed 1 commit.


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20151/before/79d2294978e9b92818039a9e2f0c3ecb5d8e4f86/after/91f83575aeb4c12bd6b2238d06f36850c084f4ce@github.com>

Foxe Chen

unread,
6:14 PM (2 hours ago) 6:14 PM
to vim/vim, Push

@64-bitman pushed 1 commit.

  • 62fcbfd fix when vim is owner of selection


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20151/before/91f83575aeb4c12bd6b2238d06f36850c084f4ce/after/62fcbfd690bffa78af7a05a20f9176ceeb88f50a@github.com>

Foxe Chen

unread,
6:15 PM (2 hours ago) 6:15 PM
to vim/vim, Push

@64-bitman pushed 1 commit.

  • 94a80e6 fix when vim is owner of selection


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20151/before/62fcbfd690bffa78af7a05a20f9176ceeb88f50a/after/94a80e61023a9230e64f5c7bbcd560e15cb07e3b@github.com>

Foxe Chen

unread,
7:35 PM (1 hour ago) 7:35 PM
to vim/vim, Push

@64-bitman pushed 1 commit.

  • d514d00 fix when vim is owner of selection


View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20151/before/94a80e61023a9230e64f5c7bbcd560e15cb07e3b/after/d514d007be97096c0ccc4e3c9811e979fd933e19@github.com>

Reply all
Reply to author
Forward
0 new messages