Replies: 1 comment
-
sure
yes |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
sure
yes |
Beta Was this translation helpful? Give feedback.
-
I see that in async context
vim.print()
does stub and prints onlytable: 0x7f6d1deaa7a0
because it usesnvim_out_write
in its implementation (which can't be called in async context), whileprint(vim.inspect())
still works in async context.Other difference I see is with strings (only strings itself. Tables with any strings will be printed identically by both functions):
I tried printing global object
package
with both functions and output was identical.And as a "pro" for
vim.print()
: it accepts multiple arguments, whilevim.inspect()
accepts only 1.Also
vim.print()
additionally returns all arguments untouched.(Any more differences?)
So my questions are:
vim.print()
work in async context? (then issue should be raised)print(vim.inspect())
everywhere, especially in async contexts? (I havefunction P(a) print(vim.inspect(a)) return a end
in my config)Beta Was this translation helpful? Give feedback.
All reactions