Session on the command line, a means of interacting with your computer programmatically through text.
«< Previous
«< Return to introduction
When it comes to editing text and writing code, you can use either a text editor or an IDE (Integrated Development Environment). Text editors tend to be more lightweight solutions, while IDEs try to provide a lot of features to help you write code and tend to target specific languages. There are a lot of exceptions to that description, but the distinction isn’t that important. Just know that editors will sometimes describe themselves as IDEs, and that there’s a slight difference in philosophy between them.
Textwrangler - Simple graphical text editor that is easy to use. If you’re used to the Mac way of doing things, TextWrangler should make sense to you. One potential disadvantage is that Textwrangler won’t do things like automatically indent Python code.
nano - GNU nano is a text editor that comes pre-installed in the OSX terminal. nano runs within your terminal window and can be surprising if you aren’t aware of its presence. For some operations (say you forget to write a commit message in git), nano will open so that you can insert text.
If in your terminal you type:
nano filename.txt
You will open the nano editor in the command line. You’ll see your terminal change to look something like this:
When you’re done typing to add text to the file, you can save the file by performing these three actions:
As mentioned above, IDEs offer more functions for testing code and running programs. Depending on the amount and type of programming you are doing, an IDE might be overkill. The IDE Index shows relative popularity of editors and IDEs based on search frequency.