When writing puppet modules I would recommend using an IDE when writing puppet code. The IDE from puppetlab is the most mature - Geppetto. Geppetto is fine, but one warning when installing it.
DO NOT install Geppetto as a plugin in an existing Eclipse. Instead I recommend downloading the bundle version http://puppetlabs.github.io/geppetto/download.html.