-
Notifications
You must be signed in to change notification settings - Fork 0
/
.SciTEUser.properties
101 lines (81 loc) · 2.49 KB
/
.SciTEUser.properties
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
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;