Puppet-short I don’t know if you’ve write with emacs/vim or any other classical tool editor, a manifest or a Puppet module. If you did it, I’m pretty sure you’ve made a lot of syntax errors or got errors during catalog compilation. During a long time, I was using Geppetto to help me on writing and suggesting better syntax to my manifest.

I took the latest available version of Geppetto but it crashes all the time. As I can’t work without assistance manifests (because it’s a nightmare when you don’t do it day to day), I reminded that I saw a vim puppet plugin. After some little searches, I found it easily on Github.

I tried it and searched on other interesting help with vim to write manifests and here is what I found :

  • Tabular : help to get aligned ‘=>’ chars in manifests. Easy to use and works very well
  • vim puppet : syntax color for manifests
  • Syntastic : help on syntax errors, check errors on each saving file
  • ultisnips : help to write blocks like file, cron, class… simply with tab key

With those plugins I’ve got everything running easily. To install all of them, I use a tool that I already talk in last posts called Vundle. So to get this great Puppet environment for vim, add those lines to your ~/.vimrc file :

gmarik/vundle
godlygeek/tabular
rodjek/vim-puppet
scrooloose/syntastic
SirVer/ultisnips

And now call from the vim to install every additional plugins :

vim +BundleInstall +qall

You can now edit a .pp and see the result by writing a simple manifest :-)

If you want to see my vim configuration, it’s available on my Git.