Python source files are plain text files, which are edited using text editors rather than word processors.

If you’ve completed an assignment using an online compiler and need to paste your work into a text file (e.g., for assignment submission), you can try one of the following text editors. Start with one of the Basic editors; if you feel adventuresome later in the course, you might like to venture into the territory of more Advanced editors.

Basic editors

Name Description macOS Windows Other

Atom

Free editor from the makers of GitHub

gedit

General-purpose text editor for open-source platforms

Notepad

Included with Windows (not to be confused with Wordpad)

Notepad++

Improved text editor for Windows

Sublime text

Beautiful and popular editor, but costs money

TextEdit

Included with macOS — click "Format > Make Plain Text"

Visual Studio Code

Can be used as a simple text editor or as a full Integrated Development Environment

Advanced editors

People who spend a lot of time editing text files (e.g., programmers) often use tools that optimize their workflows very heavily. There’s a bit more of a learning curve to the following editors, but the investment pays off in the long run: you have to learn a bunch of funny keyboard shortcuts, but the benefit is that you can do a lot with just a couple of keystrokes. There are no magic "build my program" buttons here, but if you’re thinking of going into Computer Engineering, you might want to try learning one of the Big Two text editors.

Vim

The classic "modal" editor (actually a whole family of editors). I may use NeoVim in class, particularly towards the end of the course. You might like to download Neovide (cross-platform NeoVim GUI), MacVim for Mac OS X or gVim for Windows.

Tutorials

Configuration

Here are some example config files (these are the ones I use):

Neovim
"Classic" Vim
  • .vimrc (startup configuration script for all Vim instances)

  • .gvimrc (startup configuration script for graphical Vim instances)

I also find YouCompleteMe (a code completion tool for Vim) to be invaluable.

Emacs

The other really popular editor among programmers. See: