Move messages stuff to ftplugin