Text Editor
Software designed for creating and editing text files. It works with plain text and typically offers features such as character counting, find-and-replace, and syntax highlighting.
A text editor is software for editing plain text, which is pure character data without formatting information such as fonts, colors, or layout. Notepad on Windows, TextEdit on macOS, Visual Studio Code, Sublime Text, Vim, and Emacs are well-known examples. While word processors like Microsoft Word and Google Docs handle rich text (text with embedded formatting), text editors focus on the character data itself.
The character counting feature in text editors is a fundamental tool for writers and programmers alike. VS Code displays the line count and character count in the status bar at all times, and shows the count for selected text when a selection is active. Sublime Text shows the selected character count in its status bar. Notepad gained a built-in character count feature with Windows 11.
The definition of "character count" varies between editors. Does a newline count as one character (LF) or two (CR+LF), or not at all? Does a tab count as one character, or as its display width (4 or 8 spaces)? Is the BOM (Byte Order Mark) included in the count? These differences mean the same file can report different character counts depending on which editor you use.
Encoding handling is another critical feature. If an editor cannot correctly detect and convert encodings such as UTF-8, Shift_JIS, and EUC-JP, the result is garbled text (mojibake). VS Code auto-detects the encoding when opening a file and displays it in the status bar. Changing the encoding (for example, from Shift_JIS to UTF-8) can also be done directly within the editor. Text editor guides on Amazon cover encoding workflows in depth.
Programmer-oriented text editors offer advanced features including syntax highlighting (color-coding keywords by language), auto-completion (suggesting input candidates), regex-powered find-and-replace, multi-cursor editing (simultaneous edits at multiple locations), and diff views (visualizing changes between file versions). All of these features are built on string manipulation at the character level.
The choice of text editor can also affect the accuracy of character counting. When working with very large texts (hundreds of thousands of characters or more), editor performance becomes a factor. Notepad is slow to load large files, while VS Code handles files of several hundred megabytes comfortably. Real-time character counting requires the editor's internal data structure (such as a rope or piece table) to be designed for efficiency.