1.1 Updates:
- none
Text Editors for programming and writing script files,
for writing HTML and for general use.
Every self-respecting student who uses computers should know how to read, edit and save text
files.
To write program code (and to do many other very useul things on computers) you need a text
editor that can read and write simple text files. For very simple programming you
can use the existing text editors that are already installed on Windows, Mac and Unix. It will
be extremely helpful, however, if your editor helps you to indent and to
balance parentheses, such as is provided by the easy-to-learn Atom editor (see below).
Word-processing editors like Word and Pages have all sorts of
behind-the-scenes formatting characters which cause programs to blow up. For
writing programs you need a simple text editor that shows you exactly
everything that is going into the file.
Example: When you write "Hello" into a text file (.txt), that is exactly what it
has in it: five characters from the alphabet. When you write "Hello" in a Word
document (.docx), it actually saves:
0000 0000 0000 0000 00b4 94cb 6ec2 3010 .........
00000240: 45f7 95fa 0f91 b755 62e8 a2aa 2a02 8b3e
00000250: 962d 52e9 0718 7b02 56fd 92c7 bcfe be13
00000260: 0251 5501 910a 6c22 2533 f7de 3356 c683
[Etc. for another 120 lines...]
So you can see why programs written in a word processor blow up!
Recommendations:
- For programmers, you can probably use your IDE editor for one
language or another. Eclipse, Intellij, and so on are all powerful
enough, and will allow you to edit text files.
- Many Students have used
Visual Studio VSCode which runs on Mac and Windows. Warning: it is huge . I
installed it on Windows and it ran fine. It took me 20 seconds to figure out how to edit .html
files. You can get rid of the annoying line numbers by entering "line numbers" in the search
box.
- Atom runs on Windows, Mac and Linux. It was developed as a GitHub
project. Sadly, it will no longer be officially supported after December of 2022 (Microsoft
bought GitHub). However, running binaries are still available for download. Search on "Download
Atom text editor" to find your preferred site. Be careful about download sites. With Atom you
can easily edit plain text files. It will balance your parentheses and indent for you, which
makes things MUCH easier when developing programs. For students who do not plan on doing much
programming this is a good option because (a) it is powerful enough, and (b) the learning curve
is not steep.
- For students who plan on using computers in their education and
career, Emacs is an extremely powerful editor. It runs on every operating system, and for
people like me it is the preferred editor for everything because
it is extremely efficient and you can configure it at will. I use it all day on Windows, Mac and
Unix. However, there is a steeper learning curve. For casual programmers, or those
who will always be working inside an IDE, I don't recommend it.
I provide help pages for installing Emacs and for configuring it in a way that makes it much
easier to use: See Emacs at DePaul to get started with this
very powerful editor. (I strongly recommend that you use my .emacs startup initialization
file to start.) If you are going to develop advanced programs in LISP (or are going to be
working on Linux) I recommend learning emacs. If you are only going to write a couple of
simple assignments in LISP I recommend using one of the other options instead. However, note
that I have taught many non-programmers to use emacs and have heard from many that this has
remained as their preferred editor for years (and even decades).
- Notepad++ runs natively on Windows (Windows key | Notepad++). Be SURE you
are using the ++ version which balances parentheses. In theory there is a
way to set up auto-indent to work, but I haven't figured it out. It does give you a
minimal bit of help with indentation with some shadow guide lines. When
you use File | Save As you MUST put double quotes around your file name
"MyFile.lisp" otherwise Notepad++ will save it as "MyFile.lisp.txt".
- ne ("nice editor") is an extremely basic text editor that runs on Mac
and Unix. It's only feature is that you can actually edit text files and
that it takes three minutes to figure out how to load and save
files. Beyond that, it will give you no help whatsoever.
- TextEdit runs on the Mac. It provides no help with parentheses
but is more powerful than ne. BUT you must always tell it to save your
program files as TEXT. To do this on the Mac use: Format | Make Plain Text
before you save. Warning: you will have to spend some time getting the
settings right: (a) save as a plain text file, (b) Don't add ".txt" to
the end of files you save. (c) change the name of the file by hovering
the mouse over the existing name. (d) etc.
-
Sublime Text Editor also has good reviews, though I have not tested it.
- I believe that the Eclipse (with plugin) and IntelliJ IDE
environments work with LISP, but I have not used them myself. You will have
to configure them. (Generally this is for programers.)
- Send me other suggestions and I will add them here.