Move text-handling code into after/ftplugin file