Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vim file specific .vimrc

Tags:

vim

I want spell checking to be enabled on vim when editing .txt or .md files. I added

setlocal spell spelllang=en_au

to .vimrc but that did spell checking for everything.

like image 397
nafis Avatar asked Aug 27 '11 06:08

nafis


1 Answers

This might be doable with an autocmd though I've never tried it:

autocmd BufNewFile,BufRead *.txt setlocal spell spelllang=en_au
autocmd BufNewFile,BufRead *.md setlocal spell spelllang=en_au
like image 97
kprobst Avatar answered Nov 08 '22 06:11

kprobst