What Makes a Good Editor?

By | February 29, 2020

In a previous post, I spoke a bit about why to you might want to learn vim. Despite the fact that I prefer vim as my programming editor, I would never argue that everyone should use it. For some of people, vim meshes with the way they think. In my case, it wasn’t an immediate match, but as I came to understand the editor, it made more sense to me. For that reason, the features that I think make a good editor will be influenced by my choice of tool. However, most of what I think is critical is supported by almost every good programming editor.

Programming Editor

There are a number of types of programs that are available for entering and changing text. Not all of them are suitable for programming. A good programming editor must support features that support the work of programming: writing and editing code.

Programs are not just text, the structure of the program is usually as important as the text itself. Which means the features you will use to edit code are different than for working with normal text.

Major Features

Not all features for editing programs are the same. Let’s start with the more critical features. A decent programming editor would need to have a majority of the following:

  • language support
  • syntax highlighting
  • ability to quickly move around in a file
  • editing commands beyond insert, delete, copy, and paste.
  • automatic indention
  • search/replace with regular expressions

The more powerful editors have all of the above features and more. Some more powerful features would include:

  • tools to reduce repetition
    • ability to repeat a command
    • ability to repeat a series of commands
    • ability to script functionality
  • replaceable snippets
  • ability to quickly re-arrange code
  • ability to interface with other programming tools
    • compiler/interpreter
    • version control
    • static analysis tools
    • testing tools
    • tagging tools
    • documentation support

Other programming editors have more specialized features, such as

  • code folding
  • refactoring support
  • code completions (deep knowledge of particular languages)
  • ability to run tools in the background/continuously
  • support for some form of plugins to extend functionality

Some Programming Editors

Many tools meet these criteria. For those who like vim, there’s also vi, neovim, and spacevim. For fans of emacs, in addition to GNU Emacs, there is also spacemacs. I know programmers that swear by TextMate, Sublime, and vscode. For tools that are tied more closely to a language you can go with Eclipse or IntelliJ.

All of these editors support some large subset of the features listed above and other features besides. None of them will make you a better programmer immediately, but they all provide the tools to help you program effectively.

Learning Your Editor

Once you’ve chosen your editor, you need to spend time learning how to make it your tool. You need to master its features. You don’t have to learn all of the features immediately (or ever). The more you learn and practice features, the more effective you will be with the editor.

As you learn features, you will find actions that once took several steps can be performed with a single keystroke or command. You will find that powerful commands can be modified so that they only work in certain areas of the code (changing one function instead of a whole file). Some of these features you will use daily, others more rarely. Each new command you learn makes you a more effective programmer.

Practice

A programming editor has a large number of powerful commands and features. No one uses all of them all of the time. The reality is that most of these commands will not be useful to you right away. You will need to try new commands and practice them until they become muscle memory. You want to be able to think make the change and have you fingers do it, rather than try to remember how to make a change.

In many ways, this is similar to working in a high-level language rather than assembler. Instead of wasting mental energy remembering how to make the change happen, we can just focus on the change itself.

Over the time I have been using vim, I have had several instances where I learned a command 3 or 4 times before it actually stuck. The first few times I just didn’t need the feature often enough to make it part of my toolbox. In many cases, a different project or a different workflow suddenly made a command I had found unnecessary to be exactly what I needed to solve a problem.

Conclusion

Being a great programmer is not a matter of picking the right editor. But not using a programming editor can be seen as a drag on your abilities. You will spend more time working on the mechanics of making changes, instead of spending that time on thinking about the changes. A good programming editor becomes a power tool that can let you perform more with less mental effort.

One thought on “What Makes a Good Editor?

  1. Letterdocuments

    Greetings from Florida! I’m bored at work, so I decided to browse your site on my iPhone during lunch break. I love the information you provide here and can’t wait to take a look when I get home. I’m surprised at how fast your blog loaded on my cell phone .. I’m not even using WIFI, just 3G. Anyways, awesome blog!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *