In light of the discussion in the "Folding on markdown" thread in
the vim_use list and the confusion over the conditions under which
the BufRead event is used, I think those conditions should be
explained more fully under ":help BufRead".
Here is my proposed change to the help text.
*BufRead* *BufReadPost*
BufRead or BufReadPost When starting to edit a new buffer, after
reading the file into the buffer, before
executing the modelines. See |BufWinEnter|
for when you need to do something after
processing the modelines.
This does NOT work for ":r file". Not used
when the file doesn't exist. Also used after
successfully recovering a file.
+ Also used when executing ":filetype detect" or
+ writing an unnamed buffer, but only for
+ autocommands in the filetypedetect group.
A patch with this change is attached.
Regards,
Gary
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
*** vim.d915c19ad092/runtime/doc/autocmd.txt 2012-05-28 00:59:46.541339087 -0700
--- /usr/local/src/vim/vim/runtime/doc/autocmd.txt 2012-05-28 00:49:15.255786243 -0700
***************
*** 385,390 ****
--- 385,393 ----
This does NOT work for ":r file". Not used
when the file doesn't exist. Also used after
successfully recovering a file.
+ Also used when executing ":filetype detect" or
+ writing an unnamed buffer, but only for
+ autocommands in the filetypedetect group.
*BufReadCmd*
BufReadCmd Before starting to edit a new buffer. Should
read the file into the buffer. |Cmd-event|