Using nano for drupal development

nano is good and easy to use basic editor present on nearly ll *nix systems. it can be setup to utilize color syntax highlighting for your drupal development files. here is how: Make a dir for the nanorc include file.
sudo mkdir /etc/nano
make the following file in /etc/nano/drupal.nanorc (for example with nano)
## Here is an example for PHP
##
syntax "drupal" "\.module?$" "\.inc?$" "\.theme?$" "\.engine?$" "\.install?$" "\.tpl\.php$"
 
## php markings
color brightgreen "(<\?(php)?|\?>)"
 
## functions
color white "\<[a-z_]*\("
 
## types
color green "\<(var|float|global|double|bool|char|int|enum|const)\>"
 
## structure
color brightyellow "\<(class|new|private|public|function|for|foreach|if|while|do|else|elseif|case|default|switch)\>"
 
## control flow
color magenta "\<(goto|continue|break|return)\>"
 
## strings
color brightyellow "<[^=       ]*>" ""(\.|[^"])*""
 
## comments
color brightblue "//.*"
color brightblue start="/\*" end="\*/"
#color blue start="<" end=">"
#color red "&[^;[[:space:]]]*;"
 
## Trailing whitespace
color ,green "[[:space:]]+$"
 
## Drupal functions
## change to a color of your choice and add pipe seperated function names
## From: http://janaksingh.com/blog/using-nano-syntax-highlight-drupal-module-development-47 
color red "(drupal_bootstrap|drupal_goto|bootstrap_invoke_all|drupal_load)"
 
## From: http://grayside.org/2009/11/using-nano-drupal
# Drupal API functions
color blue "(arg|base_path|cache_get|cache_set|check_file|check_markup|check_plain)\W"
color blue start="drupal_" end="\W"
# Emphasize hooks in comments
color brightgreen start="hook_" end="\)"
Edit /etc/nanorc or ~/.nanorc to include the following line:
## Drupal files
include "/etc/nano/drupal.nanorc"
you now have syntax highlighting in nano for your drupal files. (p.s. make sue you include "/usr/share/nano/php.nanorc" if you are missing the highlighting for php files).

 

Bloemfonteinstraat 62, 
    room 1,2,9
5642 EH Eindhoven
phone: +316-81888456