Getting Started with Plain-Text Editors

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

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.

Syntax Highlighting

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"
    },

Session 2 »