<commit_before>autocmd BufReadPost,BufNewFile *.apib set filetype=apiblueprint
autocmd FileType apiblueprint set syntax=apiblueprint
autocmd FileType apiblueprint set makeprg=snowcrash\ -l\ %
<commit_msg>[filetype] Detect API Blueprint from FORMAT: 1A<commit_after>autocmd BufReadPost,BufNewFile *.apib set filetype=apiblueprint
autocmd FileType apiblueprint set syntax=apiblueprint
autocmd FileType apiblueprint set makeprg=snowcrash\ -l\ %

fun! s:DetectAPIBlueprint()
  if getline(1) =~ '^FORMAT: 1A$'
    set filetype=apiblueprint
  endif
endfun

autocmd BufNewFile,BufRead * call s:DetectAPIBlueprint()

{'fraction_non_alphanumeric': 0.07894736842105263, 'fraction_numerical': 0.004934210526315789, 'mean_word_length': 7.12, 'pattern_counts': {'":': 0, '<': 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': '1276301', 'n_tokens_mistral': 240, 'n_tokens_neox': 232, 'n_words': 52}