<commit_before>if PLAT_GTK
	font.base=font:!Bitstream Vera Sans Mono,size:10
	font.small=font:!Bitstream Vera Sans Mono,size:10
	font.monospace=font:!Bitstream Vera Sans Mono,size:10
	font.comment=font:!Bitstream Vera Sans Mono,size:10
	font.code.comment.box=$(font.comment)
	font.code.comment.line=$(font.comment)
	font.code.comment.doc=$(font.comment)
	font.code.comment.nested=$(font.comment)
	font.text=font:!BBitstream Vera Sans Mono,size:10
	font.text.comment=font:!Bitstream Vera Sans Mono,size:10
	font.embedded.base=font:!Bitstream Vera Sans Mono,size:10
	font.embedded.comment=font:!Bitstream Vera Sans Mono,size:10
	font.vbs=font:!Bitstream Vera Sans Mono,size:10
	font.js=font:!Bitstream Vera Sans Mono,size:10

style.*.32=$(font.base),back:#999999,fore:#000000
style.*.33=back:#999999,$(font.base)
style.*.37=back:#999999,fore:#939393

caret.width=10
caret.fore=#FFFF00

selection.alpha=75
selection.back=#FFFF00
colour.keyword=fore:#649bff
colour.operator=fore:#727272

tabsize=4
indent.size=4
use.tabs=0
indent.automatic=0
indent.opening=0
indent.closing=0

line.margin.visible=1
fold.margin.colour=#999999

fold.margin.colour=#444444
fold.margin.highlight.colour=#9999cc

position.width=800
position.height=920

code.page=65001

wrap=1
wrap.style=1

command.name.11.*=Word Count
command.11.*=WordCount 
command.subsystem.11.*=3
command.mode.11.*=savebefore:no
command.shortcut.11.*=Ctrl+Shift+W

autocompleteword.automatic=1

function WordCount()
	local whiteSpace = 0;   --number of whitespace chars
	local nonEmptyLine = 0; --number of non blank lines
	local wordCount = 0;    --total number of words
	
	--Calculate whitespace control
	for m in editor:match("\n") do
		whiteSpace = whiteSpace + 1;
	end
	for m in editor:match("\r") do
		whiteSpace = whiteSpace + 1;
	end
	for m in editor:match("\t") do --count tabs
		whiteSpace = whiteSpace + 1;
	end

	--Calculate non-empty lines and word count
	local itt = 0;
	while itt < editor.LineCount do --iterate through each line
		local hasChar, hasNum = 0;
		line = editor:GetLine(itt);
		if line then
			hasAlphaNum = string.find(line,'%w');
		end
		
		if (hasAlphaNum ~= nill) then
			nonEmptyLine = nonEmptyLine + 1;
		end
		
		if line then
			for word in string.gfind(line, "%w+") do wordCount = wordCount + 1 end
		end
		
		itt = itt + 1;
	end
	
	print("----------------------------");
	print("Chars: \t\t\t",(editor.Length) - whiteSpace);
	print("Words: \t\t\t",wordCount);
	print("Lines: \t\t\t",editor.LineCount);
	print("Lines(non-blank): ", nonEmptyLine);
	
end;
<commit_msg>[scite] Adjust caret some more<commit_after>if PLAT_GTK
	font.base=font:!Bitstream Vera Sans Mono,size:10
	font.small=font:!Bitstream Vera Sans Mono,size:10
	font.monospace=font:!Bitstream Vera Sans Mono,size:10
	font.comment=font:!Bitstream Vera Sans Mono,size:10
	font.code.comment.box=$(font.comment)
	font.code.comment.line=$(font.comment)
	font.code.comment.doc=$(font.comment)
	font.code.comment.nested=$(font.comment)
	font.text=font:!BBitstream Vera Sans Mono,size:10
	font.text.comment=font:!Bitstream Vera Sans Mono,size:10
	font.embedded.base=font:!Bitstream Vera Sans Mono,size:10
	font.embedded.comment=font:!Bitstream Vera Sans Mono,size:10
	font.vbs=font:!Bitstream Vera Sans Mono,size:10
	font.js=font:!Bitstream Vera Sans Mono,size:10

style.*.32=$(font.base),back:#999999,fore:#000000
style.*.33=$(font.base),back:#999999,fore:#000000
style.*.37=$(font.base),back:#999999,fore:#000000


caret.width=10
caret.fore=#BBBB11

selection.alpha=75
selection.back=#BBBB11
colour.keyword=fore:#649bff
colour.operator=fore:#727272

tabsize=4
indent.size=4
use.tabs=0
indent.automatic=0
indent.opening=0
indent.closing=0

line.margin.visible=1
fold.margin.colour=#999999

fold.margin.colour=#444444
fold.margin.highlight.colour=#9999cc

position.width=800
position.height=920

code.page=65001

wrap=1
wrap.style=1

command.name.11.*=Word Count
command.11.*=WordCount 
command.subsystem.11.*=3
command.mode.11.*=savebefore:no
command.shortcut.11.*=Ctrl+Shift+W

autocompleteword.automatic=1

function WordCount()
	local whiteSpace = 0;   --number of whitespace chars
	local nonEmptyLine = 0; --number of non blank lines
	local wordCount = 0;    --total number of words
	
	--Calculate whitespace control
	for m in editor:match("\n") do
		whiteSpace = whiteSpace + 1;
	end
	for m in editor:match("\r") do
		whiteSpace = whiteSpace + 1;
	end
	for m in editor:match("\t") do --count tabs
		whiteSpace = whiteSpace + 1;
	end

	--Calculate non-empty lines and word count
	local itt = 0;
	while itt < editor.LineCount do --iterate through each line
		local hasChar, hasNum = 0;
		line = editor:GetLine(itt);
		if line then
			hasAlphaNum = string.find(line,'%w');
		end
		
		if (hasAlphaNum ~= nill) then
			nonEmptyLine = nonEmptyLine + 1;
		end
		
		if line then
			for word in string.gfind(line, "%w+") do wordCount = wordCount + 1 end
		end
		
		itt = itt + 1;
	end
	
	print("----------------------------");
	print("Chars: \t\t\t",(editor.Length) - whiteSpace);
	print("Words: \t\t\t",wordCount);
	print("Lines: \t\t\t",editor.LineCount);
	print("Lines(non-blank): ", nonEmptyLine);
	
end;

{'fraction_non_alphanumeric': 0.1516919486581097, 'fraction_numerical': 0.052508751458576426, 'mean_word_length': 4.548004314994606, 'pattern_counts': {'":': 0, '<': 5, '<?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': '7421255', 'n_tokens_mistral': 2149, 'n_tokens_neox': 1816, 'n_words': 402}