Set up a Text Editor for HDL

The course tools we distribute deal only with running, testing, and debugging your code. They are not good for editing code. To complete the coding portions of the projects in this course, you may use any text editor of your choosing. However, please note that we will be using programming languages that were invented for this course, so we don't recommend big heavy IDEs (Integrated Development Environments) like IntelliJ, Eclipse, Visual Studio, or JGrasp. They won't understand the languages well, and you won't need them to run code anyway because the course tools handle that.

Instead, we recommend you use a lightweight text editor like VSCode, Atom, or Sublime Text. Fortunately, there are third-party extensions that can provide syntax highlighting to make your experience more pleasant. Follow the directions below if you'd like to get set up with one of these editors! Note that the extensions listed below are not created by the course staff, and may not have been thoroughly vetted.

You are also welcome to use a command-line editor like Vim or Emacs if you prefer, although syntax highlighting support may be harder to find.

VSCode

Note: Visual Studio Code (this tool, lightweight editor) is different than Visual Studio (heavy IDE).

Install VSCode

Download the latest version at https://code.visualstudio.com/Download.

Configure Syntax Highlighting for .hdl Files

  1. Select the "Extensions" panel on the left menu bar (look for an icon near the bottom made up of four squares)
  2. Search for roblourens.vscode-nand2tetris-hdl
  3. Click "Install" on the single result that comes up

Atom

Install Atom

Download the latest version at https://atom.io/.

Configure Syntax Highlighting for .hdl Files

  1. Navigate to the "Settings" menu, then on the bottom left select "Install"
  2. Search for language-nand2tetrisHDL
  3. Click "Install" on the extension with exactly the same name

Sublime Text

Install Sublime Text

Download the latest version at https://www.sublimetext.com/3. Technically, the full editor costs money, but you may download and use a full-featured free trial for an unlimited period of time.

Configure Syntax Highlighting for .hdl Files

  1. Navigate to this public GitHub repository: https://github.com/t17dr/sublime-nand2tetris
  2. Follow the directions there to enable syntax highlighting support
  3. Restart Sublime Text

Acknowledgements and References