|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
*popup.txt* For Vim version 9.2. Last change: 2026 Feb
|
| 2 |
|
| 3 |
|
| 4 |
VIM REFERENCE MANUAL by Bram Moolenaar
|
|
@@ -21,6 +21,7 @@ Displaying text in a popup window. *popup* *popup-window* *popupwin*
|
|
| 21 |
Popup filter |popup-filter|
|
| 22 |
Popup callback |popup-callback|
|
| 23 |
Popup scrollbar |popup-scrollbar|
|
|
|
|
| 24 |
Popup mask |popup-mask|
|
| 25 |
4. Examples |popup-examples|
|
| 26 |
|
|
@@ -772,6 +773,13 @@ The second argument of |popup_create()| is a dictionary with options:
|
|
| 772 |
the popup window.
|
| 773 |
highlight Highlight group name to use for the text, stored in
|
| 774 |
the 'wincolor' option.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 775 |
padding List with numbers, defining the padding
|
| 776 |
above/right/below/left of the popup (similar to CSS).
|
| 777 |
An empty list uses a padding of 1 all around. The
|
|
@@ -1046,6 +1054,42 @@ A click in the lower half will scroll the text up one line. However, this is
|
|
| 1046 |
limited so that the popup does not get smaller.
|
| 1047 |
|
| 1048 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1049 |
POPUP MASK *popup-mask*
|
| 1050 |
|
| 1051 |
To minimize the text that the popup covers, parts of it can be made
|
|
|
|
| 1 |
+
*popup.txt* For Vim version 9.2. Last change: 2026 Feb 18
|
| 2 |
|
| 3 |
|
| 4 |
VIM REFERENCE MANUAL by Bram Moolenaar
|
|
|
|
| 21 |
Popup filter |popup-filter|
|
| 22 |
Popup callback |popup-callback|
|
| 23 |
Popup scrollbar |popup-scrollbar|
|
| 24 |
+
Popup opacity |popup-opacity|
|
| 25 |
Popup mask |popup-mask|
|
| 26 |
4. Examples |popup-examples|
|
| 27 |
|
|
|
|
| 773 |
the popup window.
|
| 774 |
highlight Highlight group name to use for the text, stored in
|
| 775 |
the 'wincolor' option.
|
| 776 |
+
opacity Opacity of the popup, a value between 0 and 100:
|
| 777 |
+
0 is fully transparent (background text fully visible)
|
| 778 |
+
100 is fully opaque (default, no transparency)
|
| 779 |
+
Values in between blend the popup background with the
|
| 780 |
+
underlying text, making it partially transparent.
|
| 781 |
+
Requires 'termguicolors' to be set.
|
| 782 |
+
Also see |popup-opacity|.
|
| 783 |
padding List with numbers, defining the padding
|
| 784 |
above/right/below/left of the popup (similar to CSS).
|
| 785 |
An empty list uses a padding of 1 all around. The
|
|
|
|
| 1054 |
limited so that the popup does not get smaller.
|
| 1055 |
|
| 1056 |
|
| 1057 |
+
|
| 1058 |
+
POPUP OPACITY *popup-opacity*
|
| 1059 |
+
|
| 1060 |
+
A popup window can be made semi-transparent by setting the "opacity" option.
|
| 1061 |
+
The opacity value ranges from 0 to 100:
|
| 1062 |
+
0 Fully transparent - the popup background is invisible and the
|
| 1063 |
+
text behind the popup is fully visible.
|
| 1064 |
+
100 Fully opaque (default) - the popup is not transparent at all.
|
| 1065 |
+
1-99 Partially transparent - the popup background is blended with
|
| 1066 |
+
the underlying text, making both partially visible.
|
| 1067 |
+
|
| 1068 |
+
The transparency effect requires using the GUI or having 'termguicolors'
|
| 1069 |
+
enabled in the terminal. Without it, the opacity setting has no effect.
|
| 1070 |
+
|
| 1071 |
+
When a popup is transparent:
|
| 1072 |
+
- The popup's background color is blended with the background text
|
| 1073 |
+
- The popup's text (foreground) remains fully visible and unblended
|
| 1074 |
+
- Text behind the popup is visible through transparent areas
|
| 1075 |
+
- The more transparent the popup (lower opacity), the more clearly the
|
| 1076 |
+
background text can be seen
|
| 1077 |
+
|
| 1078 |
+
This can be useful for:
|
| 1079 |
+
- Creating overlay windows that don't completely obscure underlying text
|
| 1080 |
+
- Showing contextual information without blocking the view
|
| 1081 |
+
- Creating visual effects and modern UI designs
|
| 1082 |
+
|
| 1083 |
+
Example with 50% opacity: >
|
| 1084 |
+
let winid = popup_create('Semi-transparent text', #{
|
| 1085 |
+
\ line: 5,
|
| 1086 |
+
\ col: 10,
|
| 1087 |
+
\ opacity: 50,
|
| 1088 |
+
\ })
|
| 1089 |
+
|
| 1090 |
+
The opacity can be changed dynamically using |popup_setoptions()|: >
|
| 1091 |
+
call popup_setoptions(winid, #{opacity: 80})
|
| 1092 |
+
|
| 1093 |
POPUP MASK *popup-mask*
|
| 1094 |
|
| 1095 |
To minimize the text that the popup covers, parts of it can be made
|
|
@@ -52582,6 +52582,10 @@ VERSION 9.3 *version-9.3* *version9.3* *vim-9.3*
|
|
| 52582 |
This section is about improvements made between version 9.2 and 9.3 and is
|
| 52583 |
work in progress.
|
| 52584 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52585 |
*changed-9.3*
|
| 52586 |
Changed~
|
| 52587 |
-------
|
|
|
|
| 52582 |
This section is about improvements made between version 9.2 and 9.3 and is
|
| 52583 |
work in progress.
|
| 52584 |
|
| 52585 |
+
Popups ~
|
| 52586 |
+
------
|
| 52587 |
+
- Support for transparency, see |popup-opacity|.
|
| 52588 |
+
|
| 52589 |
*changed-9.3*
|
| 52590 |
Changed~
|
| 52591 |
-------
|