Page 1 of 1

Colored Replace

Posted: Mon Apr 05, 2010 5:40 am
by tsuujin
Basically, I'd like to be able to use replace() with colored tags the like of cecho(). Is there any way to do this currently? Sometimes I like to replace only certain words in a string, rather than have to reprint the entire string, and oftentimes I'd like the replacement to be colored in some specific way (I'm a huge fan of color-coded system messages).

Someone told me to use custom buffers at one point, but I could never figure out how to get them to work.

Re: Colored Replace

Posted: Mon Apr 05, 2010 11:11 pm
by naftali

Code: Select all

function creplace( with )
	replace( "" )
	cecho( with , nil, nil, true )
end
think that should do it.