虽然我从未尝试过,但这可能适用于autocmd:
autocmd BufNewFile,BufRead *.txt setlocal spell spelllang=en_au autocmd BufNewFile,BufRead *.md setlocal spell spelllang=en_au