Drupal Editors

After trying many different text editors and IDEs I've settled on Vim. If you don't already use Vim, I highly recommend checking it out. It has a bit of a learning curve, but it's worth it because it makes text editing much easier.

Also, because you will probably doing some Drupal work over SSH, Vim is ideal because it is most likely available when accessing your server over SSH.

If you are new to Vim, you might want to start with Cream—an easy to use version of Vim. Also work through some Vim tutorials. Print out some Vim cheatsheets and paste them next to your desk, or keep them available on your desktop. After getting used to the commands, switch from Cream to Gvim (shown below, running on Ubuntu GNU/Linux).

Gvim and Drupal

If you already use Vim, check out the configuring Vim for Drupal page on Drupal.org. It has some great tips.

I normally set my Vim to indent with four spaces. However, Drupal coding standards require only two spaces. One neat trick mentioned on the Vim for Drupal page is that you can place the following modeline at the bottom of any of your source code files and Vim will automatically apply those settings to the file every time you open it:

// vim: set filetype=php expandtab tabstop=2 shiftwidth=2 autoindent number smartindent:

(My version is slightly different than the one on Drupal.org because I've added number which tells Vim to add line numbers to the file when I open it.)

For more information on modelines, type :help modeline into Vim.

If you prefer another editor, Drupal.org also has information on configuring Emacs and Eclipse for Drupal.

If you are looking for a simpler kind of text editor just as a replacement for Windows Notepad, maybe try HTML Kit (Windows-only, though possible to run on Linux with WINE), PSPad (Windows), SciTE (Windows or Linux), or Notepad++ (Windows-only). If you are using Linux, try Quanta Plus. I don't have a Mac so I'm not sure what editors are available for it other than Emacs and Vim.