ftplugin/mercury.vim: fix infinite loop at end of file, implement <F9> select function/pred/pragma, etc