2

I keep seeing mention of {what} here and there, mainly in eval.txt, popup.txt, terminal.txt, syntax.txt, and channel.txt.

From :h popup_create()

popup_create({what}, {options})

Open a popup window showing {what}, which is either:
                - a buffer number
                - a string
                - a list of strings
                - a list of text lines with text properties
                When {what} is not a buffer number, a buffer is created with
                'buftype' set to "popup".  That buffer will be wiped out once
                the popup closes.

I'm unsure on the meaning of {what}, though I did think it was supposed to be replaced with whatever was mentioned about it in the documentation.

I tried running popup_create({what}, {options}), and it always shows

E121: Undefined variable: what

What does {what} actually do generally speaking? Is it just a placeholder or something useful in and of itself?

4

From :h notation:

Curly braces denote parts of the command which must appear, but which can take a number of different values.

So, a placeholder.

1
  • Nice, guess I'll read notation.txt first next time :D Sep 13 '20 at 20:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.