anchor.diff:          call vam#Scripts(l, {})
         '');
   
  +      nativeImpl = lib.optionalString (packages != null)
  +      (let
  +        link = (packageName: dir: pluginPath: "ln -sf ${pluginPath}/share/vim-plugins/* $out/pack/${packageName}/${dir}");
  +        packageLinks = (packageName: {start ? [], opt ? []}:
  +          ["mkdir -p $out/pack/${packageName}/start"]
  +          ++ (builtins.map (link packageName "start") start)
  +          ++ ["mkdir -p $out/pack/${packageName}/opt"]
  +          ++ (builtins.map (link packageName "opt") opt)
  +        );
  +        packDir = (packages:
  +          stdenv.mkDerivation rec {
  +            name = "vim-pack-dir";
  +            src = ./.;
  +            installPhase = lib.concatStringsSep
  +                             "\n"
  +                             (lib.flatten (lib.mapAttrsToList packageLinks packages));
  +          }
  +        );
  +      in
  +      ''
  +        set packpath-=~/.vim/after
  +        set packpath+=${packDir packages}
  +        set packpath+=~/.vim/after
  +      '');
  +
         # somebody else could provide these implementations
         vundleImpl = "";
   
  
positive.code:   ${pathogenImpl}
    ${vundleImpl}
    ${neobundleImpl}
  
    filetype indent plugin on | syn on
  
  
negative.code:       set hidden
      '';
  
      # store your plugins in Vim packages
      vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; {
        # loaded on launch
        start = [ youcompleteme fugitive ];
        # manually loadable by calling `:packadd $plugin-name`
        opt = [ phpCompletion elm-vim ];
        # To automatically load a plugin when opening a filetype, add vimrc lines like:
        # autocmd FileType php :packadd phpCompletion
      };
  
      # plugins can also be managed by VAM
      vimrcConfig.vam.knownPlugins = pkgs.vimPlugins; # optional
      vimrcConfig.vam.pluginDictionaries = [
        # load always
  