embear / vim-localvimrc

Search local vimrc files (".lvimrc") in the tree (root dir up to current dir) and load them.
http://www.vim.org/scripts/script.php?script_id=441
GNU General Public License v3.0
484 stars 28 forks source link

uniq function not found #61

Closed nettrino closed 6 years ago

nettrino commented 6 years ago

Hello,

Thanks for the plugin! There are warnings due to uniq function missing in vim versions <= 7.3 (which is the default system vim in some OS X versions). Perhaps you could check for this explicitly as in other plugins?

embear commented 6 years ago

I added an check for uniq in commit bd0bf1e6cc80873ab7fea94158b3e70a209f5e9a. At least the warning should be gone. Nevertheless the functionality is missing. The list of sourced vim files will grow over time containing lots of duplicated files.

nettrino commented 6 years ago

Thanks for the prompt reply! The list will grow due to the persistent state right? If so why not simply create a dictionary as in the else clause of my original pointer?

embear commented 6 years ago

The list will grow because each time localvimrc is triggered through an autocommand the list of sourced files will be extended. The autocommand can be triggered very often during a editing session depending on the setting g:localvimrc_event. I implemented some kind of uniq() using sorted dictionary keys in commit 9f54491cc624a10e2348e5b051762d32249657e4

nettrino commented 6 years ago

Thanks for the updates!