This is a basic terminal text editor which allows us to manipulate a given text file (or any other file that can be opened using some text encoding).
Using curses library to display to terminal, but all other logic is self made.
I will attempt to rewrite this in a more appropriate language later down the line.
- Implement a system for representing a text file (abstraction of a text file) [Done-ish]
- Might have to change from list -> tree/rope in order to optimise stuff
- Implement a cursor which represents where in the text file a user is pointing to input to (abstraction of a cursor) [Done]
- Implement a system for displaying this text file appropriately (i.e. every new line splits to a line break) [Done]
- This may be possible with just print statements and clearing the terminal manually every update
- Undo/Redo (Trees...) [Done-ish]
- Need to debug additional new lines appearing where they shouldnt when re/un doing an action
- Search functionality [TODO]
- Save file (Obviously) [Done-ish]
- Need to auto-save or allow user to save themselves
- Storing states between opening files (closing file doesn't remove the undo/redo trees, last cursor location etc.) [TODO]
- Make this a seperate data object
- Mouse support [TODO]
- Custom binding for actions using a config file (.json, .ini, .cfg etc.) [TODO]
- UI classes/abstractions in one folder
- Logical classes/abstractions in another folder
- Data structures subfolder (trees)
- Application structures subfolder
- folder for metadata files (states of files are stored here)
- Command interface for modifying text
- Delete command
- append command
- replace command
cd into the directory:
python main.py <name of the file you want to edit/create>