Reputation: 63546
I want to print internal variables, like s:myvar
inside a .vim
file. My first instinct was to use echo s:myvar
and :source %
, but I had no luck.
Upvotes: 0
Views: 1516
Reputation: 63546
It turns out finish
was getting called before my echo messages.
Upvotes: 0
Reputation: 172540
I can understand how :echo
can cause errors (when given an invalid {expression}
), but there's very little to make :print
complain; it only allows 3 different [flags]
. (And it does not output to a printer, that's :hardcopy
!!!) Edit: this now looks out-of-place after the question has been totally rephrased
In any case:
| sleep 10
:echomsg
to have the output recorded and then recall previous errors and output with :messages
:set cmdheight=5
For a more advanced debugging solution, there's the Decho plugin.
Upvotes: 1