2

I want to create a multi-color enabled debug-print command. As far I know, the only way to print multi-color messages in Vim is:

echohl Macro | echon "Hi" | echohl Statement | 
     \ echon " There!" | echohl None

I plan to utilize this technique. However there's a main drawback of echon — it isn't stored in any message history, not even in the single-past message recall command g<. I think that this limitation undermines the purpose of the debug-print function/command…

Is there some way to print multi-color and have the message remembered in some generally available history? So that the user of a plugin can restore the last messages and read them (because IMO it's mostly the case that when the user does something in Vim he out of an inertia enters 1-2 commands too much and they cancel the messages)?

1
  • Please post an answer with what you implemented in asciinema.org/a/357950 (from your comments on a now deleted answer.) Thanks!
    – filbranden
    Commented Sep 6, 2020 at 3:34

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.