vim-localvimrc icon indicating copy to clipboard operation
vim-localvimrc copied to clipboard

Modeline Priority Fix

Open tiamat18 opened this issue 7 years ago • 1 comments

Here is a proposed fix for Issue #33. I noticed you closed that issue by suggesting a workaround, but this update should truly resolve it. Let me know what you think. Thanks!

tiamat18 avatar Oct 31 '18 18:10 tiamat18

Thanks for the pull request! I'm not really sure if retriggering the event is a good idea in general:

  1. Depending on the event that the user configured the retriggering might cause the modeline stuff to be read again. A user might have configured WinEnter.
  2. Retriggering might have side effects to other plugins.
  3. This doubles the number of autocommands that need to be processed. This might have a big performance impact depending what autocommands have been registered by other plugins or the user.

What I would like to have is a specific call/function/event that evaluates the modeline and only this.

One other solution to the original problem would be to use the event BufRead instead of BufWinEnter. This way the mode lines are applied after localvimrc has finished its work.

embear avatar Nov 05 '18 14:11 embear