Finally we come to the editor. I’ve saved this for last because the choice of editor is so personal for many people. There are lots of excellent editors you can use that will do just fine, and many people are partial to some specific editor.
My own favorite is Emacs and I highly recommend that everyone give it a try if you haven’t already done so. Most people probably won’t, and that’s fine, but here is why I like Emacs:
Emacs is extensible.
Emacs itself is essentially a Lisp interpreter that runs a variant of Lisp called, strangely enough, Emacs Lisp. The vast majority of the visible functionality is implemented as ELisp extensions loaded at run-time. Over the years lots of people have written ELisp packages that do everything you can imagine: color syntax highlighting of source code; interfacing with revision control systems; running debuggers from within Emacs; reading email; browsing the Web; playing games. It has been said that Emacs is actually a complete operating system cleverly disguised as a text editor. As a result, it makes a strong IDE in it’s own right.
The programability also lets you write your own customizations. My .emacs startup file has lots of little functions I’ve written, such as one that splits emacs into multiple editing windows in my preferred arrangement. I normally use this mode writing code and I’ll have headers files in the right windows and other code files in the left windows.
Emacs supports foreign languages, and not just European ones. Asian languages are fully supported and you can, for example, easily mix English, Japanese, and other languages all in one file. See here for an example, as well as a general tour of Emacs features.
But beware! Emacs was first created in the early 80’s and it’s user interface was designed both before the dominance of graphical interfaces, and before the standardization of keyboard commands. As a result, it can be very intimidating to new users. It does have menus and a toolbar just like any modern program, but it’s real power lies in the keyboard commands available for it, and they are not intuitive. For example, do you see the signature I use? “ctrl-x ctrl-s”? That’s how you save a file in Emacs. You can click on File->Save in the menu, but it’s a lot faster to simply use the traditional keyboard command “control-X control-S”.
Also, while Emacs is a powerful IDE, the purpose built IDEs like Code::Blocks and Visual Studio usually beat it some ways simply because they are designed from the ground up for development, while Emacs is a text editor with a general purpose extension mechanism.
From the command line as root
$ yum install emacs
From the command line, run
$ sudo apt-get install emacs
The Windows version can be downloaded from here. The latest version is in the emacs-23.2-bin-i386.zip file. Unzip that to your Program Files directory. Once you’ve done that, find the file C:\Program Files\emacs-23.2\bin\runemacs.exe, create a shortcut to it, and put that shortcut on your desktop or in your Start Menu as you choose.
Now you should right-click on the runemacs icon, select Properties, and change the “Start In” directory to something convenient, such as your My Documents folder.