<commit_before>" MIT License. Copyright (c) 2013 <NAME>.
" vim: et ts=2 sts=2 sw=2

let g:airline_statusline_funcrefs = get(g:, 'airline_statusline_funcrefs', [])

let s:sections = ['a','b','c','gutter','x','y','z','warning']
let s:inactive_funcrefs = []

function! airline#add_statusline_func(name)
  call airline#add_statusline_funcref(function(a:name))
endfunction

function! airline#add_statusline_funcref(function)
  call add(g:airline_statusline_funcrefs, a:function)
endfunction

function! airline#remove_statusline_func(name)
  let i = index(g:airline_statusline_funcrefs, function(a:name))
  if i > -1
    call remove(g:airline_statusline_funcrefs, i)
  endif
endfunction

function! airline#add_inactive_statusline_func(name)
  call add(s:inactive_funcrefs, function(a:name))
endfunction

function! airline#load_theme()
  call airline#highlighter#load_theme()
  call airline#extensions#load_theme()
endfunction

function! airline#switch_theme(name)
  let g:airline_theme = a:name
  let palette = g:airline#themes#{g:airline_theme}#palette "also lazy loads the theme
  call airline#themes#patch(palette)

  if exists('g:airline_theme_patch_func')
    let Fn = function(g:airline_theme_patch_func)
    call Fn(palette)
  endif

  let w:airline_lastmode = ''
  call airline#update_statusline()
  call airline#load_theme()
endfunction

function! airline#switch_matching_theme()
  if exists('g:colors_name')
    try
      let palette = g:airline#themes#{g:colors_name}#palette
      call airline#switch_theme(g:colors_name)
      return 1
    catch
      for map in items(g:airline_theme_map)
        if match(g:colors_name, map[0]) > -1<commit_msg>prevent clobbering startup info message. resolves #156.<commit_after>" MIT License. Copyright (c) 2013 <NAME>.
" vim: et ts=2 sts=2 sw=2

let g:airline_statusline_funcrefs = get(g:, 'airline_statusline_funcrefs', [])

let s:sections = ['a','b','c','gutter','x','y','z','warning']
let s:inactive_funcrefs = []

function! airline#add_statusline_func(name)
  call airline#add_statusline_funcref(function(a:name))
endfunction

function! airline#add_statusline_funcref(function)
  call add(g:airline_statusline_funcrefs, a:function)
endfunction

function! airline#remove_statusline_func(name)
  let i = index(g:airline_statusline_funcrefs, function(a:name))
  if i > -1
    call remove(g:airline_statusline_funcrefs, i)
  endif
endfunction

function! airline#add_inactive_statusline_func(name)
  call add(s:inactive_funcrefs, function(a:name))
endfunction

function! airline#load_theme()
  call airline#highlighter#load_theme()
  call airline#extensions#load_theme()
endfunction

function! airline#switch_theme(name)
  let g:airline_theme = a:name
  let palette = g:airline#themes#{g:airline_theme}#palette "also lazy loads the theme
  call airline#themes#patch(palette)

  if exists('g:airline_theme_patch_func')
    let Fn = function(g:airline_theme_patch_func)
    call Fn(palette)
  endif

  let w:airline_lastmode = ''
  call airline#update_statusline()
  call airline#load_theme()

  " this is required to prevent clobbering the startup info message, i don't know why...
  call airline#check_mode(winnr())
endfunction

function! airline#switch_matching_theme()
  if exists('g:colors_name')
    try
      let palette = g:airline#themes#{g:colors_name}#palette
      call airline#switch_theme(g:colors_name)
      return 1
    catch
      for map in items(g:airline_theme_map)
        if match(g:colors_name, map[0]) > -1
{'fraction_non_alphanumeric': 0.11344658796429599, 'fraction_numerical': 0.007198387561186294, 'mean_word_length': 6.177685950413223, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '7618182', 'n_tokens_mistral': 1274, 'n_tokens_neox': 1200, 'n_words': 241}