A text editor is a computer program that allows users to enter, edit, store, and print text files. It provides an empty display screen where users can add text line by line. Text editors differ from word processors in that they do not add formatting codes to documents. This makes text editors better for writing code that needs to be compiled since compilers can be confused by formatting codes.