VimLocator: factor iterator handling out of providers.