Sunday, December 6, 2020

Re: Autocommand bug when reloading file

On Sat, Dec 05, 2020 at 05:51:14PM -0600, Felipe Contreras wrote:
>On Sat, Dec 5, 2020 at 7:38 AM 'Paul' via vim_use
><vim_use@googlegroups.com> wrote:
>
>Maybe you missed the most important part of my mail.
>
>Why does the file look completely different after loading it?

First you said you were doing something "similar to" autocmds, then you said they, or rather, "the defaults", were already in a ftplugin and you only used the autocmds "for simplification". Now I don't know what you *actually* have.

If you have autocmds in a ftplugin, the first load of such a filetype will execute the autocmd definition. The autocmds themselves won't be triggered, because until that point, they didn't exist. It's not until you load another such file filetype that the autocmds will trigger.

If that's not what you have, then please elaborate with specifics.

--
--
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/20201206114103.GA25058%40rainslide.net.

No comments:

Post a Comment