MarcWeber / vim-addon-local-vimrc

kiss local vimrc with hash protection
MIT License
146 stars 14 forks source link

local vimrc is sourced twice #14

Open mkarpoff opened 7 years ago

mkarpoff commented 7 years ago

With a fresh copy of the package. It sources the local vimrc files twice this is apparent because when I run vim with the following local vimrc file

echo "Sourcing local vimrc"

The message is printed twice. It is worth noting that I am using vim 8 and have this package installed in the start directory.

MarcWeber commented 7 years ago

vim -V20 /tmp/log -> The you may have an idea why it got sourced twice. Let me know if you find the cause.

mkarpoff commented 7 years ago

I read through it the log and it is definitily getting sourced twice. Unfortunatly I'm on a work machine so I can't upload the file but it looks like (I'm not very good with vimscript) the code that you are using to detect .vimrc files is finding it twice. It also prompted me if I wanted to source the vimrc twice when I initially launched vim.

mkarpoff commented 7 years ago

More searching and for some reason LVRRecurseUp is called twice

MarcWeber commented 7 years ago

More searching and for some reason LVRRecurseUp is called twice It doesn't happen to me. See :e $VIMRUNTIME/*.vim -> for first finish lines about how to prevent sourcing a file twice. That will be a workaround. I don't have time to investigate right now - SRY.