What is a writing that writes down every single word what one is thinking, called?
Stream of consciousness is, I think, what you are referring to.
- Stream of consciousness is a narrative mode, or device, that seeks "to depict the multitudinous thoughts and feelings which pass through the mind. Another term for it is 'interior monologue'."
(Wikipedia)
As a technique, this is called free writing. As a literary style, it is called stream of consciousness (as pointed out above) or écriture automatique, when referring to the French surrealist movement around Breton. Colloquially, I have also heard people refer to it as brain dump(ing), but this has a somewhat different connotation.
I believe you are thinking of stream of consciousness.