I would like to change the color of part of the command line, the stuff that's echo
'd from vim scripts. I know it can be different since when your search hits the bottom it prints a message in red text.
I tried to echo vt100 color codes but they were escaped instead. For example, :echo "\033[0;32m some text"
just prints those characters literally (except the escape, which is shown as ^[
)
Ideally I'd like to find a solution that works in both vim-gtk as well as the terminal UI.
:help echohl
echoraw()
function, like this:call echoraw("\033[38;5;124m")|echo "red text"
:h echoraw
. Maybe:call echoraw("\x1b[41m") | echo " red text" | call echoraw(" \x1b[0m") | echo "unformmated text"
isn't the way, is it?echon
works weirdly withechoraw()