<commit_before>" VimTeX - LaTeX plugin for Vim
"
" Maintainer: <NAME>
" Email:      <EMAIL>
"
"
" This script is a fork of version 119 (dated 2020-06-29) of the syntax script
" "tex.vim" created and maintained by <NAME> [0].
"
" [0]: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX

if !get(g:, 'vimtex_syntax_enabled', 1) | finish | endif
if exists('b:current_syntax') | finish | endif
if exists('s:is_loading') | finish | endif
let s:is_loading = 1

" Syntax may be loaded without the main VimTeX functionality, thus we need to
" ensure that the options are loaded!
call vimtex#options#init()

" Load core syntax and highlighting rules (does not depend on VimTeX state)
call vimtex#syntax#core#init()
call vimtex#syntax#core#init_highlights()

" Initialize buffer local syntax state
let b:vimtex_syntax = {}
call vimtex#syntax#nested#reset()

" Load syntax rules that depend on VimTeX state
" * This includes e.g. package specific syntax
if exists('b:vimtex')
  call vimtex#syntax#core#init_post()
endif

" Use autocommands to ensure
" 1. that highlight groups are defined when colorschemes are changed or the
"    background is toggled, and
" 2. that the init_post function is executed when VimTeX state is loaded (if it
"    was not already done).
augroup vimtex_syntax
  autocmd!
  autocmd User VimtexEventInitPost call vimtex#syntax#core#init_post()
  autocmd ColorScheme * call vimtex#syntax#core#init_highlights()
augroup END
<commit_msg>fix(syntax): ensure init_post when syntax reloads<commit_after>" VimTeX - LaTeX plugin for Vim
"
" Maintainer: <NAME>
" Email:      <EMAIL>
"
"
" This script is a fork of version 119 (dated 2020-06-29) of the syntax script
" "tex.vim" created and maintained by <NAME> [0].
"
" [0]: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX

if !get(g:, 'vimtex_syntax_enabled', 1) | finish | endif
if exists('b:current_syntax') | finish | endif
if exists('s:is_loading') | finish | endif
let s:is_loading = 1

" Syntax may be loaded without the main VimTeX functionality, thus we need to
" ensure that the options are loaded!
call vimtex#options#init()

" Load core syntax and highlighting rules (does not depend on VimTeX state)
call vimtex#syntax#core#init()
call vimtex#syntax#core#init_highlights()

" Initialize buffer local syntax state
unlet! b:vimtex_syntax_did_postinit
let b:vimtex_syntax = {}
call vimtex#syntax#nested#reset()

" Load syntax rules that depend on VimTeX state
" * This includes e.g. package specific syntax
if exists('b:vimtex')
  call vimtex#syntax#core#init_post()
endif

" Use autocommands to ensure
" 1. that highlight groups are defined when colorschemes are changed or the
"    background is toggled, and
" 2. that the init_post function is executed when VimTeX state is loaded (if it
"    was not already done).
augroup vimtex_syntax
  autocmd! * <buffer>
  autocmd User <buffer> VimtexEventInitPost call vimtex#syntax#core#init_post()
  autocmd ColorScheme <buffer> * call vimtex#syntax#core#init_highlights()
augroup END

{'fraction_non_alphanumeric': 0.09691337537338202, 'fraction_numerical': 0.011284434118818453, 'mean_word_length': 5.076612903225806, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3165844', 'n_tokens_mistral': 1060, 'n_tokens_neox': 980, 'n_words': 344}