\(\newcommand{L}[1]{\| #1 \|}\newcommand{VL}[1]{\L{ \vec{#1} }}\newcommand{R}[1]{\operatorname{Re}\,(#1)}\newcommand{I}[1]{\operatorname{Im}\, (#1)}\)
Choosing an editor¶
Use a Single Editor Well
The editor should be an extension of your hand; make sure your editor is configurable, extensible, and programmable.
—From: “The pragmatic programmer” [HT00]
Being efficient means being able to use your tools well. If you are fluent in using your editor, you will be able think better. You will do better work more quickly and you will make fewer mistakes.
This is particularly so for a text file editor. Bear in mind that you will likely spend many hundreds of hours using this editor for various parts of your work over the rest of your career. Be careful with your choice, and consider investing time to learn an editor well.
If you do learn your text editor well, you will find yourself using it for many different tasks, including editing code, documents and configuration files.
Programmers are a strange bunch of people who are extremely intolerant of tools that waste their time or energy. Take their impatience seriously when you consider choosing your editor. No programmer would use Windows Notepad for writing code, and that is for a very good reason.
The two most well-known and fully-featured cross-platform general text editors are emacs and vim / gvim. These run on any platform. Atom is another open-source cross-platform general text editor.
No doubt you want to know what your instructors use for their daily work? No? Well, in any case, the answer is that Matthew and JB use vim.
vim¶
Vim is based on a classic Unix editor called vi. To quote from the about vim page:
Vim isn’t an editor designed to hold its users’ hands. It is a tool, the use of which must be learned.
To use Vim well, you have to practice using its commands, by following any one of several online tutorials. For example, you might try the openvim tutorial. The trick is to teach your fingers what to do so you don’t think about it any more. This takes a long time, budget a week of 30 minutes a day to start to feel comfortable.
If you do invest this effort, vim is an immensely satisfying editor to use, because you quickly find that your fingers remember what to do. A programmer’s joke about vim is that “the cursor follows your eyes”, because your fingers are moving the cursor around the text without any apparent thought or effort on your part.
It is relatively complicated to configure vim to its full potential. Please ask for help if you are interested to do this. It is time well spent.
Emacs¶
Emacs is a classic and highly configurable text editor originally written by the great Richard Stallman. It is quicker to learn than vim, probably harder to configure, and has great power. A good place to start is the emacs tour. About an hour of research and practice gets you far enough to learn how to start learning emacs.
As for vim, to use it well, it needs some practice to get used to the keystrokes used, and as for vim, this practice is amply repaid by very fluent movement and editing.
Emacs hard to configure, largely because it is so powerful. We are very happy to help with this if you are interested.
Atom¶
Atom is another open-source text editor that describes itself as “A hackable text editor for the 21st Century”. It has installers for OSX, Linux and Windows. It has many “packages” that can configure the editor in various ways, including setting it to use the same key combinations as vim (vim-mode, ex-mode) and emacs (emacs-mode). It integrates with git version control out of the box. It has useful features for development, such as the ability to run code from the editor and return the results to the editor window (see the hydrogen package).
Other editors that you might consider¶
We will support these editors too for anyone who wants to use them. If you prefer another editor, we will help as best we can.
This suggested set of editors comes from the top four editors from text editor competition with the addition of TextMate and PyCharm (because we know at least one very efficient coder who use these).
For any platform¶
Some people really like Sublime text. It is free to try, and the trial version does not expire, but if you continue to use it, the authors ask you to buy a license for 70 USD.
We have heard good things about PyCharm. This is a general text editor with features that allow it to be used as an integrated development environment for Python. See the PyCharm web site for more detail.
For OSX¶
textmate has some very serious enthusiasts among people who know what they are doing on OSX. There’s a free textmate download for UC Berkeley.
Suggestions?¶
If you have any other suggestions or recommendations, please let us know.