
Some of the standards can be met by configuring Komodo Edit. There are a ton of things you'll have to keep in mind to keep your code to the standards of Drupal. That's it - Komodo Edit will check your syntax and recommend/auto-complete for all php and Drupal functions as you type. The PHP line should read "PHP Syntax Checking:Ready".

The Komodo project file allows for other helpful features such as project specific coding standards (see below) where you can configure special indenting and file saving preferences for a specific Drupal project (Drupal 6 settings and Drupal 8 settings perhaps).Īfter you've set everything right, restart Komodo Edit and click on the "Help > Check Configuration".

Once the project has been created Komodo will scan your Drupal source to populate it's code intelligence database without having to add PHP Directories in your preferences. You can also create a Komodo project in your Drupal projects root directory (Project > New Project). I only added Drupal 7 because that's the version I'm working with the most. Go into Configure PHP, and you'll want to add the Drupal directory or your site directories under "PHP directories". This will open a screen, click on the config icon on the same line as PHP. Launch Komodo Edit and go to the preferences of the PHP language (Edit > Preferences > Languages > PHP) or click on "Check Configuration" (Help > Check Configuration). Then, download the version of Drupal that you're using on your site(s) - or if you keep mirror copies of all your Drupal sites on your local machine already, then you could use those instead and pick up all the available functions. Make sure to install the same version that you run on your server.

If you want to enable syntax checking and auto-completion for standard PHP and Drupal functions in Komodo Edit, here's what to do:įirst you need to download and install PHP on your local machine (if you haven't). Code Intelligence / Completions and Syntax checking

Second is configuring Komodo Edit so that it's inline with the code standards. First you can enable the syntax checking for both PHP and Drupal. There a few things you can change in Komodo Edit to keep you Drupal coding clean. Komodo Edit is a free, open source editor and cross-platform (no more supported by Activestate, so it's possible that this doc is outdated).
