Improved way to set the formatprg based on filetype.