Sunday, December 6, 2020

Re: Autocommand bug when reloading file

On Sun, Dec 6, 2020 at 12:04 PM 'Paul' via vim_use
<vim_use@googlegroups.com> wrote:
> On Sun, Dec 06, 2020 at 08:10:29AM -0600, Felipe Contreras wrote:

> >What does "set et?" return initially?
> >
> >And what does it return 10 seconds later after the file is reloaded?
>
> You can see what is happening more clearly if you set the autocmds to echomsg something unique. When opening or :edit-ing a file, the FileType autocmd runs first, followed by the BufRead,BufNewFile autocmd. When gvim's W11 prompt triggers a "Load File", the BufRead autocmd runs before the FileType autocmd.

Yes, which is what I said in my original mail: "this seems to happen
because the order of the events is different opening, and reloading."

Now answer the question: why should that be the case?

--
Felipe Contreras

--
--
You received this message from the "vim_use" 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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAMP44s14ozGgGm3pgfr2Jtm8%2BOQQsx5pPZiTdBvkL-iRhBJxmw%40mail.gmail.com.

No comments: