add `:lua =expr` example

pull/91/head
Timothée Sterle 2 years ago
parent 358b6b4273
commit 5f18514d21
No known key found for this signature in database
GPG Key ID: 136D558122196ED5

@ -432,6 +432,10 @@ put({1, 2, 3})
:lua put(vim.loop)
```
Alternatively, you can use the `:lua` command to pretty-print a Lua expression by prefixing it with `=` (Neovim 0.7+ only):
```lua
:lua =vim.loop
```
Additionally, you may find that built-in Lua functions are sometimes lacking compared to what you would find in other languages (for example `os.clock()` only returns a value in seconds, not milliseconds). Be sure to look at the Neovim stdlib (and `vim.fn`, more on that later), it probably has what you're looking for.

@ -528,6 +528,11 @@ or from the command-line:
:lua put(vim.loop)
<
Alternatively, you can use the `:lua` command to pretty-print a Lua
expression by prefixing it with `=` (Neovim 0.7+ only):
>
:lua =vim.loop
<
Additionally, you may find that built-in Lua functions are sometimes
lacking compared to what you would find in other languages (for example

Loading…
Cancel
Save