Colored Replace

Post Reply
User avatar
tsuujin
Posts: 695
Joined: Fri Feb 26, 2010 12:59 am
Location: California
Contact:

Colored Replace

Post 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.

naftali
Posts: 138
Joined: Wed Jan 20, 2010 8:42 pm

Re: Colored Replace

Post by naftali »

Code: Select all

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

Post Reply