<commit_before>" Sparkup
" Installation:
"    Copy the contents of vim/ftplugin/ to your ~/.vim/ftplugin directory.
"
"        $ cp -R vim/ftplugin ~/.vim/ftplugin/
"
" Configuration:
"   g:sparkup (Default: 'sparkup') -
"     Location of the sparkup executable. You shouldn't need to change this
"     setting if you used the install option above.
"
"   g:sparkupArgs (Default: '--no-last-newline') -
"     Additional args passed to sparkup.
"
"   g:sparkupExecuteMapping (Default: '<c-e>') -
"     Mapping used to execute sparkup.
"
"   g:sparkupNextMapping (Default: '<c-n>') -
"     Mapping used to jump to the next empty tag/attribute.
"
"   g:sparkupMaps (Default: 1) -
"     Setup mappings?
"
"   g:sparkupMapsNormal (Default: 0) -
"     Setup mappings for normal mode?

if !exists('g:sparkupExecuteMapping')
  let g:sparkupExecuteMapping = '<c-e>'
endif

if !exists('g:sparkupNextMapping')
  let g:sparkupNextMapping = '<c-n>'
endif

if !exists('g:sparkupMaps')
  let g:sparkupMaps = 1
endif

if !exists('g:sparkupMapsNormal')
  let g:sparkupMapsNormal = 0
endif

inoremap <buffer> <Plug>SparkupExecute <c-g>u<Esc>:call <SID>Sparkup()<cr>
inoremap <buffer> <Plug>SparkupNext    <c-g>u<Esc>:call <SID>SparkupNext()<cr>

if g:sparkupMaps
  if ! hasmapto('<Plug>SparkupExecute', 'i')
    exec 'inoremap <buffer> ' . g:sparkupExecuteMapping . ' <Plug>SparkupExecute'
  endif
  if ! hasmapto('<Plug>SparkupNext', 'i')
    exec 'inoremap <buffer> ' . g:sparkupNextMapping . ' <Plug>SparkupNext'
  endif
  if g:sparkupMapsNormal
    if ! hasmapto('<Plug>SparkupExecute', 'n')
      exec 'nnoremap <buffer> ' . g:sparkupExecuteMapping . ' :call <SID>Sparkup()<cr>'
    endif
    if ! hasmapto('<Plug>SparkupNext', 'n')
      exec 'nnoremap <buffer> ' . g:sparkupNextMapping . ' :call <SID>SparkupNext()<cr>'
    endif
  endif
endif

if exists('*s:Sparkup')
    finish
endif

function! s:Sparkup()
    if !exists('s:sparkup')
        let s:sparkup = exists('g:sparkup') ? g:sparkup : 'sparkup'
        let s:sparkupArgs = exists('g:sparkupArgs') ? g:sparkupArgs : '--no-last-newline'
        let s:sparkupArgs = s:sparkupArgs . ' --' . &filetype

        " check the user's path first. if not found then search relative to
        " sparkup.vim in the runtimepath.
        if !executable(s:sparkup)
            let paths = substitute(escape(&runtimepath, ' '), '\(,\|$\)', '/**\1', 'g')
            let s:sparkup = fnamemodify(findfile('sparkup.py', paths), ':p')

            if !filereadable(s:sparkup)
                echohl WarningMsg
                echom 'Warning: could not find sparkup on your path or in your vim runtime path.'
                echohl None
                return
            endif
        endif
        let s:sparkup = '"' . s:sparkup . '"'<commit_msg>Mention sparkup.py besides sparkup in the error message<commit_after>" Sparkup
" Installation:
"    Copy the contents of vim/ftplugin/ to your ~/.vim/ftplugin directory.
"
"        $ cp -R vim/ftplugin ~/.vim/ftplugin/
"
" Configuration:
"   g:sparkup (Default: 'sparkup') -
"     Location of the sparkup executable. You shouldn't need to change this
"     setting if you used the install option above.
"
"   g:sparkupArgs (Default: '--no-last-newline') -
"     Additional args passed to sparkup.
"
"   g:sparkupExecuteMapping (Default: '<c-e>') -
"     Mapping used to execute sparkup.
"
"   g:sparkupNextMapping (Default: '<c-n>') -
"     Mapping used to jump to the next empty tag/attribute.
"
"   g:sparkupMaps (Default: 1) -
"     Setup mappings?
"
"   g:sparkupMapsNormal (Default: 0) -
"     Setup mappings for normal mode?

if !exists('g:sparkupExecuteMapping')
  let g:sparkupExecuteMapping = '<c-e>'
endif

if !exists('g:sparkupNextMapping')
  let g:sparkupNextMapping = '<c-n>'
endif

if !exists('g:sparkupMaps')
  let g:sparkupMaps = 1
endif

if !exists('g:sparkupMapsNormal')
  let g:sparkupMapsNormal = 0
endif

inoremap <buffer> <Plug>SparkupExecute <c-g>u<Esc>:call <SID>Sparkup()<cr>
inoremap <buffer> <Plug>SparkupNext    <c-g>u<Esc>:call <SID>SparkupNext()<cr>

if g:sparkupMaps
  if ! hasmapto('<Plug>SparkupExecute', 'i')
    exec 'inoremap <buffer> ' . g:sparkupExecuteMapping . ' <Plug>SparkupExecute'
  endif
  if ! hasmapto('<Plug>SparkupNext', 'i')
    exec 'inoremap <buffer> ' . g:sparkupNextMapping . ' <Plug>SparkupNext'
  endif
  if g:sparkupMapsNormal
    if ! hasmapto('<Plug>SparkupExecute', 'n')
      exec 'nnoremap <buffer> ' . g:sparkupExecuteMapping . ' :call <SID>Sparkup()<cr>'
    endif
    if ! hasmapto('<Plug>SparkupNext', 'n')
      exec 'nnoremap <buffer> ' . g:sparkupNextMapping . ' :call <SID>SparkupNext()<cr>'
    endif
  endif
endif

if exists('*s:Sparkup')
    finish
endif

function! s:Sparkup()
    if !exists('s:sparkup')
        let s:sparkup = exists('g:sparkup') ? g:sparkup : 'sparkup'
        let s:sparkupArgs = exists('g:sparkupArgs') ? g:sparkupArgs : '--no-last-newline'
        let s:sparkupArgs = s:sparkupArgs . ' --' . &filetype

        " check the user's path first. if not found then search relative to
        " sparkup.vim in the runtimepath.
        if !executable(s:sparkup)
            let paths = substitute(escape(&runtimepath, ' '), '\(,\|$\)', '/**\1', 'g')
            let s:sparkup = fnamemodify(findfile('sparkup.py', paths), ':p')

            if !filereadable(s:sparkup)
                echohl WarningMsg
                echom 'Warning: could not find sparkup/sparkup.py on your path or in your vim runtime path.'
                echohl None
                return
            endif
        endif
        let s:sparkup = '"' . s:sparkup . '"'
{'fraction_non_alphanumeric': 0.14290811775200712, 'fraction_numerical': 0.001784121320249777, 'mean_word_length': 3.106959706959707, 'pattern_counts': {'":': 0, '<': 63, '<?xml version=': 0, '>': 63, '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': '4913297', 'n_tokens_mistral': 2113, 'n_tokens_neox': 1939, 'n_words': 477}