[vim/vim] feat(gui_w32): support 'guiopacity' on MS-Windows (PR #18918)

20 views
Skip to first unread message

Mao-Yining

unread,
Dec 13, 2025, 12:34:52 PM (3 days ago) Dec 13
to vim/vim, Subscribed

Implements the 'guiopacity' ('gop') option for the Win32 GUI version of Vim, allowing users to adjust the transparency of the main GUI window.

Use float instead of number to independ from platforms.

default.png (view on web)

It seems that TUI also has opacity. Should I rename it as 'opacity' or 'backgroundopacity'?


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

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

Commit Summary

  • 5f8d8ee feat(gui_w32): support 'guiopacity' on MS-Windows

File Changes

(7 files)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18918@github.com>

Mao-Yining

unread,
Dec 13, 2025, 1:16:13 PM (3 days ago) Dec 13
to vim/vim, Push

@mao-yining pushed 1 commit.

  • 6d10b67 feat(gui_w32): support 'guiopacity' on MS-Windows


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18918/before/5f8d8eed7b66df6fda85cbce76cd31f0d65cc4ea/after/6d10b67462e8a50ec6d5b0ec93dd9ca63b5aa642@github.com>

Mao-Yining

unread,
Dec 13, 2025, 1:27:29 PM (3 days ago) Dec 13
to vim/vim, Push

@mao-yining pushed 1 commit.

  • f23d648 feat(gui_w32): support 'guiopacity' on MS-Windows

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

Mao-Yining

unread,
Dec 13, 2025, 2:00:14 PM (3 days ago) Dec 13
to vim/vim, Push

@mao-yining pushed 1 commit.

  • fa3e249 feat(gui_w32): support 'guiopacity' on MS-Windows

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18918/before/f23d64856ae39495186d3bf454e9c56b5f49ea81/after/fa3e2492c91a7c1b813dbc762d5e1fb478c6db51@github.com>

Mao-Yining

unread,
Dec 13, 2025, 2:19:28 PM (3 days ago) Dec 13
to vim/vim, Push

@mao-yining pushed 1 commit.

  • 8d1e6fc feat(gui_w32): support 'guiopacity' on MS-Windows

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18918/before/fa3e2492c91a7c1b813dbc762d5e1fb478c6db51/after/8d1e6fcd0d97e836378e5384428b02b582c74ecf@github.com>

Mao-Yining

unread,
Dec 13, 2025, 11:32:50 PM (3 days ago) Dec 13
to vim/vim, Subscribed
mao-yining left a comment (vim/vim#18918)

Since this is my first time implementing an 'option', there might be some unavoidable mistakes. If so, please point them out.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18918/c3650198475@github.com>

Mao-Yining

unread,
Dec 13, 2025, 11:46:19 PM (3 days ago) Dec 13
to vim/vim, Subscribed
mao-yining left a comment (vim/vim#18918)

although this is marked as "float" but it is implement as "char_u*". The advantage is that it handles input very well, such as it won't overflow, but there can be issues when outputting variable values, e.g., let a = &guiopacity. a is a string.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18918/c3650207924@github.com>

Mao-Yining

unread,
Dec 14, 2025, 12:40:19 AM (3 days ago) Dec 14
to vim/vim, Push

@mao-yining pushed 1 commit.

  • cffe212 feat(gui_w32): support 'guiopacity' on MS-Windows

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18918/before/8d1e6fcd0d97e836378e5384428b02b582c74ecf/after/cffe2125ffb0b061f01639f4dc727751a8f0ce8b@github.com>

Mao-Yining

unread,
Dec 14, 2025, 12:40:54 AM (3 days ago) Dec 14
to vim/vim, Subscribed
mao-yining left a comment (vim/vim#18918)

change it to a 'number' option


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18918/c3650256102@github.com>

Mao-Yining

unread,
Dec 14, 2025, 12:44:10 AM (3 days ago) Dec 14
to vim/vim, Push

@mao-yining pushed 1 commit.

  • 40f8e5f feat(gui_w32): support 'guiopacity' on MS-Windows

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18918/before/cffe2125ffb0b061f01639f4dc727751a8f0ce8b/after/40f8e5fcf9187cd476d12db13386278b76dd0a84@github.com>

Christian Brabandt

unread,
Dec 14, 2025, 10:47:09 AM (2 days ago) Dec 14
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#18918)

Thanks, but I feel that goes a bit too far.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18918/c3651532120@github.com>

Maxim Kim

unread,
Dec 14, 2025, 6:50:37 PM (2 days ago) Dec 14
to vim/vim, Subscribed
habamax left a comment (vim/vim#18918)

Emacs has similar thing from 2022: https://kristofferbalintona.me/posts/202206071000/

However alpha-background in emacs only adds transparency to background, not to all window elements, making it similar to what modern terminal emulators do. I don't think current implementation where toolbar, menubar and title bar are affected by transparency is what gvim needs.

I would support it otherwise.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18918/c3652393762@github.com>

dkearns

unread,
Dec 15, 2025, 11:07:23 AM (yesterday) Dec 15
to vim/vim, Subscribed
dkearns left a comment (vim/vim#18918)

It seems to me we should just do what's needed, if anything, to allow this to be controlled by other tools rather than offer a specific option to configure it from within Vim.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18918/c3656439741@github.com>

Reply all
Reply to author
Forward
0 new messages