To edit properly in plain text, you’ll want to use an editing application designed for that purpose. There are lots of them to choose from.
TextEdit and Notepad
Both macOS and Windows ship with a plain-text editor installed. On a Mac, it’s named TextEdit. On a Windows machine, it’s named Notepad.
Notepad and TextEdit provide minimal functionality for plain-text editing. You can launch Notepad by going to the Start menu and typing “Notepad” in the search box. You can launch TextEdit from your Applications folder or by holding down the Command key (⌘) while hitting the Space key, then typing “TextEdit” in the Spotlight search box.
By default, TextEdit will open in a “rich text” interface and want to save your files with the .rtf extension. That’s great for creating documents that incorporate formatting such as bold and italic text, but as mentioned previously, .rtf files aren’t plain text files. (You’ll know you’re looking at an .rtf file in TextEdit if you see a formatting toolbar and ruler above your text.)
To make TextEdit useful for plain-text editing, you’ll want to change your settings to tell TextEdit to open new files as – you guessed it – “Plain text.”
Better Editors
Visual Studio Code is a plain-text editor from Microsoft that’s free to use and has a host of advanced features that will simplify your workflow and help you better understand the structure of your plain text documents. Widely used by developers, it has many capabilities that you’ll likely never need (unless you’re a developer), but it doesn’t hurt to have them.
Microsoft’s Visual Studio Code is based on free, open-source software. If you like the look, feel, and functionality of VS Code but would prefer to use the open-source version (because open, or because not Microsoft), and you’re comfortable installing software from the command line, you might be interested in VSCodium.
BBedit is a macOS plain-text editor that’s been around for decades. It, too, has a wide range of capabilities, making it a great choice for developers, but it also has an interface that users may find less intimidating. There’s a paid version and a more limited, free version. (For a period of time, the free version was known as “TextWrangler.”) The paid version isn’t subscription-based, so upgrading is optional (and offered at a discount).
Sublime Text is a widely used plain-text editor available for purchase from Sublime HQ. It runs on Mac, Windows, and Linux operating systems.
Syntax Highlighting
One major advantage of all the better plain-text editors is syntax highlighting. The text content of a plain-text file that holds data (e.g., .csv, .json, .xml) must adhere to a particular structure to be valid or operate as intended. The text content of a plain-text file that contains formatting instructions (e.g., .html, .md) contains tags or other symbols that must be applied properly for the formatting to be displayed as intended. Syntax highlighting makes it easier to see that a file’s content is properly structured and that tags or symbols have been properly applied.
Here’s a snippet of a .json file as an example.
{
"@context": "http://iiif.io/api/presentation/2/context.json",
"@type": "sc:Manifest",
"@id": "https://cdm16003.contentdm.oclc.org/iiif/p16003coll16:252/manifest.json",
"label": "Walden; or, life in the woods, [1854], Vol. 1",
"metadata": [
{
"label": "Call Number",
"value": "mssHM 924, Vol. 1"
},
{
"label": "Catalog Link",
"value": "https://catalog.huntington.org/record=b1852065"
},
{
"label": "Creator",
"value": "Thoreau, Henry David, 1817-1862."
},
{
"label": "Date Searchable",
"value": "1846; 1847"
},
{
"label": "Date",
"value": "[1846-1847]"
},
{
"label": "Description",
"value": "Manuscript (holograph, signed), partly in pencil, of \"Walden,\" including parts of early versions. Some leaves torn. "
},
{
"label": "Digital Collection",
"value": "Henry David Thoreau's Walden and Other Works, Huntington Digital Library"
},