You can print the content of a variable (or the results of any operation) into a status line using echo:
One thing about echo, though, is that the output does not get logged anywhere and there's no way to view the message once it's dismissed.
For that, there's :echomsg (or :echom for short):
echom g:animal_name . ' is an animal'echom 'here is an another message'
To see the log of messages from this sessions, execute the following command:
Now, you can see every message we printed:
In fact, many operations log messages via echom. For instance, file write using :w does so:
Messages can be a powerful ...