CHG: Moved sort function to ftplugin