November 2018
Beginner
330 pages
7h 21m
English
You can print the content of a variable (or the results of any operation) into a status line using echo:
echo g:animal_name
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:
:messages
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 ...
Read now
Unlock full access