What is a Text Editor?

When programming code, you need to be able to write in plain text. The term plain text means that the text is just letters, without any formatting (eg: nothing is bold, italic, formatted in tables or contains images). In general, if an editor can make something bold, it is NOT a plain text editor. In the context of programming, we always know that text is "plain text" so we commonly refer to these programs as simply text editors.

Microsoft Word, Wordpad (Windows), TextEdit (OS X), Google Docs, and other similar editors are NOT text editors and should NOT be used to write code. The file they save will not be understood by a computer. Instead, they are generally called "Word Processing".

The Wikipedia article on "Text editor" goes into more detail if you are interested in learning more!

Getting a Text Editor

Atom Text Editor

There are hundreds of text editors available, and Wikipedia has a list of about a hundred of them . Everyone has a different one that they prefer for a variety of reasons, so you are not required to use the one that we recommend. However, if you have not ever used a text editor, we recommend trying Atom.

Atom

In CS 105 lectures, you will see us using Atom. Atom is free, open-source software maintained by GitHub. It is a general purpose editor that provides a robust set of features without you having to set anything up!

If you are running OS X: If you want to install Atom, you need to drag the unpackaged app to your Applications folder. Otherwise, you will have to find it in your downloads every time you want to use it.

Using Atom

Opening a File: Option 1, Using "Open With"

Windows

Right click the file and choose Open with Atom:

Mac (OS X)

Right click the file and choose Open With and then Atom:

Opening a File: Option 2, Drag and Drop

Windows and Mac (OS X)

  • Arrange the screen so that both your file and Atom are showing.
  • Click and drag your file into Atom

Ensuring a File is Saved

Atom shows a blue dot when a file has been modified but not saved. Whenever you want to test your MP, Lab, or Activity, you must ensure the file is saved.

File is NOT saved -- save before you test your program!
File is saved!
To save the file:
  • Option 1: In the menu, navagate File -> Save
  • Option 2: Use Ctrl+S (Windows) or Command+S (Mac OS X)