Skip to content

Commit de55a05

Browse files
committed
bug fix and release notes
1 parent a20b626 commit de55a05

File tree

2 files changed

+34
-6
lines changed

2 files changed

+34
-6
lines changed

MiniPy.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ def run(self, edit, user_input=None):
1717
for region in view.sel():
1818
total += view.substr(region).count("$")
1919

20+
print("total = ", total)
2021
# build a list from 1 to the number of special chars
21-
serial_number = list(range(total+1,1))
22+
serial_number = list(range(1, total+1))
2223
# serial_number.reverse()
23-
# serial_number = rev(serial_number)
24-
# print(repr(serial_number))
24+
serial_number = rev(serial_number)
25+
print(repr(serial_number))
2526

2627
# replace each special char $ with the next index from serial_number list
2728
# and eval the expression

README.md

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,31 @@
1-
MiniPy
2-
======
1+
# MiniPy
32

4-
Sublime Text 3 plugin - inline python evaluation
3+
Sublime Text 3 plugin - inline python evaluation.
4+
5+
For example you can write 3.14*0.6 and get the result (1.884) in your text.
6+
It also supports multiple selection.
7+
8+
Another feature is the use of $ as accumolation variable, e.g. having the following multipe selection:
9+
10+
arr[$]
11+
arr[$]
12+
arr[$]
13+
14+
will result with
15+
16+
arr[1]
17+
arr[2]
18+
arr[3]
19+
20+
similarlly:
21+
22+
arr[0 ] arr[0]
23+
arr[$+2] -> arr[3]
24+
arr[$*3] arr[6]
25+
26+
## Usage
27+
28+
To evaluate term, highlight and:
29+
30+
Super + Shift + X for Mac OS X
31+
Ctrl + Shift + X for Windows/Linux

0 commit comments

Comments
 (0)