From :h autocmd-nested
, it says "By default, autocommands do not nest." But nested FileType events are triggered anyway without using ++nested
. As seen in this test:
autocmd BufNewFile,BufRead tst setlocal filetype=tst | let b:tst = 1
autocmd FileType tst let b:tst = 2 | let b:filetype_event_triggered = 'true'
Running e tst | echo b:tst
prints 1
, showing that the FileType autocommand is run before let b:tst = 1
.
So is FileType event supposed to always run nested despite what the manual says, or am I missing something?
(Using vim 8.1)