<commit_before>if exists("g:loaded_jab_python")  
	finish
endif
let g:loaded_jab_python = "v001"

noremap <up> i k <esc>
noremap <down> i j <esc>
noremap <right> :tabnext<cr>
noremap <left> :tabprev<cr>
set foldmethod=indent
NoMatchParen

set autowrite
let s:file_py = expand("%")
let s:file_jabber = substitute(s:file_py,'\.py$','.j',"")
if filereadable(s:file_jabber) && s:file_py != s:file_jabber
	exec "tabnew " s:file_jabber
endif
let s:file_grammar = substitute(s:file_py,'\.py$','.g',"")
if filereadable(s:file_grammar) && s:file_py != s:file_grammar
	exec "tabnew " s:file_grammar
endif
let s:file_test = substitute(s:file_py,'\.py$','.test',"")
if filereadable(s:file_test) && s:file_py != s:file_test
	exec "tabnew " s:file_test
endif
let s:file_tests = substitute(s:file_py,'\.py$','.tests',"")
if filereadable(s:file_tests) && s:file_py != s:file_tests
	exec "tabnew " s:file_tests
endif
let s:file_fail = substitute(s:file_py,'\.py$','.fail',"")
if filereadable(s:file_fail) && s:file_py != s:file_fail
	exec "tabnew " s:file_fail
endif
tabnext
1,$foldopen
" tabnext
" set filetype=doctest

" 
" Try to run this file(s) through doctest
"
if !exists("Try")
	function Try()
		let item_name = expand("%:~:r")
		let fails = item_name . ".fail"
		let command = "! python ~/.jab/python/try.py -qa "
		let command_line = command . item_name . " > " . fails . " 2>&1 || true"
		try
			exec command_line
			redraw!
		catch /.*/
			" echo fred
		endtry
		let old_tab = expand("%")
		exec "tablast"
		let last_tab = expand("%")
		if expand("%:e") == "fail"
			exec "quit!"
		endif
		if old_tab != last_tab
			while old_tab != expand("%")
				exec "tabnext"
			endwhile
		endif
		let path_to_fails = expand(fails)
		let z = getfsize(path_to_fails)<commit_msg>ignore DocTestRunner merge output if it exists<commit_after>if exists("g:loaded_jab_python")  
	finish
endif
let g:loaded_jab_python = "v001"

noremap <up> i k <esc>
noremap <down> i j <esc>
noremap <right> :tabnext<cr>
noremap <left> :tabprev<cr>
set foldmethod=indent
NoMatchParen

set autowrite
let s:file_py = expand("%")
let s:file_jabber = substitute(s:file_py,'\.py$','.j',"")
if filereadable(s:file_jabber) && s:file_py != s:file_jabber
	exec "tabnew " s:file_jabber
endif
let s:file_grammar = substitute(s:file_py,'\.py$','.g',"")
if filereadable(s:file_grammar) && s:file_py != s:file_grammar
	exec "tabnew " s:file_grammar
endif
let s:file_test = substitute(s:file_py,'\.py$','.test',"")
if filereadable(s:file_test) && s:file_py != s:file_test
	exec "tabnew " s:file_test
endif
let s:file_tests = substitute(s:file_py,'\.py$','.tests',"")
if filereadable(s:file_tests) && s:file_py != s:file_tests
	exec "tabnew " s:file_tests
endif
let s:file_fail = substitute(s:file_py,'\.py$','.fail',"")
if filereadable(s:file_fail) && s:file_py != s:file_fail
	exec "tabnew " s:file_fail
endif
tabnext
1,$foldopen
" tabnext
" set filetype=doctest

" 
" Try to run this file(s) through doctest
"
if !exists("Try")
	function Try()
		let item_name = expand("%:~:r")
		let fails = item_name . ".fail"
		let command = "! python ~/.jab/python/try.py -qa "
		let command_line = command . item_name . " | grep -v DocTestRunner.merge "
		let quiet_line = command_line . " > " . fails . " 2>&1 || true"
		try
			exec quiet_line
			redraw!
		catch /.*/
			" echo fred
		endtry
		let old_tab = expand("%")
		exec "tablast"
		let last_tab = expand("%")
		if expand("%:e") == "fail"
			exec "quit!"
		endif
		if old_tab != last_tab
			while old_tab != expand("%")
				exec "tabnext"
			endwhile
		endif
		let path_to_fails = expand(fails)
		let z = getfsize(path_to_fails)
{'fraction_non_alphanumeric': 0.1644100580270793, 'fraction_numerical': 0.0033158331030671458, 'mean_word_length': 4.6828885400313975, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 23, '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': '331909', 'n_tokens_mistral': 1555, 'n_tokens_neox': 1427, 'n_words': 329}