kakrc: auto close matching block on insertion