The echon
and echohl
commands are very useful for outputting lines of text with multiple highlight groups within the same line. This can be used to for instance create nice status messages for plugins.
In a plugin I am working on, I am using this exact method of outputting colored status messages. However, sometimes I would want to add these messages to the message-history
in a similar way to what you get with echomsg
. Is this somehow possible? I don't believe there are any intrinsic functionality for this, but perhaps one could add the functionality with vim script?
echon
andechomsg
work the same, except thatechomsg
adds messages to the history? You mentioned "I have been trying for some time now", you should tell us what exactly you've tried, what you expected to happen, and what did happen. That way we can try and fix the problem you're having (if any) or explain some misconception you might have. – Martin Tournoij Mar 11 '15 at 0:29echon
functionality combined with adding messages to the history. – Karl Yngve Lervåg Mar 12 '15 at 13:54