The following ftdetect-file doesn't work as expected:
augroup dummy
au!
au BufRead bla* setf dummy
au BufRead bla* call s:detect_ft()
augroup END
echom 'one'
function! s:detect_ft() abort
echom 'two'
endfunction
It always displays only one
, regardless of the order of the two autocmds. The filetype dummy
is always correctly assigned, but the function s:detect_ft()
is never triggered.
Why? I don't see any reason this should not work?
:messages
list.