If you are using Linux, you will want a good text editor to use. Linux has very high quality text editors available, such as Vim and Emacs. But they are comparatively difficult to learn, and not free. In the long run, it is worth it, but you may not want to take the time when you are also starting to learn to program. If you are already familiar with these tools feel free to continue using them otherwise use nano.
Setting up Nano:
Nano is an comparatively simple text editor, but it still have certain valuable features like syntax highlighting and automatic indentation (so that you do not have to keep pressing tab all the time when you go to a new line in your program). Nano is based on an another editor called pico, which is a very simple editor to learn to use but that lacks many features required for programming.

You may already have nano. To find out, type nano in a terminal window. It may launch automatically. If not, and you get variant of
command not found
then you will need to install nano. You should follow the instructions for getting nano using your Linux distribution's package manager. I have written this section with version 2.2.4 of nano, but later versions should be very fine.
In order to take advantage of some best features of nano, you will need to set up a nano configuration file.
The configuration file for nano is called .nanorsc and like most Linux configuration files, your user specific configuration resides in your home directory (~/.nanorc)
If this file already exists, you can simply edit it otherwise, you should create it.
To configure nano properly, use the sample .nanorc file that comes with this book. It will provide you will nice syntax highlighting and auto-indentation, which will make editing source code much easier.
The configuration file for nano is called .nanorsc and like most Linux configuration files, your user specific configuration resides in your home directory (~/.nanorc)
If this file already exists, you can simply edit it otherwise, you should create it.
To configure nano properly, use the sample .nanorc file that comes with this book. It will provide you will nice syntax highlighting and auto-indentation, which will make editing source code much easier.

Post a Comment