How to convert the output of the type()
function, which is a number, into a verbal format, e.g. as described in help v:t_...?
To write my own mappings seems to be too cumbersome.
Presumably there exists a ready solution, but by googling I cannot find any.
Thanks, Regards Anton Wessel
=== addendum, Wessel, 23.11.2022
Thank you very much for your hint at the function typename(). I have overlooked it.
NOTES:
When writing such vimscripts, one should bear in mind:
The returned value of vim commands can be of type integer, string, and other. This is described in the documentation vim help.
This must be remembered by the programmer, but to be sure, the programmer should have displayed the typename.
When such a returned value has to be further processed as input parameter to command system(), the programmer has to use string() to convert a number type to a string type if necessary.
Since if to system() as input parameter a type integer is passed, vim gives an error message like
cannot open file <encrypted filename>
The meaning of this is not obvious initially. Since the programmer had not caused a file to be opened.
This is the file where system() automatically writes the argument into, as help says.
Regards
Anton Wessel