Based largely on the vim irule editor on the devcentral.f5.com website.