Hola, como te dice Neftali tienes que tratar de identificar la ultima palabra escrita y de acuerdo a eso cambiar el color, lo que te pongo es solo un ejemplo, de hecho debes hacer muchos controles, el ejemplo que adjunta Neftali en el otro hilo seguro que esta completo, no lo he visto pero seguro que si.
Código Delphi
[-]
procedure TForm1.RichEdit1KeyPress(Sender: TObject; var Key: Char);
var
Palabra : String;
begin
if Key=#32 then
begin
With RichEdit1 Do
begin
Indice := PosEx(' ', RichEdit1.Text, Indice);
Palabra := Copy(text, Indice, Length(text)-Indice+1);
if Trim(Palabra)='algo' then
begin
SelStart := Indice;
SelLength := Length(RichEdit1.text);
SelAttributes.Color := clRed;
SelAttributes.Style := [fsBold];
SelStart := Length(RichEdit1.text);
SelLength := Length(RichEdit1.text);
SelAttributes.Color := clBlack;
SelAttributes.Style := [];
end;
Inc(Indice);
end;
end;
end;
Indice inicializas en 0, cada ves que escribas la palabra algo se te pintara de rojo.
Saluditos