Your Choice of Code Editors is Important
Let’s talk about editors. You know, code editors. Because that’s where we spend most of our time when developing web applications, writing code or modify existing scripts. Code editors are among the most important software that I use on a regular basis. In fact, and when measuring the time spent doing working tasks, it’ obvious that most of the productive time is spend within an editor.
This makes your choice of code editors really important.
So without further due, let’s take a closer look at why I use the code editors that I do. As the title already suggests, my favorite code editors are Vim & Geany. On the risk of starting yet another editor flamewar let’s take a look at VIM first:
Vim – Most Favorite Editor of All Editors
So here’s what Wikipedia has to say about the Vim text editor:
Vim (/vɪm/; a contraction of Vi IMproved) is a clone of Bill Joy’s vi text editor program for Unix. It was written by Bram Moolenaar based on source for a port of the Stevie editor to the Amiga and first released publicly in 1991.
Vim is designed for use both from a command-line interface and as a standalone application in a graphical user interface. Vim is free and open source software and is released under a license that includes some charityware clauses, encouraging users who enjoy the software to consider donating to children in Uganda.
As to sum it up, Vim is a great editor that is focused on productivity. It features to different modes – newbees sometimes takes a while to get comfortable with this – and it has a function on almost every key in its Normal mode. These keys significantly increase productivity, especially when editing code.
Main Advantages of Vim As a Code Editor
To me personally, the main advantages of Vim and some of the most important reasons I use it every day and with a whole lot of lovin’ are the following:
Cross-Platform Portability Vim is available on all platforms that I work on. From an old UNIX box to that OpenBSD firewall or any modern Linux distribution. Vim is always there, waiting for me to fire it up and start coding. Using Vim feels like coming back home so to say… home is where the Vim is!
Network Functionality Vim is the perfect editor to use over SSH. And it’s just so convenient to SSH into a remote server and edit configuration files or code directly on the remote machine. No need to download files, edit them locally and then upload them again to the server. Instead you just SSH in, fire up Vim and then :wq! when you’re done. Beautiful, simple and highly effective.
It’s worth to note also that because of the two modes Vim is using – Normal mode and Insert mode – it’s the perfect tool for using SSH over slow internet connections. And the original vi was created to be used over a 300 baud modem. Pretty neat, and still useful today!
While I’ve been using Vim since back in 1998, Geany is relatively new part of my daily screen. Geany was released in 2005, and I’ve using it as my main GUI code editor since ca. 2009. Geany is a GUI editor that’s part of the Debian and Ubuntu repositories.
For me, if you can’t “apt-get it” then it doesn’t really exist in my universe. But just so you know, that “apt-get Universe” is a really big one! 🙂
Geany – My Favorite GUI Code Editor
So if you haven’t installed Geany yet, now’s the time to do that. Just give it a simple “apt-get install geany” and it won’t take long before you have it.
danten@starlight:~$ apt-get install geany
As usual, apt-get will then take care of the rest. Time to fire up Geany!
On my screen, Geany ends up looking a bit like this:
Note that after a default install using apt-get, you’ll probably end up with black characters on a white background. Many prefer this, but personally I’m a fan of dark backgrounds with white or light colored writing. This makes it easier for me to concentrate on the coding. So how to get there? It’s easy:
Preferences => Editor => Display => Invert syntax highlighting colors
Geany has powerful features, while still being light and cross-platform portable. Here’s what the Geany site is telling us:
Geany is a small and lightweight Integrated Development Environment. It was developed to provide a small and fast IDE, which has only a few dependencies from other packages. Another goal was to be as independent as possible from a special Desktop Environment like KDE or GNOME – Geany only requires the GTK2 runtime libraries. Geany is known to run under Linux, FreeBSD, NetBSD, OpenBSD, MacOS X, AIX v5.3, Solaris Express and Windows. More generally, it should run on every platform, which is supported by the GTK libraries. Only the Windows port of Geany is missing some features.
Features of the Geany Editor
So as you can see, cross-platform portability is an important advantage of Geany. Here’s a brief overview of Geany’s more basic features:
- Syntax highlighting
- Code folding
- Symbol name auto-completion
- Construct completion/snippets
- Auto-closing of XML and HTML tags
- Call tips
- Many supported filetypes including C, Java, PHP, HTML, Python, Perl, Pascal
- Symbol lists
- Code navigation
- Build system to compile and execute your code
- Simple project management
- Plugin interface You might ask yourself why I’m not using Vim also as a GUI editor?
Because yes, Vim is indeed available as a GUI editor. Out of convenience I mainly use Vim from a shell or an X terminal (MATE Terminal on my current machine). It appears to me that Vim is made for a terminal, and thanks to the multitude of key shortcuts it seems counterintuitive to me to use a GUI version of Vim. For many years I’ve been using Geany as a quick note taking tool as well, but some years ago I realized how convenient and powerful it is to keep your ToDo lists and project track lists in Zim, a light desktop wiki that works really smoothly with the Getting Things Done (GTD) workflow. But this is another subject, for another post…