use 'lib/pattern' to parse patterns and paste formats into buffers