I've learnt how to put variable value to file with this Stackoverflow link.
e.g. :let L = [1,2,3] :put string(L)
[1, 2, 3]
It seems the method mentioned in above link is dealing with the return value of an expression.
But, how to catch the content echoed by
echo command? Which I suppose is how
function FunctionName works, echo the content of a function to the screen.
As the echoed content shown in my vim interface, wouldn't they go to some register, or other kind of buffer?
Is it able to catch these echoed content and redirect them to file in vim?