<commit_before>func! vundle#installer#new(bang, ...) abort
  let bundles = (a:1 == '') ?
        \ s:reload_bundles() :
        \ map(copy(a:000), 'vundle#config#init_bundle(v:val, {})')

  let names = map(copy(bundles), 'v:val.name_spec')
  call vundle#scripts#view('Installer',['" Installing'], names)

  redraw!
  sleep 1m

  for l in range(1,len(names))
    exec ":+1"
    redraw!
    exec ':norm '.(a:bang ? 'I' : 'i')
    sleep 1m
  endfor

  redraw!

  call vundle#config#require(bundles)

  let helptags = vundle#installer#helptags(bundles)
  echo 'Done! Helptags: '.len(helptags).' bundles processed'
endf

func! s:sign(status) 
  if (!has('signs'))
    return
  endif

  exe ":sign place ".line('.')." line=".line('.')." name=Vu_". a:status ." buffer=" . bufnr("%")
endf

func! vundle#installer#install(bang, name) abort
  if !isdirectory(g:bundle_dir) | call mkdir(g:bundle_dir, 'p') | endif

  let b = vundle#config#init_bundle(a:name, {})

  echo 'Installing '.b.name
  call s:sign('active')
  sleep 1m

  let status = s:sync(a:bang, b)

  call s:sign(status)

  if 'updated' == status 
    echo b.name.' installed'
  elseif 'todate' == status
    echo b.name.' already installed'
  elseif 'error' == status
    echohl Error
    echo 'Error installing '.b.name_spec
    echohl None
    sleep 1
  else
    throw 'whoops, unknown status:'.status
  endif
endf

func! vundle#installer#helptags(bundles) abort
  let bundle_dirs = map(copy(a:bundles),'v:val.rtpath()')
  let help_dirs = filter(bundle_dirs, 's:has_doc(v:val)')
  call map(copy(help_dirs), 's:helptags(v:val)')
  return help_dirs
endf

func! vundle#installer#list(bang) abort
  let bundles = (a:bang) ? s:reload_bundles() : g:bundles
  call vundle#scripts#view('list', ['" My Bundles'], map(copy(g:bundles), 'v:val.name_spec'))
  redraw!
  echo len(g:bundles).' bundles configured'
endf


func! vundle#installer#clean(bang) abort
  let bundle_dirs = map(copy(g:bundles), 'v:val.path()') 
  let all_dirs = split(globpath(g:bundle_dir, '*'), "\n")<commit_msg>Mark installed buffer as not modified<commit_after>func! vundle#installer#new(bang, ...) abort
  let bundles = (a:1 == '') ?
        \ s:reload_bundles() :
        \ map(copy(a:000), 'vundle#config#init_bundle(v:val, {})')

  let names = map(copy(bundles), 'v:val.name_spec')
  call vundle#scripts#view('Installer',['" Installing'], names)

  redraw!
  sleep 1m

  for l in range(1,len(names))
    exec ":+1"
    redraw!
    exec ':norm '.(a:bang ? 'I' : 'i')
    sleep 1m
  endfor

  redraw!

  call vundle#config#require(bundles)

  let helptags = vundle#installer#helptags(bundles)
  echo 'Done! Helptags: '.len(helptags).' bundles processed'
endf

func! s:sign(status) 
  if (!has('signs'))
    return
  endif

  exe ":sign place ".line('.')." line=".line('.')." name=Vu_". a:status ." buffer=" . bufnr("%")
endf

func! vundle#installer#install(bang, name) abort
  if !isdirectory(g:bundle_dir) | call mkdir(g:bundle_dir, 'p') | endif

  let b = vundle#config#init_bundle(a:name, {})

  echo 'Installing '.b.name
  call s:sign('active')
  sleep 1m

  let status = s:sync(a:bang, b)

  call s:sign(status)

  if 'updated' == status 
    echo b.name.' installed'
  elseif 'todate' == status
    echo b.name.' already installed'
  elseif 'error' == status
    echohl Error
    echo 'Error installing '.b.name_spec
    echohl None
    sleep 1
  else
    throw 'whoops, unknown status:'.status
  endif
  set nomodified
endf

func! vundle#installer#helptags(bundles) abort
  let bundle_dirs = map(copy(a:bundles),'v:val.rtpath()')
  let help_dirs = filter(bundle_dirs, 's:has_doc(v:val)')
  call map(copy(help_dirs), 's:helptags(v:val)')
  return help_dirs
endf

func! vundle#installer#list(bang) abort
  let bundles = (a:bang) ? s:reload_bundles() : g:bundles
  call vundle#scripts#view('list', ['" My Bundles'], map(copy(g:bundles), 'v:val.name_spec'))
  redraw!
  echo len(g:bundles).' bundles configured'
endf


func! vundle#installer#clean(bang) abort
  let bundle_dirs = map(copy(g:bundles), 'v:val.path()') 
  let all_dirs = split(globpath(g:bundle_dir, '*'), "\n")
{'fraction_non_alphanumeric': 0.168821663820444, 'fraction_numerical': 0.0048792388387411565, 'mean_word_length': 4.189873417721519, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1528053', 'n_tokens_mistral': 1644, 'n_tokens_neox': 1573, 'n_words': 346}