Python(3.10)
This is a simple text editor which can modify text file using python.
First of all you need to know some essential things about how this program works:
- When you run the code, you should enter one of the main functions that've been defined.
- There is a main loop which run while you use the program so if you want to break it you can exit easily.
- List of all functions:
Exit
Next page
Previous page
Where
Show(n)
Append
Insert(text,line number)
Remove(n)
Replace( a , n )
Swap( a , b )
Find(a)
Find&Replace ( a , b )
Undo
Redo
Actually, It's like vim. You should work with commands.
-
$exit:
Save the final file and exit from file -
$nextpage:
Show the next page. (all pages were seperated via "$" symbol) -
$previouspage:
Same as next page -
$where:
show your current page number -
$show(n):
Show the line number n in current page -
$append:
Insert new text at the end of current page. -
$insert(d,n):
Insert text d at line number n -
$remove( n ):
Remove line number n from the current page -
replace( a , n ):
Replace text a with the text at line number n -
$swap( a , b ):
Swap line number a with line number b -
$find(a):
Find all possible testcases of a in whole file -
$far ( a , b ):
Find and replace text a with text b -
$undo:
Undo the last change -
$redo:
Obvious