Thank you very much for your answer. I have these lines in my .vimrc:
if has("autocmd") au BufRead,BufNewFile *.cls set filetype=tex au BufRead,BufNewFile sconstruct set filetype=python " Nes C syntax (used by TinyOS) au BufRead,BufNewFile *.nc set filetype=nesc au! Syntax nesc source ~/.vim/nesc.vim endif I use them to force a filetype for some files. Shouldn't I do that? I added your line among mine: au BufRead * set autoindent cindent smartindent And now it's working correctly. As I understand it, these options are disabled because I didn't add them to my other lines? But in this case, why other options aren't also disabled?