The Prophet (Allah bless him and give him peace) said:

 من كان يؤمن بالله واليوم الآخر فليقل خيرا أو ليصمت

“Whoever believes in Allah and the Last Day let him speak good or remain silent.”

[Bukhari and Muslim]

The Sufiya suggest that this applies to all types of talking. That is, of the tongue (speech) and that of heart & mind (active thinking)!